+2 votes

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:
enter image description here

But in my game, the camera rotates along with the ship, and this is the result:
enter image description here

What, if anything, can I do to make the normalmaps display correctly with a rotating camera?

in Engine by (1,328 points)
edited by

can't see images

Fixed images. Hopefully.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.