- Home /
Stencil buffer alternative in deferred shading
Since the stencil buffer is ignored in surface shaders in deferred rendering, I'm looking for an alternate solution to pass data between draw calls in the G-buffer pass. Mostly to mask stuff that has to be drawn with stuff that has already been drawn.
I have tried using GrabPass in a surface shader. But this only works if I add Lightmode=Deferred and I disable HDR and it breaks completely in 5.4 beta.
GrabPass {
"_GrabTex"
Tags{ "LightMode" = "Deferred" }
}
I tried using a CommandBuffer but I seem to only be able to add it before or after the G-Buffer pass. Not, for example, exactly at "Queue" = "Geometry+1".
Your answer
Follow this Question
Related Questions
Help me understand stencil shader logic 1 Answer
Is it possible to have multiple stencil reference values in one shader? 0 Answers
Shadergraph: Sample Cubemap seems to not decode HDR color 0 Answers
Problem with transparency and stencil shader 1 Answer
Standard Shader Still Visible through Stencil Shader 0 Answers