summaryrefslogtreecommitdiffstats
path: root/servers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-27 10:17:39 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-27 10:17:39 +0100
commitb21328d465df6548a8a8be23486c86469ce7ac43 (patch)
treefd9d2602bbf4a4273b294b0fec21a66bad4112fa /servers
parent730ef374b442098979015a6a2de3fa295732fbdd (diff)
parentf267b2aa87597a78fed9f0d086b18e47dd761a01 (diff)
downloadredot-engine-b21328d465df6548a8a8be23486c86469ce7ac43.tar.gz
Merge pull request #88725 from clayjohn/GLTF-binormal-sign
Properly calculate binormal when creating SurfaceTool from arrays
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 6e9b525f31..d1c3aaf6f7 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -340,7 +340,7 @@ void _get_axis_angle(const Vector3 &p_normal, const Vector4 &p_tangent, float &r
if (d < 0.0) {
r_angle = CLAMP((1.0 - r_angle / Math_PI) * 0.5, 0.0, 0.49999);
} else {
- r_angle = (r_angle / Math_PI) * 0.5 + 0.5;
+ r_angle = CLAMP((r_angle / Math_PI) * 0.5 + 0.5, 0.500008, 1.0);
}
}