浏览代码

Post merge tidy.

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

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


using UnityEditorInternal;
using UnityEngine;
using UnityEngine.MaterialGraph;

{
utility.camera.transform.position = -Vector3.forward * 5;
utility.camera.transform.rotation = Quaternion.identity;
utility.camera.orthographic = false;
utility.camera.transform.position = -Vector3.forward * 5;
utility.camera.transform.position = -Vector3.forward * 2;
utility.camera.orthographicSize = 1;
utility.camera.orthographic = true;
}
EditorUtility.SetCameraAnimateMaterialsTime(utility.camera, time);

utility.camera.clearFlags = CameraClearFlags.Depth;
if (PreviewMode.Preview3D == mode)
{
utility.DrawMesh(
s_Meshes[0],
Vector3.zero,
Quaternion.identity,
mat,
0);
}
else
{
Graphics.DrawMesh(quad, Matrix4x4.identity, mat, 0, utility.camera, 0);
}
utility.Render();
utility.DrawMesh(
mode == PreviewMode.Preview3D ? s_Meshes[0] : quad,
Vector3.zero,
Quaternion.identity,
mat,
0);
utility.Render(true, false);
return utility.EndPreview();
}
正在加载...
取消
保存