Im working on a water effect demo these days, and there is a problem that the fragment shader cant load the normal texture for the water surface ( the reflection texture works fine) .
Im sure that both the vertex shader and fragment shader are correct because they work fine in the ShaderMaker. So I guess the problem comes from my C++ codes, and here are the codes:
glUniform1i( glGetUniformLocation( _waterShader->GetHandler(),"reflectTex"),1);
glUniform1i( glGetUniformLocation( _waterShader->GetHandler(),"bumpTex"),2);
// uniform values
// draw a plane
What's wrong with my codes?
sorry for my poor English
Edited by 50CoL, 03 September 2012 - 09:08 PM.