<Shader>
	<VertexShader>
		<Code>
			#version 120
			attribute float IndxAttrib;

			uniform vec4 PosTexCoord[64]; 
			uniform vec4 QuadData[64]; 
			
			varying vec4 InterpolatedData;
			varying vec4 Data1;
			varying vec4 Data2;
			varying vec4 Data3;
			varying vec4 Data4;
			varying vec2 Texcoord;
		
			void main( void )
			{
			//	int QuadId = int(floor(IndxAttrib/4.0));
				int VertexId = int(IndxAttrib);
				int QuadId = ((VertexId)/4)*4;
				vec4 PosTex = PosTexCoord[VertexId];
				InterpolatedData = QuadData[VertexId];

				Data1 = QuadData[QuadId+0];
				Data2 = QuadData[QuadId+1];
				Data3 = QuadData[QuadId+2];
				Data4 = QuadData[QuadId+3];

				PosTex.xy = PosTex.xy * 2.0 -1.0;
				PosTex.y = -PosTex.y;

				gl_Position = vec4(PosTex.xy, 1.0, 1.0);
				Texcoord = PosTex.zw;
			}
		</Code>
	</VertexShader>
	
	<FragmentShader>
		<Code>
			#version 120
			uniform sampler2D Map0;

			varying vec4 Data1;
			varying vec2 Texcoord;

			void main( void )
			{
				gl_FragColor = texture2D(Map0, vec2(Texcoord.x, Texcoord.y/10.0 + Data1.x));
			}
		</Code> 
	</FragmentShader>
</Shader>
