浏览代码

Improve applied scale to inspector preveiw

/main
Jens Holm 7 年前
当前提交
923666b0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs


if (renderData == masterRenderData)
{
previewTransform *= Matrix4x4.Rotate(rotation);
previewTransform *= Matrix4x4.Scale(Vector3.one * 1f / mesh.bounds.extents.magnitude);
previewTransform *= Matrix4x4.Scale(Vector3.one * (Vector3.one).magnitude / mesh.bounds.size.magnitude);
previewTransform *= Matrix4x4.Translate(-mesh.bounds.center);
}

正在加载...
取消
保存