Add layer masking for PostFxVolume against Camera's RenderLayersMask

#2573
This commit is contained in:
Wojtek Figat
2024-05-08 22:42:35 +02:00
parent f04926ad94
commit 7018666a8c

View File

@@ -33,7 +33,7 @@ void PostFxVolume::Collect(RenderContext& renderContext)
}
}
if (weight > ZeroTolerance)
if (weight > ZeroTolerance && renderContext.View.RenderLayersMask.HasLayer(GetLayer()))
{
const float totalSizeSqrt = (_transform.Scale * _size).LengthSquared();
renderContext.List->AddSettingsBlend((IPostFxSettingsProvider*)this, weight, _priority, totalSizeSqrt);