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
- Search: Inspector section icon is less sharp/more pixelated than other editor icons
- Search description string is always truncated
- [VFX] When Grouped Nodes are converted to Subgraph Operator resulting Graph Node is not included in the Group
- Search window icons are less sharp/more pixelated than other editor icons
- The Inspector can be covered when scaling the horizontal separator bar
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