+2 votes

Hi, I have a 2D sprite with normal map and I use the following fragment shader to give it a 3D effect:

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);

The problem is that the effect is almost invisible if the energy of the light is low. But if I set it to high, the lightning of the background does not look good.

How can I increase the energy in the shader itself?

Energy 1

Energy 10

in Engine by (262 points)

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 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 webmaster@godotengine.org with your username.