I’m trying to get CommandBuffer decals to work on a water shader.
But they’re only showing on the terrain beneath the water.
i tried all possible Blend’s but nothing works. any ideas what I need to change? no idea where to start or whats causing it…
the Water shader is an extended version of the unity water4 shader. Which has this Subshader :
Subshader
{
Tags {"RenderType"="Transparent" "Queue"="Transparent"}
Lod 500
ColorMask RGB
GrabPass { "_RefractionTex" }
Pass {
Blend SrcAlpha OneMinusSrcAlpha
ZTest LEqual
//ZWrite Off
Cull Off
CGPROGRAM
#pragma target 3.0
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fog
#pragma multi_compile WATER_VERTEX_DISPLACEMENT_ON WATER_VERTEX_DISPLACEMENT_OFF
#pragma multi_compile WATER_EDGEBLEND_ON WATER_EDGEBLEND_OFF
#pragma multi_compile WATER_REFLECTIVE WATER_SIMPLE
ENDCG
}
}