Merge pull request #90255 from Jabberdrake/bugfix-new

Fix 3d axes flickering in the negative direction when extremely zoomed out
This commit is contained in:
Rémi Verschelde 2024-04-09 10:42:35 +02:00
commit dfcf803724
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -6639,8 +6639,13 @@ void fragment() {
for (int j = 0; j < 4; j++) {
Transform3D t = Transform3D();
t = t.scaled(axis * distances[j + 1]);
t = t.translated(axis * distances[j]);
if (distances[j] > 0.0) {
t = t.scaled(axis * distances[j + 1]);
t = t.translated(axis * distances[j]);
} else {
t = t.scaled(axis * distances[j]);
t = t.translated(axis * distances[j + 1]);
}
RenderingServer::get_singleton()->multimesh_instance_set_transform(origin_multimesh, i * 4 + j, t);
RenderingServer::get_singleton()->multimesh_instance_set_color(origin_multimesh, i * 4 + j, origin_color);
}