remove the float type "f" postfix in /simple_shadow.frag

This commit is contained in:
tangziwen 2014-12-22 14:22:30 +08:00
parent 68177e41e9
commit 35e9d60dae
1 changed files with 5 additions and 5 deletions

View File

@ -11,12 +11,12 @@ uniform vec4 u_color;
void main(void) void main(void)
{ {
float Radius = 4.0f;//project range float Radius = 4.0;//project range
vec3 UVector = vec3(1.0f, 0.0f, 0.0f)/(2.0f * Radius); vec3 UVector = vec3(1.0, 0.0, 0.0)/(2.0 * Radius);
vec3 VVector = vec3(0.0f, 0.0f, -1.0f)/(-2.0f * Radius); vec3 VVector = vec3(0.0, 0.0, -1.0)/(-2.0 * Radius);
vec2 coord; vec2 coord;
coord.x = dot(v_position.xyz - u_target_pos, UVector) + 0.5f; coord.x = dot(v_position.xyz - u_target_pos, UVector) + 0.5;
coord.y = dot(v_position.xyz - u_target_pos, VVector) + 0.5f; coord.y = dot(v_position.xyz - u_target_pos, VVector) + 0.5;
gl_FragColor = u_color*texture2D(CC_Texture0,v_texture_coord)*texture2D(u_shadowTexture,coord); gl_FragColor = u_color*texture2D(CC_Texture0,v_texture_coord)*texture2D(u_shadowTexture,coord);
} }