uniform vec2 iResolution;
uniform float iTime;

uniform sampler2D gm_BaseTexture;

uniform bool gm_PS_FogEnabled;
uniform vec4 gm_FogColour;
uniform bool gm_AlphaTestEnabled;
uniform float gm_AlphaRefValue;

void DoAlphaTest(vec4 SrcColour)
{
	if (gm_AlphaTestEnabled)
	{
		if (SrcColour.a <= gm_AlphaRefValue)
		{
			discard;
		}
	}
}

void DoFog(inout vec4 SrcColour, float fogval)
{
	if (gm_PS_FogEnabled)
	{
		SrcColour = mix(SrcColour, gm_FogColour, clamp(fogval, 0.0, 1.0)); 
	}
}

#define _YY_GLSL_ 1
//
// https://www.shadertoy.com/view/WsSXzt
//
varying vec2 fragCoord; 

void main()
{
        vec2 fragCoord = openfl_TextureCoordv * iResolution;
	vec2 uv = fragCoord.xy / iResolution.xy;
    float s1 = 0.5+0.5*sin(iTime+uv.x*3.1415*(sin(iTime)+4.0));
    float s2 = 0.5+0.25*sin(iTime+uv.x*3.1415*(sin(iTime)*2.0+2.0));
    float r = pow(abs(1.0-sqrt( abs(uv.y-s1))),1.5 );
    float g = pow(abs(1.0-sqrt( abs(uv.y-s2))),1.5 );
    float b = 1.5*(r+g);
	gl_FragColor = vec4( r,g,b,1 );
}