Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

SV_ClipDistance in a surface shader

$
0
0
Is it possible to use SV_ClipDistance in a surface shader?

My custom per-vertex data looks like this:
Code (CSharp):
  1. #pragma surface surf vertex:vert
  2.  
  3. struct Input
  4. {
  5.     float2 uv_Albedo;
  6.     float3 viewDir;
  7.     UNITY_VPOS_TYPE screenPos : VPOS;
  8.     float clip : SV_ClipDistance0;   // <-----------------------------------
  9. };
  10.  
  11. void vert (inout appdata_full v, out Input o)
  12. {
  13.     UNITY_INITIALIZE_OUTPUT (Input,o);
  14.     o.clip =    /* <----------------------------------- */...
SV_ClipDistance in a surface shader

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>