diff options
author | clayjohn <claynjohn@gmail.com> | 2024-02-23 10:22:01 -0800 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2024-02-23 21:19:21 -0800 |
commit | f267b2aa87597a78fed9f0d086b18e47dd761a01 (patch) | |
tree | 617ee3c2c46d96dee4f0cee47c63238087c90c52 /servers/rendering_server.cpp | |
parent | 16d61427cab3a8e43f0a9a8ee724fc176b6433c6 (diff) | |
download | redot-engine-f267b2aa87597a78fed9f0d086b18e47dd761a01.tar.gz |
Properly calculate binormal when creating SurfaceTool from arrays
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r-- | servers/rendering_server.cpp | 2 |
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); } } |