bevy/crates/bevy_pbr/src
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
..
render Shader defs can now have a value (#5900) 2022-11-21 22:38:29 +00:00
alpha.rs add ReflectAsset and ReflectHandle (#5923) 2022-10-28 20:42:33 +00:00
bundle.rs Visibilty Inheritance, universal ComputedVisibility and RenderLayers support (#5310) 2022-07-15 23:24:42 +00:00
lib.rs Add try_* to add_slot_edge, add_node_edge (#6720) 2022-11-21 21:58:39 +00:00
light.rs Reflect for Tonemapping and ClusterConfig (#6488) 2022-11-07 19:44:17 +00:00
material.rs Fix color banding by dithering image before quantization (#5264) 2022-11-11 19:43:45 +00:00
pbr_material.rs Shader defs can now have a value (#5900) 2022-11-21 22:38:29 +00:00
wireframe.rs separate tonemapping and upscaling passes (#3425) 2022-10-26 20:13:59 +00:00