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

Fix gizmos in WebGPU #8910

Merged
merged 2 commits into from
Jun 22, 2023
Merged

Conversation

irate-devil
Copy link
Contributor

@irate-devil irate-devil commented Jun 21, 2023

Objective

Fix #8908.

Solution

Assign the vertex buffers twice with a single item offset instead of setting the array_stride lower than the vertex layout's size for linestrips.

@Selene-Amanita Selene-Amanita added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen O-Web Specific to web (WASM) builds labels Jun 21, 2023
Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

},
]
} else {
position_layout.array_stride *= 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even realize this was different. Now it's way more obvious 😆

Copy link
Member

@mockersf mockersf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me in webgpu, webgl2 and native

@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jun 21, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 22, 2023
Merged via the queue into bevyengine:main with commit bb59509 Jun 22, 2023
21 checks passed
@irate-devil irate-devil deleted the fix-instanced-gizmos branch June 23, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2d_gizmos and 3d_gizmos are broke in WebGPU
5 participants