From 472b4e4ebf39544247cc6a55608ca2f0dd939b8b Mon Sep 17 00:00:00 2001 From: Matias Lavik Date: Fri, 22 Mar 2024 19:47:47 +0100 Subject: [PATCH] Don't update shadow volumes during unsupported render modes --- Assets/Scripts/Lighting/ShadowVolumeManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Scripts/Lighting/ShadowVolumeManager.cs b/Assets/Scripts/Lighting/ShadowVolumeManager.cs index 76ae25f4..e4c6c928 100644 --- a/Assets/Scripts/Lighting/ShadowVolumeManager.cs +++ b/Assets/Scripts/Lighting/ShadowVolumeManager.cs @@ -119,6 +119,12 @@ private void HandleUpdate() cooldown -= Time.deltaTime; return; } + + if (volumeRenderedObject.GetRenderMode() != RenderMode.DirectVolumeRendering) + { + return; + } + lightDirection = -GetLightDirection(volumeRenderedObject); if (currentDispatchIndex == 0)