Godot Version
4.4
Question
Hiiiii . Ummm, I’m facing an issue that makes my enemy
(Yeah, I know is pretty ugly
)have the lighting is the opposite site where it should be, but just in the main body
, the rest is fine
.
If I look inside the model the lighting is where it should be outside, so I thought it must be the normals , but looking at the model in Blender it seems to be right
.
I could just flip the main boyd’s normals but then I can’t use backface culling .
I tried recalculate the normals and what this topic says but they didn’t work.
These are my import setting if it helps.
Uploading: 2a100cb73d86f7966718d38ec05fc2fe7893e626.png…
Help pls ?
EDIT
I put a normal visualizer to the guy, and its look complently wrong.
This is the shader I used:
shader_type spatial;
render_mode unshaded;
uniform bool WorldSpace = false; // toggle between world and local space
uniform bool RemapRange = false; // remap from -1..1 to 0..1
void fragment()
{
// World space normal
vec4 Wn = INV_VIEW_MATRIX * vec4( NORMAL, 0.0 );
if ( WorldSpace == false ) // Local space normal
{
Wn = inverse( MODEL_MATRIX ) * Wn;
}
if ( RemapRange == true )
{
ALBEDO = ( Wn.rgb + 1.0 )/2.0;
}
else
{
ALBEDO = Wn.rgb;
}
}