Hi.,
Well, i’m still having a problem related with projection textures.,
The thing is, the reflection is perfectly correct when the shader is not active, when the shader is active, the projection seems to come down.
Actually, it’s logic that she comes down, but i’m not looking in another way to do this.
Please, take a look at the shots and the shader.
The projection gets worse as the camera gets near the level of the water
The shader :
uniform sampler2D Texture0;
uniform sampler2D Texture1;
uniform sampler2D Texture2;
uniform float time;
uniform float YY;
void main(void)
{
vec4 normal_map = texture2D(Texture2, vec2(gl_TexCoord[2]) );
vec4 difuse_map = texture2D(Texture1, vec2(gl_TexCoord[1]) );
vec4 newtexcoords;
newtexcoords.x = gl_TexCoord[0].x + normal_map.x;
newtexcoords.y = gl_TexCoord[0].y + normal_map.y;
newtexcoords.z = gl_TexCoord[0].z;
newtexcoords.w = gl_TexCoord[0].w;
gl_FragColor = texture2DProj(Texture0, newtexcoords);
}
The shots,
thanks,
Bruno