uniform vec4 HG_DepthRange; uniform sampler2D HG_Texture0; uniform sampler2D HG_Texture1; varying vec3 normal; varying vec3 pos; varying vec3 gpos; void main() { vec4 IM = texture2D( HG_Texture0, gl_TexCoord[0].xy ); if( IM.a < 0.5 ) discard; IM.a = 1.0; // IM.rgb *= gl_Color.rgb; vec3 rpos = gl_LightSource[0].position.xyz - gpos; vec3 ln = normalize( rpos ); float dotv = dot( ln, vec3( 0., 0., 1. ) ); float intensity = 1./length( rpos ); IM.rgb*= dotv * intensity * 10.; gl_FragColor = IM; }