Skip to content

Commit 0d92f08

Browse files
Disable Atmospheric Scattering when Scene Lighting is Disabled (#6328)
* Disable atmospheric scattering for matcap debug lighting mode * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent 3b92e91 commit 0d92f08

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3838
- Fixed debug window reset.
3939
- Fixed camera bridge action in release build (case 1367866).
4040
- Fixed contact shadow disappearing when shadowmask is used and no non-static object is available.
41+
- Fixed atmospheric scattering being incorrectly enabled when scene lighting is disabled.
4142

4243
### Changed
4344
- Optimizations for the physically based depth of field.

com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ void EvaluateAtmosphericScattering(PositionInputs posInput, float3 V, out float3
257257

258258
#ifdef DEBUG_DISPLAY
259259
// Don't sample atmospheric scattering when lighting debug more are enabled so fog is not visible
260-
if (_DebugLightingMode >= DEBUGLIGHTINGMODE_DIFFUSE_LIGHTING && _DebugLightingMode <= DEBUGLIGHTINGMODE_EMISSIVE_LIGHTING)
260+
if (_DebugLightingMode == DEBUGLIGHTINGMODE_MATCAP_VIEW || (_DebugLightingMode >= DEBUGLIGHTINGMODE_DIFFUSE_LIGHTING && _DebugLightingMode <= DEBUGLIGHTINGMODE_EMISSIVE_LIGHTING))
261261
return;
262262

263263
if (_DebugShadowMapMode == SHADOWMAPDEBUGMODE_SINGLE_SHADOW || _DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER || _DebugLightingMode == DEBUGLIGHTINGMODE_LUMINANCE_METER)

0 commit comments

Comments
 (0)