- Home /
Question by
snoutie · Apr 25, 2021 at 05:10 PM ·
shadershader programming
Only render stencil mask when behind maskable object
So I basically want only the mask behind the wall to render. I've solved this by doing a raycast to detect whether the mask should be visible or not, but this comes with some issues for example the raycast not hitting very thin objects.
Those are my current render settings:
Is this possible to do inside of the shader (or the render settings) without writing a custom shader for the wall?
I've tried changing the Depth Test but that doesn't appear to do anything too useful. Or I just haven't found the right combination yet.
mask.png
(464.8 kB)
settings.png
(49.4 kB)
Comment
Your answer
Follow this Question
Related Questions
Very bad float precision 0 Answers
My shader code is having an error with returns at lines 50 and 60. 1 Answer
Custom shader converting to urp need help 1 Answer
pixelated water shader 0 Answers