![]() # 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. |
||
---|---|---|
.. | ||
cluster | ||
deferred | ||
light | ||
light_probe | ||
lightmap | ||
meshlet | ||
prepass | ||
render | ||
ssao | ||
ssr | ||
volumetric_fog | ||
bundle.rs | ||
extended_material.rs | ||
fog.rs | ||
lib.rs | ||
material.rs | ||
parallax.rs | ||
pbr_material.rs | ||
wireframe.rs |