#line 7 struct v2f { vec4 pos; vec4 color; }; #line 3 struct a2v { vec4 pos; }; #line 1 uniform mat4 mvp; #line 12 uniform vec4 _LightColor; uniform vec3 _LightPos; #line 33 #line 15 float ComputeShadow( in vec3 pos ) { #line 17 return pow( pos.x, 4.0); } #line 20 float ComputeAtten( in vec3 pos, in vec3 lightPos ) { #line 22 return (distance( pos, lightPos) * ComputeShadow( pos)); } #line 25 vec4 ComputeSomeLighting( in vec3 pos ) { #line 27 vec4 res; res = _LightColor; res *= ComputeAtten( pos, _LightPos); return res; } #line 33 v2f xlat_main( in a2v v ) { v2f o; vec4 pos = (mvp * v.pos); #line 37 o.pos = pos; o.color = ComputeSomeLighting( v.pos.xyz); return o; } varying vec4 xlv_COLOR; void main() { v2f xl_retval; a2v xlt_v; xlt_v.pos = vec4(gl_Vertex); xl_retval = xlat_main( xlt_v); gl_Position = vec4(xl_retval.pos); xlv_COLOR = vec4(xl_retval.color); } // uniforms: // _LightColor: type 12 arrsize 0 // _LightPos: type 11 arrsize 0 // mvp: type 21 arrsize 0