mirror of https://github.com/axmolengine/axmol.git
remove the float type "f" postfix in /simple_shadow.frag
This commit is contained in:
parent
68177e41e9
commit
35e9d60dae
|
@ -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);
|
||||||
}
|
}
|
Loading…
Reference in New Issue