You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
535 B

  1. Shader "Hidden/SmoothstepOpNode"
  2. {
  3. Properties
  4. {
  5. _A ("_Alpha", 2D) = "white" {}
  6. _B ("_Min", 2D) = "white" {}
  7. _C ("_Max", 2D) = "white" {}
  8. }
  9. SubShader
  10. {
  11. Pass
  12. {
  13. CGPROGRAM
  14. #include "UnityCG.cginc"
  15. #pragma vertex vert_img
  16. #pragma fragment frag
  17. sampler2D _A;
  18. sampler2D _B;
  19. sampler2D _C;
  20. float4 frag(v2f_img i) : SV_Target
  21. {
  22. float4 alpha = tex2D( _A, i.uv );
  23. float4 min = tex2D( _B, i.uv );
  24. float4 max = tex2D( _C, i.uv );
  25. return smoothstep(min, max, alpha);
  26. }
  27. ENDCG
  28. }
  29. }
  30. }