浏览代码

Moved keyword setup in BaseLitUI.cs

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

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


TessellationMode tessMode = (TessellationMode)material.GetFloat(kTessellationMode);
SetKeyword(material, "_TESSELLATION_PHONG", tessMode == TessellationMode.Phong);
}
var isPrePass = material.GetFloat(kTransparentPrepass) > 0.0;
SetKeyword(material, "_REFRACTION_ROUGHNESS_ON", !isPrePass); // Rough refraction is not available for pre transparent
}
static public void SetupBaseLitMaterialPass(Material material)

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


material.SetInt("_ZWrite", 0);
var isPrePass = material.GetFloat(kTransparentPrepass) > 0.0f;
material.renderQueue = (int)(isPrePass ? HDRenderQueue.PreTransparent : HDRenderQueue.Transparent);
SetKeyword(material, "_REFRACTION_ROUGHNESS_ON", !isPrePass); // NOTE: this should be in lit as refraction is only for lit
SetKeyword(material, "_BLENDMODE_LERP", BlendMode.Lerp == blendMode);
SetKeyword(material, "_BLENDMODE_ADD", BlendMode.Add == blendMode);

正在加载...
取消
保存