bevy/assets/shaders
Rob Parrett e1e2407091
Fix post_processing example on webgl2 (#9361)
# Objective

The `post_processing` example is currently broken when run with webgl2.

```
cargo run --example post_processing --target=wasm32-unknown-unknown
```

```
wasm.js:387 panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `post_process_pipeline`
    In the provided shader, the type given for group 0 binding 2 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.
```

I bisected the breakage to c7eaedd6a1.

## Solution

Add padding when using webgl2
2023-08-04 17:44:29 +00:00
..
animate_shader.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
array_texture.wgsl fix prepass normal_mapping (#8978) 2023-06-29 00:28:34 +00:00
cubemap_unlit.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
custom_gltf_2d.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
custom_material.frag improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
custom_material.vert custom_material.vert: gl_InstanceIndex includes gl_BaseInstance (#9326) 2023-08-01 08:02:16 +00:00
custom_material.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
custom_material_screenspace_texture.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
custom_vertex_attribute.wgsl Use GpuArrayBuffer for MeshUniform (#9254) 2023-07-30 13:17:08 +00:00
fallback_image_test.wgsl Fix fallback_image example (#8968) 2023-06-27 18:08:02 +00:00
game_of_life.wgsl Remove unused code in game of life shader (#5349) 2022-07-17 15:24:24 +00:00
instancing.wgsl Use GpuArrayBuffer for MeshUniform (#9254) 2023-07-30 13:17:08 +00:00
line_material.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
post_processing.wgsl Fix post_processing example on webgl2 (#9361) 2023-08-04 17:44:29 +00:00
shader_defs.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
show_prepass.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
texture_binding_array.wgsl improve shader import model (#5703) 2023-06-27 00:29:22 +00:00
tonemapping_test_patterns.wgsl Include tone_mapping fn in tonemapping_test_patterns (#9084) 2023-07-31 18:59:04 +00:00