|
|
|
|
|
|
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 |
|
|
|
|
|
|
|