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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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