浏览代码

convert Adam/Standard (Specular Setup)

/system-shock-transitional-shader
Paul Melamed 7 年前
当前提交
c4d15fce
共有 2 个文件被更改,包括 5 次插入6 次删除
  1. 1
      ScriptableRenderPipeline/HDRenderPipeline/Editor/UpgradeStandardShaderMaterials.cs
  2. 10
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/StandardToHDLitTransitionalMaterialUpgrader.cs

1
ScriptableRenderPipeline/HDRenderPipeline/Editor/UpgradeStandardShaderMaterials.cs


var upgraders = new List<MaterialUpgrader>();
upgraders.Add(new StandardToHDLitTransitionalMaterialUpgrader("Standard", "HDRenderPipeline/LitTransitional", LitTransitionalGUI.SetupMaterialKeywordsAndPass));
upgraders.Add(new StandardSpecularToHDLitTransitionalMaterialUpgrader("Standard (Specular setup)", "HDRenderPipeline/LitTransitional", LitTransitionalGUI.SetupMaterialKeywordsAndPass));
upgraders.Add(new StandardSpecularToHDLitTransitionalMaterialUpgrader("Adam/Standard (Specular setup)", "HDRenderPipeline/LitTransitional", LitTransitionalGUI.SetupMaterialKeywordsAndPass));
return upgraders;
}

10
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/StandardToHDLitTransitionalMaterialUpgrader.cs


// the HD renderloop packs detail albedo and detail normals into a single texture.
// mapping the detail normal map, if any, to the detail map, should do the right thing if
// there is no detail albedo.
RenameTexture("_DetailNormalMap", "_DetailMap");
RenameTexture("_DetailAlbedoMap", "_DetailMapLegacy");
RenameTexture("_DetailMask", "_DetailMaskMapLegacy");
RenameVector("_DetailAlbedoMap_ST", "_DetailMap_ST");
RenameFloat("_Metallic", "_Metallic");
//@TODO: Seb. Why do we multiply color by intensity
// in shader when we can just store a color?
// builtinData.emissiveColor * builtinData.emissiveIntensity
RenameFloat("_Metallic", "_Metallic");
}
public override void Convert(Material srcMaterial, Material dstMaterial)

正在加载...
取消
保存