Fixed a bug in projective texture shader.
This commit is contained in:
@@ -22,7 +22,7 @@ out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
vec4 projcoords = TextureMVP * vertexPos;
|
||||
vec2 texturecoords = projcoords.xy/max(projcoords.z,0.1);
|
||||
vec2 texturecoords = projcoords.xy/projcoords.w;
|
||||
vec4 texel = fragment.color*texture(Diffuse,texturecoords);
|
||||
vec3 ct,cf;
|
||||
float intensity,at,af;
|
||||
|
||||
@@ -18,7 +18,7 @@ static const char* projectiveTextureInstancingFragmentShader= \
|
||||
"void main(void)\n"
|
||||
"{\n"
|
||||
" vec4 projcoords = TextureMVP * vertexPos;\n"
|
||||
" vec2 texturecoords = projcoords.xy/max(projcoords.z,0.1);\n"
|
||||
" vec2 texturecoords = projcoords.xy/projcoords.w;\n"
|
||||
" vec4 texel = fragment.color*texture(Diffuse,texturecoords);\n"
|
||||
" vec3 ct,cf;\n"
|
||||
" float intensity,at,af;\n"
|
||||
|
||||
Reference in New Issue
Block a user