- Home /
Shaders: Overwrite something?
So I have a very neat-looking shader that is transparent, so it provides a sort of overlay to anything behind it. But I want certain surfaces in my game to not only display a texture on their surface, but also to completely remove the overlay effect.
Consider it like the Lens of Truth from the N64 Zeldas, if you've ever played it. Secret items have an invisibility effect on them, but while using the Lens of Truth, the invisibility effect doesn't work inside the circle, though outside the edges of the circle the items are still invisible.
What sort of properties about shaders should I be applying? Any point in the right direction would be greatly appreciated.
Answer by ScroodgeM · Jul 20, 2012 at 07:42 AM
one of possible solutions:
create a custom shader for 'secret' items
make this shader get a visible screen-oriented mask (can be a texture with offset, alpha-cutoff value...)
after computing a screen-oriented position in shader just compare it with a mask parameters and clip pixels if it's invisible
done 8)
Your answer
Follow this Question
Related Questions
How to mask a camera using the render from another 0 Answers
effect on clipping plane 1 Answer
How to make a scan pulse shader 1 Answer
How can I make an animated color gradient? 1 Answer
Hex grid effects 0 Answers