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.

29 lines
426 B

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