Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. Shader "918/AlphaBlending"
  2. {
  3. Properties
  4. {
  5. _Farbe("Color Value",Color) = (0,0,1,1)
  6. }
  7. SubShader //for every GPU
  8. {
  9. Tags { "Queue" = "Transparent"}
  10. Pass
  11. {
  12. ZWrite Off
  13. Blend SrcAlpha OneMinusSrcAlpha
  14.  
  15. // One
  16. // Zero
  17. // SrcColor
  18. // SrcAlpha
  19. // DstColor / DstAlpha
  20. // OneMinusSrcColor / OneMinusDstAlpha / ...
  21.  
  22. CGPROGRAM //----------- REAL SHADER GOES HERE
  23.  
  24. #pragma vertex VS
  25. #pragma fragment PS
  26.  
  27. uniform float4 _Farbe;
  28.  
  29. struct VS_IN
  30. {
  31. float4 pos: POSITION;
  32. };
  33.  
  34. struct VS_OUT
  35. {
  36. float4 pos : SV_POSITION;
  37. };
  38.  
  39. VS_OUT VS(VS_IN input)
  40. {
  41. VS_OUT output;
  42.  
  43. output.pos = UnityObjectToClipPos(input.pos);
  44.  
  45. return output;
  46. }
  47.  
  48. float4 PS(VS_OUT input) : COLOR
  49. {
  50.  
  51. return _Farbe;
  52.  
  53. }
  54. ENDCG // -----------END SHADER CODE
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement