Masking on RenderToTexture

Hi,

i’ve tried to mask my UI toolkit document 2 ways: vector image and border-radius based.
Both work in UI-Builder and screen-space UI. None work after adding “TargetTexture” so it renders to render texture. The image on mesh is never masked.

Is it a bug or am i missing something?

Make sure your assigned RT has a depth/stencil buffer.

Is there any specific format i’m suppoused to use? Tried most of the combinations and none seem to work. I’m using HDRP/Unlit shader for the material.

Try with R8G8B8A8_UNORM for the color format and D24_SFLOAT_S8_UINT for depth stencil format.