bevy/crates
Waridley 9d420b435a
Pad SkyUniforms to 16 bytes for WASM (#12078)
# 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:


d31de3f139/crates/bevy_render/src/globals.rs (L59-L60)

I've added 3 conditional fields to `SkyboxUniforms`.
2024-02-24 07:46:00 +00:00
..
bevy_a11y Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_animation Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_app fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_asset Improve file watcher error msg (#12060) 2024-02-23 17:39:33 +00:00
bevy_audio Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_color bevy_color: Created a private trait StandardColor (#12072) 2024-02-24 03:04:03 +00:00
bevy_core Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_core_pipeline Pad SkyUniforms to 16 bytes for WASM (#12078) 2024-02-24 07:46:00 +00:00
bevy_derive Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_diagnostic Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_dylib Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_dynamic_plugin Document all members of bevy_dynamic_plugin (#12029) 2024-02-22 13:28:52 +00:00
bevy_ecs fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_ecs_compile_fail_tests Remove APIs deprecated in 0.13 (#11974) 2024-02-19 19:04:47 +00:00
bevy_encase_derive Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_gilrs Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_gizmos fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_gltf Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_hierarchy Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_input fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_internal Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_log Remove unnecessary wildcards from LogPlugin and convert warnings to errors. (#12046) 2024-02-23 18:49:32 +00:00
bevy_macro_utils fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_mikktspace fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_pbr Make more things pub in the renderer (#12053) 2024-02-23 06:13:37 +00:00
bevy_ptr Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_reflect fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_reflect_compile_fail_tests bevy_reflect_derive: Clean up attribute logic (#11777) 2024-02-12 15:16:27 +00:00
bevy_render set pipeline to queued when shader is not yet available (#12051) 2024-02-23 07:14:09 +00:00
bevy_scene Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_sprite Fixed Ui Image slicing (#12047) 2024-02-23 01:08:32 +00:00
bevy_tasks Loosen lifetime requirements for single-threaded Scope::spawn to match the multi-threaded version. (#12073) 2024-02-24 06:01:34 +00:00
bevy_text Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_time Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_transform Fix taplo CI - toml fmt (#12037) 2024-02-22 18:13:45 +00:00
bevy_ui Fixed Ui Image slicing (#12047) 2024-02-23 01:08:32 +00:00
bevy_utils fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_window Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_winit Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00