bevy/crates/bevy_core_pipeline/src
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
..
blit resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bloom Rename Core Render Graph Labels (#11882) 2024-02-15 23:15:16 +00:00
contrast_adaptive_sharpening fix some typos (#12038) 2024-02-22 18:55:22 +00:00
core_2d fix some typos (#12038) 2024-02-22 18:55:22 +00:00
core_3d rename Camera3dBundle's 'dither' field to 'deband_dither' to align with Camera2dBundle (#11939) 2024-02-19 14:01:35 +00:00
deferred Multithreaded render command encoding (#9172) 2024-02-09 07:35:35 +00:00
fullscreen_vertex_shader Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
fxaa Rename Core Render Graph Labels (#11882) 2024-02-15 23:15:16 +00:00
prepass Multithreaded render command encoding (#9172) 2024-02-09 07:35:35 +00:00
skybox Pad SkyUniforms to 16 bytes for WASM (#12078) 2024-02-24 07:46:00 +00:00
taa Rename Core Render Graph Labels (#11882) 2024-02-15 23:15:16 +00:00
tonemapping mipmap levels can be 0 and they should be interpreted as 1 (#11767) 2024-02-11 22:00:07 +00:00
upscaling Async pipeline compilation (#10812) 2024-02-05 13:50:50 +00:00
lib.rs Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
msaa_writeback.rs Rename Core Render Graph Labels (#11882) 2024-02-15 23:15:16 +00:00