I am currently trying to add some normal mapping to my project. Copy/pasting the shader from the 2D Normal Mapping demo, I have the current code:
uniform texture normal;
//normal maps expect Y-up, but 2D is Y-down, so must mirror this.
NORMAL = tex(normal,UV).rgb * vec3(2.0,-2.0,1.0) - vec3(1.0,-1.0,0.0);
All works just fine as long as my camera is not rotating:
But in my game, the camera rotates along with the ship, and this is the result:
What, if anything, can I do to make the normalmaps display correctly with a rotating camera?