浏览代码

Fixed cull and z test mode, because with blending decal values were blended twice per decal

/main
Paul Melamed 7 年前
当前提交
2ac82eae
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/Decal.shader

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/Decal.shader


Name "DBuffer" // Name is not used
Tags { "LightMode" = "DBuffer" } // This will be only for opaque object based on the RenderQueue index
// need to optimize this and use proper Cull and ZTest modes for cases when decal geometry is clipped by camera
Cull Off
// back faces with zfail, for cases when camera is inside the decal volume
Cull Front
ZTest Always
ZTest Greater
// using alpha compositing https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html
Blend SrcAlpha OneMinusSrcAlpha, Zero OneMinusSrcAlpha

正在加载...
取消
保存