From 3fdce5b0576b5ffb3f42fc45df34ec842787bdca Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 29 Apr 2020 09:29:13 +0200 Subject: [PATCH 1/2] Don't compute light type --- .../Runtime/Lighting/LightLoop/LightLoop.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 390ab604361..39f6e8455dd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -2712,7 +2712,8 @@ bool PrepareLightsForGPU(CommandBuffer cmd, HDCamera hdCamera, CullingResults cu internal void ReserveCookieAtlasTexture(HDAdditionalLightData hdLightData, Light light, HDLightType lightType) { // Note: light component can be null if a Light is used for shuriken particle lighting. - switch (hdLightData.ComputeLightType(light)) + lightType = hdLightData == null ? HDLightType.Point : lightType; + switch (lightType) { case HDLightType.Directional: m_TextureCaches.lightCookieManager.ReserveSpace(hdLightData.surfaceTexture); From fef236d3a8efa925cb1fab2996f0238bd977c247 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 29 Apr 2020 09:39:25 +0200 Subject: [PATCH 2/2] Typo --- .../Runtime/Lighting/LightLoop/LightLoop.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index 39f6e8455dd..f208595d090 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -2712,7 +2712,7 @@ bool PrepareLightsForGPU(CommandBuffer cmd, HDCamera hdCamera, CullingResults cu internal void ReserveCookieAtlasTexture(HDAdditionalLightData hdLightData, Light light, HDLightType lightType) { // Note: light component can be null if a Light is used for shuriken particle lighting. - lightType = hdLightData == null ? HDLightType.Point : lightType; + lightType = light == null ? HDLightType.Point : lightType; switch (lightType) { case HDLightType.Directional: