Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "918/AlphaBlending"
- {
- Properties
- {
- _Farbe("Color Value",Color) = (0,0,1,1)
- }
- SubShader //for every GPU
- {
- Tags { "Queue" = "Transparent"}
- Pass
- {
- ZWrite Off
- Blend SrcAlpha OneMinusSrcAlpha
- // One
- // Zero
- // SrcColor
- // SrcAlpha
- // DstColor / DstAlpha
- // OneMinusSrcColor / OneMinusDstAlpha / ...
- CGPROGRAM //----------- REAL SHADER GOES HERE
- #pragma vertex VS
- #pragma fragment PS
- uniform float4 _Farbe;
- struct VS_IN
- {
- float4 pos: POSITION;
- };
- struct VS_OUT
- {
- float4 pos : SV_POSITION;
- };
- VS_OUT VS(VS_IN input)
- {
- VS_OUT output;
- output.pos = UnityObjectToClipPos(input.pos);
- return output;
- }
- float4 PS(VS_OUT input) : COLOR
- {
- return _Farbe;
- }
- ENDCG // -----------END SHADER CODE
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement