浏览代码

Center preview mesh

/main
Jens Holm 7 年前
当前提交
fd1a979a
共有 1 个文件被更改,包括 3 次插入1 次删除
  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(Vector3.zero, Quaternion.identity, Vector3.one),
Matrix4x4.TRS(previewPosition, Quaternion.identity, Vector3.one),
mat,
1,
m_Camera,

正在加载...
取消
保存