Skip to content

Commit 43b5160

Browse files
Fixed blend distance editing (1248931) (#838)
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent aaaca10 commit 43b5160

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
676676
- Fixing the internsity being applied to RTAO too early leading to unexpected results (1254626).
677677
- Fix issue that caused sky to incorrectly render when using a custom projection matrix.
678678
- Fixed null reference exception when using depth pre/post pass in shadergraph with alpha clip in the material.
679+
- Appropriately constraint blend distance of reflection probe while editing with the inspector (case 1248931)
679680

680681
### Changed
681682
- Improve MIP selection for decals on Transparents

com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDProbeUI.Drawers.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ public static void DrawCustomSettings(SerializedHDProbe serialized, Editor owner
233233

234234
public static void DrawInfluenceSettings(SerializedHDProbe serialized, Editor owner)
235235
{
236-
var provider = new TProvider();
237236
InfluenceVolumeUI.Draw<TProvider>(serialized.probeSettings.influence, owner);
238237
}
239238

com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,10 @@ static void Drawer_AdvancedBlendDistance(SerializedInfluenceVolume serialized, b
173173
}
174174
else
175175
{
176-
float scalar = editorSimplifiedModeBlendDistance.floatValue;
177-
if (!(Mathf.Approximately(blendDistancePositive.vector3Value.x, scalar)
178-
&& Mathf.Approximately(blendDistancePositive.vector3Value.y, scalar)
179-
&& Mathf.Approximately(blendDistancePositive.vector3Value.z, scalar)
180-
&& Mathf.Approximately(blendDistanceNegative.vector3Value.x, scalar)
181-
&& Mathf.Approximately(blendDistanceNegative.vector3Value.y, scalar)
182-
&& Mathf.Approximately(blendDistanceNegative.vector3Value.z, scalar)))
183-
{
184-
blendDistancePositive.vector3Value = blendDistanceNegative.vector3Value = new Vector3(scalar, scalar, scalar);
185-
serialized.Apply();
186-
SceneView.RepaintAll(); //update gizmo
187-
}
176+
var scalar = Mathf.Min(editorSimplifiedModeBlendDistance.floatValue, Mathf.Min(maxBlendDistance.x, maxBlendDistance.y, maxBlendDistance.z));
177+
blendDistancePositive.vector3Value = blendDistanceNegative.vector3Value = new Vector3(scalar, scalar, scalar);
178+
serialized.Apply();
179+
SceneView.RepaintAll(); //update gizmo
188180
}
189181

190182
if (serialized.editorAdvancedModeEnabled.boolValue)

0 commit comments

Comments
 (0)