Skip to content

Commit 7ae3c94

Browse files
ChristopherBiscardimockersf
authored andcommitted
view.inverse_clip_from_world should be world_from_clip (#13756)
As per the other changes in #13489 `view.inverse_clip_from_world` should be `world_from_clip`. # Objective fixes #13749 ## Solution Modified lines.wgsl to use the right name as the current name does not exist. ## Testing I ran the 3d_gizmos example and pressed "p". ![screenshot-2024-06-08-at-13 21 22@2x](https://github.com/bevyengine/bevy/assets/551247/b8bfd3db-8273-4606-9dae-040764339883) ![screenshot-2024-06-08-at-13 21 26@2x](https://github.com/bevyengine/bevy/assets/551247/2619f1ae-ce83-44d7-a9fc-07e686950887)
1 parent b14684e commit 7ae3c94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_gizmos/src/lines.wgsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ fn vertex(vertex: VertexInput) -> VertexOutput {
7474
let near_clipping_plane_height = length(pos0.xyz - pos1.xyz);
7575

7676
// We can't use vertex.position_X because we may have changed the clip positions with clip_near_plane
77-
let position_a = view.inverse_clip_from_world * clip_a;
78-
let position_b = view.inverse_clip_from_world * clip_b;
77+
let position_a = view.world_from_clip * clip_a;
78+
let position_b = view.world_from_clip * clip_b;
7979
let world_distance = length(position_a.xyz - position_b.xyz);
8080

8181
// Offset to compensate for moved clip positions. If removed dots on lines will slide when position a is ofscreen.

0 commit comments

Comments
 (0)