2
0
Fork 0
mirror of https://github.com/bevyengine/bevy synced 2025-02-14 13:08:44 +00:00
bevy/crates/bevy_sprite
François d44e86507f Shader defs can now have a value ()
# 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
..
src Shader defs can now have a value () 2022-11-21 22:38:29 +00:00
Cargo.toml Release 0.9.0 () 2022-11-12 20:01:29 +00:00