- Home /
My object keeps rendering the object in the back first using stencil buffer
The game that I've been developing has come to a pause because of this. I'm new at shader programming and barely grasped the basics of it.
Problem:
What I want to achieve:
The wall thats blocking the object has Unlit/Color shader. My object has stencil:
Tags {"Queue" = "AlphaTest" "IgnoreProjector" = "True" "RenderType" = "TransparentCutout" "Queue"="Geometry" }
LOD 100
Lighting Off
Stencil {
Ref[_StencilRef]
Comp Equal
}
The Object masking stencil shader has:
Stencil{
Ref[_StencilRef]
Comp Always
Pass Replace
}
The FOG plane shader: Tags { "Queue"="Transparent" "RenderType"="Transparent" "Queue"="Geometry" } LOD 200
Stencil {
Ref [_StencilRef]
Comp Equal
}
I am really frustrated by this please help if anyone knows what to do about this.
Your answer
Follow this Question
Related Questions
Shader that renders pixel with highest alpha value? 0 Answers
Multi-shader Stencil Buffer not working as expected,Multi-shader Stencil not working as expected 0 Answers
Help me understand stencil shader logic 1 Answer
Stencil Shader no longer working with Lightweight Render Pipeline 1 Answer
Referencing the current pixel's world coordinates in the SURF block of a shader 1 Answer