bevy/crates/bevy_render
Edgar Geier e4fd25a952 Only execute #define if current scope is accepting lines (#7798)
# Objective

While working on #7784, I noticed that a `#define VAR` in a `.wgsl` file is always effective, even if it its scope is not accepting lines. 

Example:
```c
#define A
#ifndef A
#define B
#endif
```

Currently, `B` will be defined although it shouldn't. This PR fixes that. 

## Solution

Move the branch responsible for `#define` lines into the last else branch, which is only evaluated if the current scope is accepting lines.
2023-02-24 02:44:28 +00:00
..
macros Support raw buffers in AsBindGroup macro (#7701) 2023-02-22 22:43:29 +00:00
src Only execute #define if current scope is accepting lines (#7798) 2023-02-24 02:44:28 +00:00
Cargo.toml Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00