From 549c63881f9940888f6d4a555926bbd2b624ae82 Mon Sep 17 00:00:00 2001 From: RSlysz Date: Tue, 27 Oct 2020 15:43:18 +0100 Subject: [PATCH 1/7] fix issue on dragging handle --- .../Editor/Material/Decal/DecalProjectorEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs index 2b9dd7f5acf..f39c8425bb7 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs @@ -393,7 +393,7 @@ public override void OnInspectorGUI() EditorGUILayout.PropertyField(m_SizeValues[2], k_ProjectionDepthContent); if (EditorGUI.EndChangeCheck()) { - m_SizeValues[2].floatValue = Mathf.Max(0, size[2]); + m_SizeValues[2].floatValue = Mathf.Max(0, m_SizeValues[2].floatValue); m_OffsetZ.floatValue = m_SizeValues[2].floatValue * 0.5f; } From cb41027b28d348bbde098f3a880f4ba56c7dad5a Mon Sep 17 00:00:00 2001 From: RSlysz Date: Tue, 27 Oct 2020 16:54:50 +0100 Subject: [PATCH 2/7] Update documentation --- .../Documentation~/Decal-Projector.md | 3 ++- .../Documentation~/Images/DecalProjector5.png | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md index cf0cfbee932..2ffa5ea66b8 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md @@ -35,7 +35,8 @@ Using the Inspector allows you to change all of the Decal Projector properties, | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | -| **Size** | The 3D size of the projector influence box, and thus the decal. The projector scales the decal to match the **X** and **Z** components of the **Size**. The Decal Projector component projects decals along the local y-axis. | +| **Size** | The 3D size of the projector influence box, and thus the decal along the projected plane. The projector scales the decal to match the **Width** (along local X-axis) and **Height** (along local Y-axis) components of the **Size**. | +| **Projection Depth** | The depth of the projector influence box. The projector scales the decal to match **Projection Depth**. The Decal Projector component projects decals along the local Z-axis. | | **Material** | The decal Material to project. The decal Material must use a HDRP/Decal Shader. | | **Decal Layer** | The layer that specifies the Materials to project the decal onto. Any Mesh Renderers or Terrain that uses a matching Decal Layer receives the decal. | | **Draw Distance** | The distance from the Camera to the Decal at which this projector stops projecting the decal and HDRP no longer renders the decal. | diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/DecalProjector5.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/DecalProjector5.png index c46d60cc557..4ca38d845d8 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Images/DecalProjector5.png +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/DecalProjector5.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:826e58ca1a65f980bc320a9fd7ca8f9d57527b9514b8f587046f4562c766b846 -size 13678 +oid sha256:f1521303080bc06ff09dc3e6e67c42afe113dcbca9fd5d708bebe59bf2751a54 +size 21831 From a74bb5ff708a969fb0948d08cb41af3acb9ccb12 Mon Sep 17 00:00:00 2001 From: RSlysz Date: Tue, 27 Oct 2020 16:55:22 +0100 Subject: [PATCH 3/7] Fix multiline issue with small sized inspector window --- .../Editor/Material/Decal/DecalProjectorEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs index f39c8425bb7..83dd589a586 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs @@ -375,7 +375,7 @@ public override void OnInspectorGUI() EditorGUILayout.Space(); - Rect rect = EditorGUILayout.GetControlRect(); + Rect rect = EditorGUILayout.GetControlRect(true, EditorGUI.GetPropertyHeight(SerializedPropertyType.Vector2, k_SizeContent)); EditorGUI.BeginProperty(rect, k_SizeSubContent[0], m_SizeValues[0]); EditorGUI.BeginProperty(rect, k_SizeSubContent[1], m_SizeValues[1]); float[] size = new float[2] { m_SizeValues[0].floatValue, m_SizeValues[1].floatValue }; From 6cf59e794ad0a3b3f37d31556c260f71a0e40ac9 Mon Sep 17 00:00:00 2001 From: RSlysz Date: Tue, 27 Oct 2020 17:07:04 +0100 Subject: [PATCH 4/7] Fix DecalProjector editor flickering while resizing Inspector window --- .../Editor/Material/Decal/DecalProjectorEditor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs index 83dd589a586..4c4d787f7a1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.cs @@ -418,9 +418,11 @@ public override void OnInspectorGUI() EditorGUILayout.PropertyField(m_FadeScaleProperty, k_FadeScaleContent); using (new EditorGUI.DisabledScope(!decalLayerEnabled)) { + EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_StartAngleFadeProperty, k_StartAngleFadeContent); if (EditorGUI.EndChangeCheck() && m_StartAngleFadeProperty.floatValue > m_EndAngleFadeProperty.floatValue) m_EndAngleFadeProperty.floatValue = m_StartAngleFadeProperty.floatValue; + EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_EndAngleFadeProperty, k_EndAngleFadeContent); if (EditorGUI.EndChangeCheck() && m_EndAngleFadeProperty.floatValue < m_StartAngleFadeProperty.floatValue) From 8a91078faf23c4505636046e06883f13c0e7f84a Mon Sep 17 00:00:00 2001 From: RSlysz Date: Tue, 27 Oct 2020 17:39:11 +0100 Subject: [PATCH 5/7] Side fix DensityVolume error on selection --- .../Lighting/VolumetricLighting/DensityVolumeEditor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/DensityVolumeEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/DensityVolumeEditor.cs index 0ab9eb16bac..4ae40c4d1ce 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/DensityVolumeEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/DensityVolumeEditor.cs @@ -79,6 +79,12 @@ static Vector3 BlendSize(DensityVolume densityVolume) [DrawGizmo(GizmoType.Selected|GizmoType.Active)] static void DrawGizmosSelected(DensityVolume densityVolume, GizmoType gizmoType) { + if (s_BlendBox == null || s_BlendBox.Equals(null) + || s_ShapeBox == null || s_ShapeBox.Equals(null)) + return; + + Debug.Log(gizmoType); + using (new Handles.DrawingScope(Matrix4x4.TRS(densityVolume.transform.position, densityVolume.transform.rotation, Vector3.one))) { // Blend box From e3e3a01bafa39e1736a5aeb6a3478f74f8c2b870 Mon Sep 17 00:00:00 2001 From: RSlysz Date: Wed, 28 Oct 2020 10:07:10 +0100 Subject: [PATCH 6/7] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7c04adff75e..599382fae30 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -51,6 +51,10 @@ The version number for this package has increased due to a version update of a r - Fixed issue when null parameters in a volume component would spam null reference errors. Produce a warning instead. - Fix volument component creation via script. - Fixed GC allocs in render graph. +- Fixed issue when dragging slider in inspector for ProjectionDepth. +- Fixed issue when resizing Inspector window that make the DecalProjector editor flickers. +- Fixed issue in DecalProjector editor when the Inspector window have a too small width: the size appears on 2 lines but the editor not let place for the second one. +- Fixed issue (null reference in console) when selecting a DensityVolume with rectangle selection. ### Changed - Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass. From 2501377ddcd842bf8c973e62beb148816597fac8 Mon Sep 17 00:00:00 2001 From: RSlysz Date: Wed, 28 Oct 2020 10:11:50 +0100 Subject: [PATCH 7/7] Update Decal-Projector.md --- .../Documentation~/Decal-Projector.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md index 2ffa5ea66b8..ef13a409ac8 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Decal-Projector.md @@ -35,8 +35,8 @@ Using the Inspector allows you to change all of the Decal Projector properties, | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | -| **Size** | The 3D size of the projector influence box, and thus the decal along the projected plane. The projector scales the decal to match the **Width** (along local X-axis) and **Height** (along local Y-axis) components of the **Size**. | -| **Projection Depth** | The depth of the projector influence box. The projector scales the decal to match **Projection Depth**. The Decal Projector component projects decals along the local Z-axis. | +| **Size** | The size of the projector influence box, and thus the decal along the projected plane. The projector scales the decal to match the **Width** (along the local x-axis) and **Height** (along the local y-axis) components of the **Size**. | +| **Projection Depth** | The depth of the projector influence box. The projector scales the decal to match **Projection Depth**. The Decal Projector component projects decals along the local z-axis. | | **Material** | The decal Material to project. The decal Material must use a HDRP/Decal Shader. | | **Decal Layer** | The layer that specifies the Materials to project the decal onto. Any Mesh Renderers or Terrain that uses a matching Decal Layer receives the decal. | | **Draw Distance** | The distance from the Camera to the Decal at which this projector stops projecting the decal and HDRP no longer renders the decal. |