From e690015da2a11f4bc6bb50e6d0c0864ab42d3fb4 Mon Sep 17 00:00:00 2001 From: Christopher Biscardi Date: Sat, 8 Jun 2024 13:22:00 -0700 Subject: [PATCH] view.inverse_clip_from_world should be world_from_clip As per the other changes in https://github.com/bevyengine/bevy/pull/13489 --- crates/bevy_gizmos/src/lines.wgsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_gizmos/src/lines.wgsl b/crates/bevy_gizmos/src/lines.wgsl index 64c02f439b841..e608b4beabb09 100644 --- a/crates/bevy_gizmos/src/lines.wgsl +++ b/crates/bevy_gizmos/src/lines.wgsl @@ -74,8 +74,8 @@ fn vertex(vertex: VertexInput) -> VertexOutput { let near_clipping_plane_height = length(pos0.xyz - pos1.xyz); // We can't use vertex.position_X because we may have changed the clip positions with clip_near_plane - let position_a = view.inverse_clip_from_world * clip_a; - let position_b = view.inverse_clip_from_world * clip_b; + let position_a = view.world_from_clip * clip_a; + let position_b = view.world_from_clip * clip_b; let world_distance = length(position_a.xyz - position_b.xyz); // Offset to compensate for moved clip positions. If removed dots on lines will slide when position a is ofscreen.