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.

25 lines
315 B

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