Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

CG Fragment/vertex shader, using a alpha texture?

$
0
0
Hello, can someone point me to a resource showing how to write using alpha texture to cut out a color? Can't seem to find something like that. Thank you. EDIT : I am wanting to do semitransparent, but all I can find is alpha cutout examples. Not really sure how to use the alpha as the gradient, and not just a cutoff. Here some code I am working on, but it makes it completely transparent: float4 frag(vertexOutput i) : COLOR { float4 texcol = tex2D (_MainTex, float2(i.uv)).a * _Color; return texcol; }

Viewing all articles
Browse latest Browse all 171066


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>