浏览代码

Hide blend mode popup when using refraction

/Yibing-Project-2
Frédéric Vauchelles 7 年前
当前提交
9ecea206
共有 2 个文件被更改,包括 12 次插入1 次删除
  1. 7
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/LitUI.cs
  2. 6
      ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs

7
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/LitUI.cs


protected MaterialProperty refractionMode = null;
protected const string kRefractionMode = "_RefractionMode";
protected override bool showBlendModePopup
{
get { return refractionMode == null || refractionMode.floatValue == 0f; }
}
protected void FindMaterialLayerProperties(MaterialProperty[] props)
{
for (int i = 0; i < m_LayerCount; ++i)

++EditorGUI.indentLevel;
m_MaterialEditor.ShaderProperty(ior, Styles.refractionIORText);
blendMode.floatValue = (float)BlendMode.Lerp;
if (mode != Lit.RefractionMode.ThinPlane)
{

6
ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs


// See comment in LitProperties.hlsl
const string kEmissionColor = "_EmissionColor";
bool m_ShowBlendModePopup = true;
protected virtual bool showBlendModePopup { get { return m_ShowBlendModePopup; } }
// The following set of functions are call by the ShaderGraph
// It will allow to display our common parameters + setup keyword correctly for them
protected abstract void FindMaterialProperties(MaterialProperty[] props);

SurfaceTypePopup();
if ((SurfaceType)surfaceType.floatValue == SurfaceType.Transparent)
{
BlendModePopup();
if (showBlendModePopup)
BlendModePopup();
m_MaterialEditor.ShaderProperty(preRefractionPass, StylesBaseUnlit.transparentPrePassText);
}

正在加载...
取消
保存