From 76de8c21ce5ec964638af67374a1598774f58976 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 1 Jul 2020 17:39:05 +0200 Subject: [PATCH 1/4] Update base light area size. --- .../Editor/Lighting/HDLightUI.Handles.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs index 72c1b4fc0d5..be67dbe653f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs @@ -662,6 +662,9 @@ public static void DrawHandles(HDAdditionalLightData additionalData, Editor owne { additionalData.shapeHeight = widthHeight.y; } + + light.areaSize = new Vector2(additionalData.shapeWidth, additionalData.shapeHeight); + light.range = range; } From 03043220c999d79ae740aec2f6cc3ff59b5cb180 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 1 Jul 2020 17:40:15 +0200 Subject: [PATCH 2/4] changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 3ba6d103cd1..64eafe26b9c 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -703,6 +703,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Change transparent SSR name in frame settings to avoid clipping. - Fixed fallback for ray tracing and light layers (1258837). - Fixed missing include guards in shadow hlsl files. +- Fixed for area light not updating baked light result when modifying with gizmo. ### Changed - Improve MIP selection for decals on Transparents From 8c1f3d4d415b62d7133441c972f223b057a557f5 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 1 Jul 2020 17:42:51 +0200 Subject: [PATCH 3/4] Better change. --- .../Editor/Lighting/HDLightUI.Handles.cs | 2 -- .../Runtime/Lighting/Light/HDAdditionalLightData.cs | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs index be67dbe653f..5f7e3435a73 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs @@ -663,8 +663,6 @@ public static void DrawHandles(HDAdditionalLightData additionalData, Editor owne additionalData.shapeHeight = widthHeight.y; } - light.areaSize = new Vector2(additionalData.shapeWidth, additionalData.shapeHeight); - light.range = range; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index ada9de275ed..edfcb517910 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -2827,6 +2827,8 @@ void UpdateShapeSize() // Force to clamp the shape if we changed the type of the light shapeWidth = m_ShapeWidth; shapeHeight = m_ShapeHeight; + + legacyLight.areaSize = new Vector2(shapeWidth, shapeHeight); } /// From dddc1f3afd315b25d4a7362c9c33a215a9576187 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Wed, 1 Jul 2020 17:45:03 +0200 Subject: [PATCH 4/4] revert whitespace --- .../Editor/Lighting/HDLightUI.Handles.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs index 5f7e3435a73..72c1b4fc0d5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.Handles.cs @@ -662,7 +662,6 @@ public static void DrawHandles(HDAdditionalLightData additionalData, Editor owne { additionalData.shapeHeight = widthHeight.y; } - light.range = range; }