1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Avoid flipping normal based on facing direction when calculation SDF. This shader runs for multiple directions, so the flip direction won't be accurate and just creates bad normals

This commit is contained in:
clayjohn
2025-01-27 16:48:29 -08:00
parent 9630d4e2fc
commit a525e30c27

View File

@@ -2603,7 +2603,7 @@ void fragment_shader(in SceneData scene_data) {
vec3(0, -1, 0), vec3(0, -1, 0),
vec3(0, 0, -1)); vec3(0, 0, -1));
vec3 cam_normal = mat3(scene_data.inv_view_matrix) * geo_normal; vec3 cam_normal = mat3(scene_data.inv_view_matrix) * normalize(normal_interp);
float closest_dist = -1e20; float closest_dist = -1e20;