Is it possible to use SV_ClipDistance in a surface shader?
My custom per-vertex data looks like this:
SV_ClipDistance in a surface shader
My custom per-vertex data looks like this:
Code (CSharp):
- #pragma surface surf vertex:vert
- struct Input
- {
- float2 uv_Albedo;
- float3 viewDir;
- UNITY_VPOS_TYPE screenPos : VPOS;
- float clip : SV_ClipDistance0; // <-----------------------------------
- };
- void vert (inout appdata_full v, out Input o)
- {
- UNITY_INITIALIZE_OUTPUT (Input,o);
- o.clip = /* <----------------------------------- */...