Hello, I created a custom PostProcess effect using the post process stack but I need to apply it only to some objects. I think that I can achieve it using a stencil but so far my shader just ignores the stencil... Post Process Effect Code: Code (CSharp): SubShader { Cull Off ZWrite Off ZTest Always Pass { Stencil{ Ref 2 Comp always Pass replace } HLSLPROGRAM #pragma vertex VertDefault #pragma fragment Frag ENDHLSL } }
Maybe you can try unchecking 'Allow HDR' , 'Allow MSAA' and 'Allow Dynamic Resolution' on your camera component.
If anyone stumbles upon this I solved It by Rendering the things I wanted to affect in the Queue Geometry and the unaffected things on Geometry+1. Unity actually has 2 Depth Textures: *_CameraDepthAttachment *_CameraDepthTexture The _CameraDepthTexture is created before Geometry+1. so for my PostProcessing Effects, I just used the _CameraDepthTexture to make this calculation.