浏览代码

Fix preview centering for custom meshes

/main
Tim Cooper 7 年前
当前提交
8ff15259
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphPreviewGenerator.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphPreviewGenerator.cs


Mesh previewMesh = mesh == null ? s_Meshes[0] : mesh;
Vector3 previewPosition = previewMesh.bounds.center;
Matrix4x4.TRS(previewPosition, Quaternion.identity, Vector3.one),
mode == PreviewMode.Preview3D ? Matrix4x4.TRS(-previewMesh.bounds.center, Quaternion.identity, Vector3.one) : Matrix4x4.identity,
mat,
1,
m_Camera,

正在加载...
取消
保存