I would like to set Stencil, Depth and ColorMask states during a custom pass render. My old way involve using a replacement material, but we would like to do it different: using each object's own material but somehow set Stencil, Depth and ColorMask states. I have managed make RenderStateBlock work with custom Stencil & Depth, but ColorMask I have no clue. Maybe there is another way? Like specify DepthOnly pass using existing material??