@@ -1191,7 +1191,7 @@ internal void GetDirectionalLightData(CommandBuffer cmd, HDCamera hdCamera, Visi
1191
1191
1192
1192
var lightData = new DirectionalLightData ( ) ;
1193
1193
1194
- lightData . lightLayers = additionalLightData . GetLightLayers ( ) ;
1194
+ lightData . lightLayers = hdCamera . frameSettings . IsEnabled ( FrameSettingsField . LightLayers ) ? additionalLightData . GetLightLayers ( ) : uint . MaxValue ;
1195
1195
1196
1196
// Light direction for directional is opposite to the forward direction
1197
1197
lightData . forward = light . GetForward ( ) ;
@@ -1343,7 +1343,7 @@ internal void GetLightData(CommandBuffer cmd, HDCamera hdCamera, HDShadowSetting
1343
1343
var lightType = processedData . lightType ;
1344
1344
1345
1345
var visibleLightAxisAndPosition = light . GetAxisAndPosition ( ) ;
1346
- lightData . lightLayers = additionalLightData . GetLightLayers ( ) ;
1346
+ lightData . lightLayers = hdCamera . frameSettings . IsEnabled ( FrameSettingsField . LightLayers ) ? additionalLightData . GetLightLayers ( ) : uint . MaxValue ;
1347
1347
1348
1348
lightData . lightType = gpuLightType ;
1349
1349
@@ -1840,7 +1840,7 @@ internal bool GetEnvLightData(CommandBuffer cmd, HDCamera hdCamera, in Processed
1840
1840
return false ;
1841
1841
1842
1842
InfluenceVolume influence = probe . influenceVolume ;
1843
- envLightData . lightLayers = probe . lightLayersAsUInt ;
1843
+ envLightData . lightLayers = hdCamera . frameSettings . IsEnabled ( FrameSettingsField . LightLayers ) ? probe . lightLayersAsUInt : uint . MaxValue ;
1844
1844
envLightData . influenceShapeType = influence . envShape ;
1845
1845
envLightData . weight = processedProbe . weight ;
1846
1846
envLightData . multiplier = probe . multiplier * m_indirectLightingController . indirectSpecularIntensity . value ;
0 commit comments