浏览代码

Fix preview rendering (#48)

/main
Peter Bay Bastian 7 年前
当前提交
817240b1
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphPreviewGenerator.cs

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


Unsupported.SetOverrideRenderSettings(m_Scene);
RenderTexture.active = m_RenderTexture;
GL.Clear(true, true, Color.black);
if (mode == PreviewMode.Preview3D)
{
m_Camera.transform.position = -Vector3.forward * 5;

m_Camera.orthographicSize = 1;
m_Camera.orthographic = true;
}
m_Camera.targetTexture = m_RenderTexture;
EditorUtility.SetCameraAnimateMaterialsTime(m_Camera, time);
Light0.enabled = true;

正在加载...
取消
保存