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.

27 lines
389 B

  1. Shader "Hidden/DotProductOpNode"
  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. return dot(tex2D(_A, i.uv).rgb, tex2D(_B, i.uv).rgb);
  21. }
  22. ENDCG
  23. }
  24. }
  25. }