bevy/crates/bevy_pbr/src
IceSentry 5134272dc9
Make FOG_ENABLED a shader_def instead of material flag (#13783)
# Objective

- If the fog is disabled it still generates a useless branch which can
hurt performance

## Solution

- Make the flag a shader_def instead

## Testing

- I tested enabling/disabling fog works as expected per-material in the
fog example
- I also tested that scenes that don't add the FogSettings resource
still work correctly

## Review notes

I'm not sure how to handle the removed material flag. Right now I just
commented it out and added a not to reuse it instead of creating a new
one.
2024-06-10 13:26:43 +00:00
..
cluster Rename "point light" to "clusterable object" in cluster contexts. (#13654) 2024-06-04 11:01:13 +00:00
deferred Make FOG_ENABLED a shader_def instead of material flag (#13783) 2024-06-10 13:26:43 +00:00
light Rename "point light" to "clusterable object" in cluster contexts. (#13654) 2024-06-04 11:01:13 +00:00
light_probe Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
lightmap Generate MeshUniforms on the GPU via compute shader where available. (#12773) 2024-04-10 05:33:32 +00:00
meshlet Meshlet misc (#13761) 2024-06-10 13:06:08 +00:00
prepass Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
render Make FOG_ENABLED a shader_def instead of material flag (#13783) 2024-06-10 13:26:43 +00:00
ssao Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
ssr Implement opt-in sharp screen-space reflections for the deferred renderer, with improved raymarching code. (#13418) 2024-05-27 13:43:40 +00:00
volumetric_fog Adds back in way to convert color to u8 array, implemented for the two RGB color types, also renames Color::linear to Color::to_linear. (#13759) 2024-06-10 13:03:46 +00:00
bundle.rs Implement clone for most bundles. (#12993) 2024-04-16 16:37:09 +00:00
extended_material.rs Add missing Default impl to ExtendedMaterial. (#13008) 2024-04-18 12:57:14 +00:00
fog.rs Adds back in way to convert color to u8 array, implemented for the two RGB color types, also renames Color::linear to Color::to_linear. (#13759) 2024-06-10 13:03:46 +00:00
lib.rs Meshlet misc (#13761) 2024-06-10 13:06:08 +00:00
material.rs Implement motion vectors and TAA for skinned meshes and meshes with morph targets. (#13572) 2024-05-31 17:02:28 +00:00
parallax.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
pbr_material.rs Make FOG_ENABLED a shader_def instead of material flag (#13783) 2024-06-10 13:26:43 +00:00
wireframe.rs Use WireframeColor to override global color (#13034) 2024-04-20 13:59:12 +00:00