浏览代码

Renamed LayeredLit shaders and UI classes to InfluenceLayeredLit.

/RenderPassXR_Sandbox
Julien Ignace 7 年前
当前提交
719e0012
共有 6 个文件被更改,包括 16 次插入16 次删除
  1. 14
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs
  2. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/InfluenceLayeredLit/Editor/InfluenceLayeredLitUI.cs
  3. 6
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/InfluenceLayeredLit/InfluenceLayeredLit.shader
  4. 6
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/InfluenceLayeredLit/InfluenceLayeredLitTessellation.shader
  5. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs
  6. 2
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.hlsl

14
Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs


foreach (Object obj in materials)
{
Material mat = obj as Material;
if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
if (mat.shader.name == "HDRenderPipeline/InfluenceLayeredLit" || mat.shader.name == "HDRenderPipeline/InfluenceLayeredLitTessellation")
LayeredLitGUI.SynchronizeAllLayers(mat);
InfluenceLayeredLitGUI.SynchronizeAllLayers(mat);
EditorUtility.SetDirty(mat);
}
}

string.Format("{0} / {1} materials cleaned.", i, length),
i / (float)(length - 1));
if (mat.shader.name == "HDRenderPipeline/LayeredLit" || mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
if (mat.shader.name == "HDRenderPipeline/InfluenceLayeredLit" || mat.shader.name == "HDRenderPipeline/InfluenceLayeredLitTessellation")
LayeredLitGUI.SetupMaterialKeywordsAndPass(mat);
InfluenceLayeredLitGUI.SetupMaterialKeywordsAndPass(mat);
EditorUtility.SetDirty(mat);
}
else if (mat.shader.name == "HDRenderPipeline/Lit" || mat.shader.name == "HDRenderPipeline/LitTessellation")

Object[] materials = Resources.FindObjectsOfTypeAll<Material>();
Shader litShader = Shader.Find("HDRenderPipeline/Lit");
Shader layeredLitShader = Shader.Find("HDRenderPipeline/LayeredLit");
Shader layeredLitShader = Shader.Find("HDRenderPipeline/InfluenceLayeredLit");
foreach (Object obj in materials)
{

LitGUI.SetupMaterialKeywordsAndPass(mat);
EditorUtility.SetDirty(mat);
}
else if (mat.shader.name == "HDRenderPipeline/LayeredLitTessellation")
else if (mat.shader.name == "HDRenderPipeline/InfluenceLayeredLitTessellation")
LayeredLitGUI.SetupMaterialKeywordsAndPass(mat);
InfluenceLayeredLitGUI.SetupMaterialKeywordsAndPass(mat);
EditorUtility.SetDirty(mat);
}
}

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/InfluenceLayeredLit/Editor/InfluenceLayeredLitUI.cs


namespace UnityEditor.Experimental.Rendering.HDPipeline
{
internal class LayeredLitGUI : LitGUI
internal class InfluenceLayeredLitGUI : LitGUI
{
public enum LayerUVBaseMapping
{

6
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/InfluenceLayeredLit/InfluenceLayeredLit.shader


Shader "HDRenderPipeline/LayeredLit"
Shader "HDRenderPipeline/InfluenceLayeredLit"
{
Properties
{

// WARNING
// All the following properties that concern the UV mapping are the same as in the Lit shader.
// This means that they will get overridden when synchronizing the various layers.
// To avoid this, make sure that all properties here are in the exclusion list in LayeredLitUI.SynchronizeLayerProperties
// To avoid this, make sure that all properties here are in the exclusion list in InfluenceLayeredLitUI.SynchronizeLayerProperties
_TexWorldScale0("Tiling", Float) = 1.0
_TexWorldScale1("Tiling", Float) = 1.0
_TexWorldScale2("Tiling", Float) = 1.0

}
}
CustomEditor "Experimental.Rendering.HDPipeline.LayeredLitGUI"
CustomEditor "Experimental.Rendering.HDPipeline.InfluenceLayeredLitGUI"
}

6
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/InfluenceLayeredLit/InfluenceLayeredLitTessellation.shader


Shader "HDRenderPipeline/LayeredLitTessellation"
Shader "HDRenderPipeline/InfluenceLayeredLitTessellation"
{
Properties
{

// WARNING
// All the following properties that concern the UV mapping are the same as in the Lit shader.
// This means that they will get overridden when synchronizing the various layers.
// To avoid this, make sure that all properties here are in the exclusion list in LayeredLitUI.SynchronizeLayerProperties
// To avoid this, make sure that all properties here are in the exclusion list in InfluenceLayeredLitUI.SynchronizeLayerProperties
_TexWorldScale0("Tiling", Float) = 1.0
_TexWorldScale1("Tiling", Float) = 1.0
_TexWorldScale2("Tiling", Float) = 1.0

}
}
CustomEditor "Experimental.Rendering.HDPipeline.LayeredLitGUI"
CustomEditor "Experimental.Rendering.HDPipeline.InfluenceLayeredLitGUI"
}

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs


depthOffsetEnable = FindProperty(kDepthOffsetEnable, props);
// MaterialID
materialID = FindProperty(kMaterialID, props, false); // LayeredLit is force to be standard for now, so materialID could not exist
materialID = FindProperty(kMaterialID, props, false); // InfluenceLayeredLit is force to be standard for now, so materialID could not exist
// Per pixel displacement
enablePerPixelDisplacement = FindProperty(kEnablePerPixelDisplacement, props);

2
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.hlsl


// w - inside tessellation factor
float3 GetTessellationDisplacement(VaryingsMeshToDS input)
{
// This call will work for both LayeredLit and Lit shader
// This call will work for both InfluenceLayeredLit and Lit shader
LayerTexCoord layerTexCoord;
ZERO_INITIALIZE(LayerTexCoord, layerTexCoord);
GetLayerTexCoord(

正在加载...
取消
保存