-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Pad SkyUniforms to 16 bytes for WASM #12078
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice-i-cecile
approved these changes
Feb 24, 2024
JMS55
approved these changes
Feb 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I always forget this rule, thanks for fixing it.
james7132
approved these changes
Feb 24, 2024
msvbg
pushed a commit
to msvbg/bevy
that referenced
this pull request
Feb 26, 2024
# Objective Fixes Skyboxes on WebGL, which broke in Bevy 0.13 due to the addition of the `brightness` uniform, when previously the skybox pipeline only had view and global uniforms. ```ignore panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:3009:5: wgpu error: Validation Error Caused by: In Device::create_render_pipeline note: label = `skybox_pipeline` In the provided shader, the type given for group 0 binding 3 has a size of 4. As the device does not support `DownlevelFlags::BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`, the type must have a size that is a multiple of 16 bytes. ``` It would be nice if this could be backported to a 0.13.1 patch as well if possible. I'm needing to rely on my own fork for now. ## Solution Similar to the Globals uniform solution here: https://github.com/bevyengine/bevy/blob/d31de3f1398080661a83a04dcbdd31a7ee9fa76e/crates/bevy_render/src/globals.rs#L59-L60 I've added 3 conditional fields to `SkyboxUniforms`.
msvbg
pushed a commit
to msvbg/bevy
that referenced
this pull request
Feb 26, 2024
# Objective Fixes Skyboxes on WebGL, which broke in Bevy 0.13 due to the addition of the `brightness` uniform, when previously the skybox pipeline only had view and global uniforms. ```ignore panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:3009:5: wgpu error: Validation Error Caused by: In Device::create_render_pipeline note: label = `skybox_pipeline` In the provided shader, the type given for group 0 binding 3 has a size of 4. As the device does not support `DownlevelFlags::BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`, the type must have a size that is a multiple of 16 bytes. ``` It would be nice if this could be backported to a 0.13.1 patch as well if possible. I'm needing to rely on my own fork for now. ## Solution Similar to the Globals uniform solution here: https://github.com/bevyengine/bevy/blob/d31de3f1398080661a83a04dcbdd31a7ee9fa76e/crates/bevy_render/src/globals.rs#L59-L60 I've added 3 conditional fields to `SkyboxUniforms`.
mockersf
pushed a commit
that referenced
this pull request
Feb 27, 2024
# Objective Fixes Skyboxes on WebGL, which broke in Bevy 0.13 due to the addition of the `brightness` uniform, when previously the skybox pipeline only had view and global uniforms. ```ignore panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:3009:5: wgpu error: Validation Error Caused by: In Device::create_render_pipeline note: label = `skybox_pipeline` In the provided shader, the type given for group 0 binding 3 has a size of 4. As the device does not support `DownlevelFlags::BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`, the type must have a size that is a multiple of 16 bytes. ``` It would be nice if this could be backported to a 0.13.1 patch as well if possible. I'm needing to rely on my own fork for now. ## Solution Similar to the Globals uniform solution here: https://github.com/bevyengine/bevy/blob/d31de3f1398080661a83a04dcbdd31a7ee9fa76e/crates/bevy_render/src/globals.rs#L59-L60 I've added 3 conditional fields to `SkyboxUniforms`.
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
O-WebGL2
Specific to the WebGL2 render API
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Fixes Skyboxes on WebGL, which broke in Bevy 0.13 due to the addition of the
brightness
uniform, when previously the skybox pipeline only had view and global uniforms.It would be nice if this could be backported to a 0.13.1 patch as well if possible. I'm needing to rely on my own fork for now.
Solution
Similar to the Globals uniform solution here:
bevy/crates/bevy_render/src/globals.rs
Lines 59 to 60 in d31de3f
I've added 3 conditional fields to
SkyboxUniforms
.