diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index cd128d0d41e..05cdbce9974 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -58,6 +58,10 @@ The version number for this package has increased due to a version update of a r - Fixed scene picking passes. - Fixed broken ray tracing light cluster full screen debug. - Fixed dead code causing error. +- 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. 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..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,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 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. | 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 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 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..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 @@ -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 }; @@ -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; } @@ -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)