浏览代码

Fix serialization of migrated data for PlanarReflectionProbe

/main
RSlysz 6 年前
当前提交
def7de9d
共有 1 个文件被更改,包括 7 次插入8 次删除
  1. 15
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/SerializedInfluenceVolume.cs

15
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/SerializedInfluenceVolume.cs


&& editorSimplifiedModeBlendDistance.floatValue == 0f
&& editorAdvancedModeBlendNormalDistancePositive.vector3Value == Vector3.zero
&& editorAdvancedModeBlendNormalDistanceNegative.vector3Value == Vector3.zero
&& editorSimplifiedModeBlendNormalDistance.floatValue == 0f)
&& editorSimplifiedModeBlendNormalDistance.floatValue == 0f
&& (boxInfluencePositiveFade.vector3Value != Vector3.zero
|| boxInfluenceNegativeFade.vector3Value != Vector3.zero))
{
Vector3 positive = boxInfluencePositiveFade.vector3Value;
Vector3 negative = boxInfluenceNegativeFade.vector3Value;

//aproximated simplified
editorSimplifiedModeBlendDistance.floatValue = Mathf.Max(positive.x, positive.y, positive.z, negative.x, negative.y, negative.z);
positive = boxInfluenceNormalPositiveFade.vector3Value;
negative = boxInfluenceNormalNegativeFade.vector3Value;
//exact advanced
editorAdvancedModeBlendNormalDistancePositive.vector3Value = positive;
editorAdvancedModeBlendNormalDistanceNegative.vector3Value = negative;
//aproximated simplified
editorSimplifiedModeBlendNormalDistance.floatValue = Mathf.Max(positive.x, positive.y, positive.z, negative.x, negative.y, negative.z);
//no normal modification allowed anymore in PlanarReflectionProbe
boxInfluenceNormalPositiveFade.vector3Value = Vector3.zero;
boxInfluenceNormalNegativeFade.vector3Value = Vector3.zero;
Apply();
}
}

正在加载...
取消
保存