Search Unity

Question more than 8 3D masks?

Discussion in 'Universal Render Pipeline' started by calpolican, Nov 3, 2021.

  1. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    I have 8 maskable materials & 8 mask-materials. This is arranged in such way that, for example, "material 4" is masked only by "mask-material 4". I can't do more than 8 of this materials since the stencil buffer (wich I'm using to mask things) uses only one byte. Yet, curently, I reach a point were, in certain cases, I need more than this 8 masks and I have to do it, even if it means to do something a bit slower like generate a second render pass or something.
    How can I do this?