Search Unity

Stencil in URP custom pass?

Discussion in 'Universal Render Pipeline' started by joshcamas, Jan 11, 2021.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,277
    I have a custom pass where I want to read the stencil buffer that has been written to previously (by objects in the scene) , but no matter what I do, I cannot seem to read anything. I heard the stencil buffer gets cleared before custom passes - if so, why in the world would one want this? Regardless, how would I achieve this goal in a URP custom render pass?