- Home /
"invisible" shader that affects soft particles?
I know just enough about shaders and rendering to know that I don't know whether this is possible.
My 2.5d game takes place on a plane, (think "floor")
I rely pretty heavily on stock soft particle shaders for my aesthetic vibe.
These mainly rely on their distance from the floor to achieve the desired look.
I suddenly want holes in the floor. Of course, when a soft particle pixel isn't N units from an opaque object, its appearance changes. My goal / question is about preventing that.
I want to be able to place a quad flush with the hole-in-the-floor, which renders nothing, but which still causes soft particles to do their thing as if it were opaque.
Can I get this behavior?
Thanks for reading!
I... Don't know. Reading about this now. I figured it'd be about writing depth, but somehow preserving the color info behind it. But I'm in very unfamiliar territory. At the moment, everything I can think of has a gottcha that would break something else. Thanks for the suggestion,
I get an idea but it's not very flexible. Set the render query so the holes will be rendered just after the floor. And use a shader for the holes that don't write in Z-buffer but don't test Z-buffer.
Well, I can use a Depth$$anonymous$$ask shader to just write to the z-buffer. It achieves the soft particle interaction goal, but causes anything transparent "down in the hole" to be occluded. I was hoping for an easy, magical way around that.
Given the perspective in my scenario, I might be able to get the best of both worlds by doing some multi-cam deviltry. Thanks for the input, you guys put me on the right track.
Your answer
Follow this Question
Related Questions
Invisible block, Visible outline 2 Answers
Why does this material not turn invisible? 2 Answers
rendering part of a ghost when my player passes close to it 3 Answers
How to force the compilation of a shader in Unity? 5 Answers
Is there any way to hide only part of an object from the camera? (unity free) 2 Answers