mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Normalize the results of octahedral decompression
This commit is contained in:
@@ -376,7 +376,7 @@ Vector3 VisualServer::oct_to_norm(const Vector2 v) {
|
||||
float t = MAX(-res.z, 0.0f);
|
||||
res.x += t * -SGN(res.x);
|
||||
res.y += t * -SGN(res.y);
|
||||
return res;
|
||||
return res.normalized();
|
||||
}
|
||||
|
||||
// Convert Octohedron-mapped normalized tangent vector back to Cartesian
|
||||
|
||||
Reference in New Issue
Block a user