#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 vec4 position;


	uniform float PosY;

varying vec4 Color;
varying float rnd;
uniform int mode;


void main (void) 
{


//float4 TheNormal=(nnormal.xyzz+float4 (1.0))*0.5;
//TheNormal.w=shadow;
float4 Diffuse=gl_PointCoord.xyxy;

float3 Normal=gl_PointCoord.xyx;
Normal.z=1.0;
Normal=normalize (Normal);
gl_FragData[0]=Normal.xyzz;
if (length (gl_PointCoord.xy-vec2 (0.5))>0.5) discard;

float fl=0.3+2.0*pow (sin(rnd*100.0+position.y),10.0);

gl_FragData[1]=Color;

//gl_FragData[1]=float4 (0.3,0.3,0.3,0.3);

}














