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
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
- Group Node name text is way smaller in the renaming state than the actual display size
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