bevy/crates/bevy_render/src/render_resource
François d44e86507f Shader defs can now have a value (#5900)
# Objective

- shaders defs can now have a `bool` or `int` value
- `#if SHADER_DEF <operator> 3`
  - ok if `SHADER_DEF` is defined, has the correct type and pass the comparison
  - `==`, `!=`, `>=`, `>`, `<`, `<=` supported
- `#SHADER_DEF` or `#{SHADER_DEF}`
  - will be replaced by the value in the shader code
---

## Migration Guide

- replace `shader_defs.push(String::from("NAME"));` by `shader_defs.push("NAME".into());`
- if you used shader def `NO_STORAGE_BUFFERS_SUPPORT`, check how `AVAILABLE_STORAGE_BUFFER_BINDINGS` is now used in Bevy default shaders
2022-11-21 22:38:29 +00:00
..
bind_group_layout.rs improve compile time by type-erasing wgpu structs (#5950) 2022-11-18 22:04:23 +00:00
bind_group.rs improve compile time by type-erasing wgpu structs (#5950) 2022-11-18 22:04:23 +00:00
buffer_vec.rs remove copyless (#6100) 2022-09-27 18:11:40 +00:00
buffer.rs improve compile time by type-erasing wgpu structs (#5950) 2022-11-18 22:04:23 +00:00
mod.rs improve compile time by type-erasing wgpu structs (#5950) 2022-11-18 22:04:23 +00:00
pipeline_cache.rs Shader defs can now have a value (#5900) 2022-11-21 22:38:29 +00:00
pipeline_specializer.rs Add TextureFormat::Rg16Unorm support for Image and derive Resource for SpecializedComputePipelines (#5991) 2022-09-15 15:57:04 +00:00
pipeline.rs Shader defs can now have a value (#5900) 2022-11-21 22:38:29 +00:00
resource_macros.rs improve compile time by type-erasing wgpu structs (#5950) 2022-11-18 22:04:23 +00:00
shader.rs Shader defs can now have a value (#5900) 2022-11-21 22:38:29 +00:00
storage_buffer.rs add a debug label to storage buffers (#5341) 2022-07-28 20:37:49 +00:00
texture.rs improve compile time by type-erasing wgpu structs (#5950) 2022-11-18 22:04:23 +00:00
uniform_buffer.rs add a debug label to storage buffers (#5341) 2022-07-28 20:37:49 +00:00