浏览代码

Fix property gathering in preview rendering

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

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


m_ErrorTexture.SetPixel(1, 1, Color.magenta);
m_ErrorTexture.Apply();
m_Graph.onChange += OnGraphChange;
m_Graph.onChange += OnGraphChange;
}
public PreviewData GetPreview(INode node)

// Fill MaterialPropertyBlock
m_PreviewPropertyBlock.Clear();
foreach (var nodeGuid in m_DirtyPreviews)
foreach (var nodeGuid in m_PropertyNodeGuids)
{
var node = m_Graph.GetNodeFromGuid<AbstractMaterialNode>(nodeGuid);
node.CollectPreviewMaterialProperties(m_PreviewProperties);

正在加载...
取消
保存