bevy/examples/shader
François Mockers 3945a6de3b
Fix wesl in wasm and webgl2 (#18591)
# Objective

- feature `shader_format_wesl` doesn't compile in Wasm
- once fixed, example `shader_material_wesl` doesn't work in WebGL2

## Solution

- remove special path handling when loading shaders. this seems like a
way to escape the asset folder which we don't want to allow, and can't
compile on android or wasm, and can't work on iOS (filesystem is rooted
there)
- pad material so that it's 16 bits. I couldn't get conditional
compilation to work in wesl for type declaration, it fails to parse
- the shader renders the color `(0.0, 0.0, 0.0, 0.0)` when it's not a
polka dot. this renders as black on WebGPU/metal/..., and white on
WebGL2. change it to `(0.0, 0.0, 0.0, 1.0)` so that it's black
everywhere
2025-03-28 21:45:02 +00:00
..
animate_shader.rs
array_texture.rs
automatic_instancing.rs
compute_shader_game_of_life.rs
custom_phase_item.rs
custom_post_processing.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
custom_render_phase.rs Retain skins from frame to frame. (#17818) 2025-02-18 00:56:04 +00:00
custom_shader_instancing.rs
custom_vertex_attribute.rs
extended_material.rs
fallback_image.rs
gpu_readback.rs
shader_defs.rs
shader_material_2d.rs
shader_material_bindless.rs Use global binding arrays for bindless resources. (#17898) 2025-02-21 05:55:36 +00:00
shader_material_glsl.rs
shader_material_screenspace_texture.rs
shader_material_wesl.rs Fix wesl in wasm and webgl2 (#18591) 2025-03-28 21:45:02 +00:00
shader_material.rs
shader_prepass.rs Update shader_prepass, testbed_2d, and first_person_view_model examples to use children! macro (#18270) 2025-03-22 22:35:20 +00:00
specialized_mesh_pipeline.rs Combine output_index and indirect_parameters_index into one field in PreprocessWorkItem. (#17853) 2025-02-13 20:10:14 +00:00
storage_buffer.rs
texture_binding_array.rs