浏览代码

fix detail tiling conversion

/system-shock-transitional-shader
Paul Melamed 7 年前
当前提交
86ed9235
共有 2 个文件被更改,包括 11 次插入1 次删除
  1. 9
      ScriptableRenderPipeline/Core/Editor/MaterialUpgrader.cs
  2. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/StandardSpecularToHDLitTransitionalMaterialUpgrader.cs

9
ScriptableRenderPipeline/Core/Editor/MaterialUpgrader.cs


Dictionary<string, string> m_TextureRename = new Dictionary<string, string>();
Dictionary<string, string> m_FloatRename = new Dictionary<string, string>();
Dictionary<string, string> m_VectorRename = new Dictionary<string, string>();
Dictionary<string, string> m_ColorRename = new Dictionary<string, string>();
Dictionary<string, float> m_FloatPropertiesToSet = new Dictionary<string, float>();

foreach (var t in m_FloatRename)
dstMaterial.SetFloat(t.Value, srcMaterial.GetFloat(t.Key));
foreach (var t in m_VectorRename)
dstMaterial.SetVector(t.Value, srcMaterial.GetVector(t.Key));
foreach (var t in m_ColorRename)
dstMaterial.SetColor(t.Value, srcMaterial.GetColor(t.Key));

public void RenameFloat(string oldName, string newName)
{
m_FloatRename[oldName] = newName;
}
public void RenameVector(string oldName, string newName)
{
m_VectorRename[oldName] = newName;
}
public void RenameColor(string oldName, string newName)

3
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/StandardSpecularToHDLitTransitionalMaterialUpgrader.cs


// mapping the detail normal map, if any, to the detail map, should do the right thing if
// there is no detail albedo.
RenameTexture("_DetailAlbedoMap", "_DetailMapLegacy");
RenameTexture("_DetailMask", "_DetailMaskMapLegacy");
RenameTexture("_DetailMask", "_DetailMaskMapLegacy");
RenameVector("_DetailAlbedoMap_ST", "_DetailMap_ST");
}
public override void Convert(Material srcMaterial, Material dstMaterial)

正在加载...
取消
保存