#Stencil custom pass works in scene view but not game view

1 messages · Page 1 of 1 (latest)

brisk stream
#

Hello, I'm trying to setup a custom pass volume to mask objects in 6000.2.2f1. It works in scene view (unlit / shaded) but not in game view. I saw a forum post that mentioned the material being masked needs to be transparent with Transparent Depth Prepass enabled which I have done. My target is using HDRP/Lit and the mask object is using the below shader:

Shader "Custom/StencilMask"
{
    SubShader { 
        Tags {"Queue" = "Geometry+10" }
 
        ColorMask 0
        ZWrite On
 
        Pass {}
    }
}

Here's the post I mentioned earlier

Any ideas why it wouldn't be working in Game View?

#

alternatively if there's a better way I could plop down an object and have a 'door' cutout effect let me know, this approach won't render the rest of the room since it's all the same object, fixable by splitting walls into pieces but if there's a different way that works too 🫡

idle holly
#

The dividing wall would have to be a different layer/shader than the others, so yes you'll want to chop them up a bit.

#

Why not just blender yourself the doorway? Could also look into CSG level designing tools for boolean operations.

brisk stream
#

Either way this seems like it should be working in game view I think