bevy/pipelined/bevy_render2/src/render_resource
Robert Swain 02b8a782e5 bevy_render2: Add support for #else for shader defs (#3206)
# Objective

- Add support for `#else` for shader defs

## Solution

- When entering a scope with `#ifdef` or `#ifndef`, if the parent scope is truthy, and the shader definition is also truthy, then the a new scope is pushed onto the scope stack that is also truthy, else falsy. When encountering a subsequent else clause within a scope, if the parent is truthy and the current scope is truthy, then it should become falsy. If the parent scope is truthy and the current scope is falsy then it should become truthy. If the parent scope is falsy, then the current scope should remain falsy as the parent scope takes precedent.
- I added a simple test for an else case.
2021-12-02 03:27:13 +00:00
..
bind_group.rs Document the new pipelined renderer (#3094) 2021-11-16 03:37:48 +00:00
bind_group_layout.rs Pipeline Specialization, Shader Assets, and Shader Preprocessing (#3031) 2021-10-28 19:07:47 +00:00
buffer.rs bevy_pbr2: Add support for most of the StandardMaterial textures (#4) 2021-07-24 16:43:37 -07:00
buffer_vec.rs Sprite Batching (#3060) 2021-11-04 20:28:53 +00:00
mod.rs Added missing wgpu image render resources. (#3171) 2021-11-22 19:49:48 +00:00
pipeline.rs Document the new pipelined renderer (#3094) 2021-11-16 03:37:48 +00:00
pipeline_cache.rs Shader Imports. Decouple Mesh logic from PBR (#3137) 2021-11-18 03:45:02 +00:00
pipeline_specializer.rs Pipeline Specialization, Shader Assets, and Shader Preprocessing (#3031) 2021-10-28 19:07:47 +00:00
shader.rs bevy_render2: Add support for #else for shader defs (#3206) 2021-12-02 03:27:13 +00:00
texture.rs Document the new pipelined renderer (#3094) 2021-11-16 03:37:48 +00:00
uniform_vec.rs Update vendored Crevice to 0.8.0 + PR for arrays (#3059) 2021-11-12 01:39:25 +00:00