Depth Mask Shader in URP

Hello there!

Currently I Working on some project, where I need to cut some piece of mesh using DepthMask Shader with this lines:

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

But… In URP This Shader Some Grey Color like this, instead of transparency like in default Render Pipeline

Can anyone help me? Very Appreciate this!

Please, need feedback as fast as possible :slight_smile: I need to finish project in few days and stucked here :////

Guys, I Know that I’am anoying :confused: But It really important to me) Maybe we can start discussion?

Hey!! Have you got any solution to this? I’m stuck at this part. My 3d object is also rendering black

Just a guess - if you check the frame debugger, is your object being drawn before the skybox? Your shader writes to depth buffer and not to color, so if the skybox was drawn after it then the skybox wouldn’t write color where your object is, and you will be left with whatever clear color you have for the camera.