bevy/crates/bevy_render/src
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
..
camera Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00
color Fix clippy clamp warning (#7697) 2023-02-16 02:13:25 +00:00
mesh Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
primitives Derive Copy for Aabb (#7401) 2023-01-30 18:27:58 +00:00
render_graph Use position in code when possible (#7621) 2023-02-11 08:28:14 +00:00
render_phase implement TypeUuid for primitives and fix multiple-parameter generics having the same TypeUuid (#6633) 2023-02-16 17:09:44 +00:00
render_resource Only execute #define if current scope is accepting lines (#7798) 2023-02-24 02:44:28 +00:00
renderer Wgpu 0.15 (#7356) 2023-01-29 20:27:30 +00:00
texture Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
view Fix some more typos (#7767) 2023-02-20 23:36:28 +00:00
extract_component.rs Migrate engine to Schedule v3 (#7267) 2023-02-06 02:04:50 +00:00
extract_param.rs Migrate engine to Schedule v3 (#7267) 2023-02-06 02:04:50 +00:00
extract_resource.rs Migrate engine to Schedule v3 (#7267) 2023-02-06 02:04:50 +00:00
globals.rs Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
lib.rs Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
pipelined_rendering.rs Rename schedule v3 to schedule (#7519) 2023-02-06 18:44:40 +00:00
render_asset.rs fix ambiguities in render schedule (#7725) 2023-02-20 00:16:47 +00:00
settings.rs add OpenGL and DX11 backends (#7481) 2023-02-04 23:20:20 +00:00
spatial_bundle.rs enum Visibility component (#6320) 2022-12-25 00:39:29 +00:00