- Home /
Shadercode for alphatesting and transparency at the same time
Hey fellow unitarians!
I'm trying to write a shader that will mask an object using an alpha gradient and a cutoff variable as in this example: http://answers.unity3d.com/questions/14770/creating-a-circular-progressbar-timer.html
However, the object I want to mask is an irregular GUI-texture object, and because of that I want to use it's alpha channel for regular transparency in the texture. So I'm trying to wrap my head around how to write a shader that will display the texture using it's own alpha channel for transparency AND masking this all using another gradiented masking texture, AlphaTest and the cutoff variable.
I've been trying to read up on both AlphaTest and Blend and I figure I would need to use two passes somehow, but I just can't seem to work out how to do this.
Any ideas? Thanks in advance!
Your answer
Follow this Question
Related Questions
Create a shader using mask for sprite 1 Answer
Implement texture masking into simple existing shader 1 Answer
Decal Alpha Blend 0 Answers
shader Transparency 1 Answer
Effects Process after Opaque queue before Transparency? 0 Answers