Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3d_gizmos example perspective change shader breaks #13749

Closed
ChristopherBiscardi opened this issue Jun 8, 2024 · 1 comment · Fixed by #13756
Closed

3d_gizmos example perspective change shader breaks #13749

ChristopherBiscardi opened this issue Jun 8, 2024 · 1 comment · Fixed by #13756
Labels
A-Gizmos Visual editor and debug gizmos C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Shaders This code uses GPU shader languages D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@ChristopherBiscardi
Copy link
Contributor

Bevy version

0.14.0-rc.2 (commit 3bfc427)

[Optional] Relevant system information

AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }

What you did

cargo run --example 3d_gizmos

hit "p" to change line perspective

What went wrong

2024-06-08T15:46:23.279131Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader:
error: invalid field accessor `inverse_clip_from_world`
   ┌─ crates/bevy_gizmos/src/lines.wgsl:77:27
   │
77 │     let position_a = view.inverse_clip_from_world * clip_a;
   │                           ^^^^^^^^^^^^^^^^^^^^^^^ invalid accessor
   │
   = invalid field accessor `inverse_clip_from_world`


2024-06-08T15:46:23.279235Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader:
error: invalid field accessor `inverse_clip_from_world`
   ┌─ crates/bevy_gizmos/src/lines.wgsl:77:27
   │
77 │     let position_a = view.inverse_clip_from_world * clip_a;
   │                           ^^^^^^^^^^^^^^^^^^^^^^^ invalid accessor
   │
   = invalid field accessor `inverse_clip_from_world`
@ChristopherBiscardi ChristopherBiscardi added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jun 8, 2024
@alice-i-cecile alice-i-cecile added C-Examples An addition or correction to our examples A-Gizmos Visual editor and debug gizmos and removed S-Needs-Triage This issue needs to be labelled labels Jun 8, 2024
@alice-i-cecile
Copy link
Member

I'm pretty sure this is just #13489 fault.

@alice-i-cecile alice-i-cecile added S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Straightforward Simple bug fixes and API improvements, docs, test and examples D-Shaders This code uses GPU shader languages labels Jun 8, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 9, 2024
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)
mockersf pushed a commit that referenced this issue Jun 9, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Gizmos Visual editor and debug gizmos C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Shaders This code uses GPU shader languages D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants