Search Issue Tracker
By Design
Votes
0
Found in
6000.1.0a7
Issue ID
UUM-90451
Regression
Yes
Fog removes shadows and lighting from the scene when enabled via script
Reproduction steps:
1. Open the attached project “IN-90253“
2. Build&Run the Player
3. Observe the result in the Player
Expected result: The fog is applied naturally, view distance is reduced
Actual result: The fog removes all shadows and light sources from all objects in the world no matter the distance, and paints all objects in a color of the fog
Reproducible in: 6000.1.0a2, 6000.1.0a7
Not reproducible in: 2021.3.46f1, 2022.3.54f1, 6000.0.30f1, 6000.1.0a1
Reproducible on: macOS 14.6.1 (M1 Pro), Windows 10
Not reproducible on: No other environments tested
Notes:
- Reproducible only when fog is enabled from a script (in the project, the fog is enabled in “Start“ method of “CamController“ script). Enabling fog through Window → Rendering → Lighting in Environment tab does not produce the actual result
- Setting fog density doesn’t change the behaviour
- Reproducible only in Player
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Warnings in the Bug Reporter window are cut off and not truncated when the Bug Reporter window is resized to its minimum size
- Color is incorrectly applied to objects when initialized with non-normalized parameters
- SerializationUtility.GetManagedReferencesWithMissingTypes() don't return null when “Prefab has missing SerializeReference Types“ warning banner is present
- Memory leak when VFX Graph is open and Camera has "Target Texture" enabled
- The Canvas component's warning box is missing an apostrophe when Additional Shader Channels is set to "Normal" and "Tangent" with Render Mode set to "Screen Space - Overlay"
Resolution Note:
Hello
Starting in 6.1, Fog cannot be configured at runtime by default. This is a tradeoff we've made in order to reduce shader variants and build times.
If you wish to change this behavior, you can set k_DynamicBranchFogKeyword to 1 in the URP config package (this is not documented yet). More info on the config package here: https://docs.unity3d.com/6000.0/Documentation/Manual/urp/URP-Config-Package.html
Let me know if you're still experience problems with this.
- Mikkel