#version 110
#define float4 vec4
#define float3 vec3
#define float2 vec2
#define oUV gl_TexCoord[0]
#define tex3D texture3D
#define tex2D texture2D
#define tex1D texture1D

varying vec3 normal;
varying vec3 normalB;
//varying vec4 position;
varying vec4 projection_position;
varying vec4 ShadowPosZ;
varying vec4 Color;

varying vec4 projection_from_camera;

varying vec2 UVcoordinates;
varying vec4 TheGoodPosition;

uniform mat4 ProjectionMatrix;
				uniform sampler2D texture2d_1;
				uniform sampler2D texture2d_2;
				uniform sampler2D texture2d_3;
				uniform sampler2D texture2d_flower;
				uniform sampler2D texture2d_blob;
				uniform samplerCube texture2d_cube;
uniform sampler2D texture2d_reflection;
				uniform sampler2D texture2d_paper;


	uniform float PosY;
	uniform float ttime;
	uniform float isReflective;
	uniform float MaterialMultiplier;
	uniform float ReflectPass;
	uniform float isHappiness;
	uniform float isManRunning;
	uniform float isSide;
	uniform float isFish;
	uniform float RedHot;
	uniform float Beginning;
void main (void) 
{

vec4 Final_Color;

	// discard segments

if (ttime<63.0) { 

float fc=1.0-clamp ((ttime-60.0)*0.3333,0.0,1.0);

	gl_FragData[0]=vec4 (0.0,1.0,0.0,0.0);
float ffc=sin (3.14159*UVcoordinates.y);
gl_FragData[1]=fc*ffc*texture2D (texture2d_1,UVcoordinates.xy*vec2 (1.0,1.5))*0.7*vec4 (1.5,0.7,0.3,1.0);

}
else
{

float fc=clamp ((ttime-78.0)*0.3,0.0,1.0);
if (ttime<78.0) discard;

fc-=clamp ((ttime-104.0)*0.2,0.0,1.0);
if (ttime>110.0) discard;

gl_FragData[0]=vec4 (0.0,1.0,0.0,0.0);
float ff=texture2D (texture2d_1,UVcoordinates.xy+vec2 (0.04*ttime,0.0)).x;
gl_FragData[1]=texture2D (texture2d_1,UVcoordinates.xy*vec2 (0.5,1.0)+vec2 (+0.0-0.0*ttime,ff*0.02))*0.4*vec4 (0.7,0.5,0.2,1.0)*fc;
gl_FragData[1]+=gl_FragData[1]*gl_FragData[1]*11.3*vec4 (1.0,1.0,3.5,1.0);
}


}














