- Home /
Circle of Transparency Shader: How to implement?
Howdy folks,
I feel like I'm close to figuring this out but for a few last hitches. I'm trying to hide the terrain in a circle when the player walks behind it (3d isometric setup). Here's my current look of my transparency shader:
I have a feeling that this will require 2 passes in the shader but I am not quite sure how that'd work. Currently anything behind the pixels being faded out are occluded which is due to this pass:
Pass {
ZWrite On
ColorMask 0
}
If I didn't have that pass, the game would look like this:
Ideally I'd love to have the effect as asked about in this thread: http://forum.unity3d.com/threads/visibility-bubble-titan-quest-like.130480/
However the terrain is one mesh (that was combined from several tiles at runtime) and I don't think it'd work like how it was described in the thread.
EDIT: I found out about transparent cutout and finally got the circle to work however I no longer have the nice faded edge...
Is there a solution where I can keep the nice faded edge to the circle?
Would you $$anonymous$$d sharing more information on exactly how you did this? So others won't have to ask the same question twice?
Your answer
Follow this Question
Related Questions
How to make a submesh from part of my character 1 Answer
How to fix transparent rendering problem 3 Answers
Transparency from light shader 1 Answer
Transparent material on iPhone Android 3 Answers