浏览代码

Set '_StencilRef' for all lit materials

/Branch_Batching2
Evgenii Golubev 8 年前
当前提交
6c9bbcca
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 5
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs

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


bool depthOffsetEnable = material.GetFloat(kDepthOffsetEnable) > 0.0f;
SetKeyword(material, "_DEPTHOFFSET_ON", depthOffsetEnable);
int stencilRef = (int)UnityEngine.Experimental.Rendering.HDPipeline.StencilBits.Standard; // See 'StencilBits'.
int stencilRef; // See 'StencilBits'.
switch (materialID)
{

stencilRef = 1 + materialID;
break;
}
material.SetInt("_StencilRef", stencilRef);
material.SetInt("_StencilRef", stencilRef);
bool enablePerPixelDisplacement = material.GetFloat(kEnablePerPixelDisplacement) > 0.0f;
SetKeyword(material, "_PER_PIXEL_DISPLACEMENT", enablePerPixelDisplacement);

正在加载...
取消
保存