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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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