浏览代码

HDRenderPipeline: Add a widget under light to better localize light widget

/Yibing-Project-2
sebastienlagarde 7 年前
当前提交
d3a0822d
共有 1 个文件被更改,包括 24 次插入0 次删除
  1. 24
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/HDAdditionalLightData.cs

24
ScriptableRenderPipeline/HDRenderPipeline/Lighting/HDAdditionalLightData.cs


break;
}
}
if (selected)
{
DrawVerticalRay();
}
}
// Trace a ray down to better locate the light location
private void DrawVerticalRay()
{
Ray ray = new Ray(transform.position, Vector3.down);
RaycastHit hit;
if (Physics.Raycast(ray, out hit))
{
Handles.color = Color.green;
Handles.zTest = UnityEngine.Rendering.CompareFunction.LessEqual;
Handles.DrawLine(transform.position, hit.point);
Handles.DrawWireDisc(hit.point, hit.normal, 0.5f);
Handles.color = Color.red;
Handles.zTest = UnityEngine.Rendering.CompareFunction.Greater;
Handles.DrawLine(transform.position, hit.point);
Handles.DrawWireDisc(hit.point, hit.normal, 0.5f);
}
}
private void OnDrawGizmos()

正在加载...
取消
保存