浏览代码

[ReflectionProbeEditor] Fixed sphere shape gizmos

/feature-ReflectionProbeFit
Frédéric Vauchelles 7 年前
当前提交
42f256d3
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.Handles.cs

8
ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.Handles.cs


Gizmos.color = k_GizmoThemeColorExtentFace;
Gizmos.DrawSphere(reflectionProbe.center, reflectionData.influenceSphereRadius);
Gizmos.color = k_GizmoThemeColorInfluenceBlendFace;
Gizmos.DrawSphere(reflectionProbe.center, reflectionData.influenceSphereRadius - reflectionData.sphereBlendRadiusOffset);
Gizmos.DrawSphere(reflectionProbe.center, reflectionData.influenceSphereRadius + reflectionData.sphereBlendRadiusOffset);
}
Gizmos.matrix = Matrix4x4.identity;

if (reflectionData.influenceShape == ReflectionInfluenceShape.Box)
Gizmos.DrawCube(reflectionProbe.center + reflectionData.boxBlendNormalCenterOffset, reflectionProbe.size + reflectionData.boxBlendNormalSizeOffset);
if (reflectionData.influenceShape == ReflectionInfluenceShape.Sphere)
Gizmos.DrawSphere(reflectionProbe.center, reflectionData.influenceSphereRadius - reflectionData.sphereBlendNormalRadiusOffset);
Gizmos.DrawSphere(reflectionProbe.center, reflectionData.influenceSphereRadius + reflectionData.sphereBlendNormalRadiusOffset);
Gizmos.matrix = Matrix4x4.identity;
Gizmos.color = oldColor;

Gizmos.DrawWireSphere(reflectionProbe.center, reflectionData.influenceSphereRadius);
Gizmos.color = reflectionProbe.isActiveAndEnabled ? k_GizmoThemeColorInfluenceBlend : k_GizmoThemeColorDisabled;
Gizmos.DrawWireSphere(reflectionProbe.center, reflectionData.influenceSphereRadius - reflectionData.sphereBlendRadiusOffset);
Gizmos.DrawWireSphere(reflectionProbe.center, reflectionData.influenceSphereRadius + reflectionData.sphereBlendRadiusOffset);
Gizmos.DrawWireSphere(reflectionProbe.center, reflectionData.influenceSphereRadius - reflectionData.sphereBlendNormalRadiusOffset);
Gizmos.DrawWireSphere(reflectionProbe.center, reflectionData.influenceSphereRadius + reflectionData.sphereBlendNormalRadiusOffset);
Gizmos.matrix = Matrix4x4.identity;
}

正在加载...
取消
保存