Masking / Stencil Buffer Support

Avatar
  • updated
  • Completed

It would be great to be able to use a shapes object to mask another shapes object. 

Maybe possible by adding a way to set stencil flag on a shape?

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Duplicates 1
Stencil support

Hi,

Is there any plan to add stencil support for masking?  We are using Shapes to draw lines to a world map that requires the lines to be masked outside the bounds of the map.  Currently, we are setting the alpha to 0 on each point outside the bounds but the results aren't so great:

Image 140

Any help appreciated!

Thanks, Jake

Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Completed

This has now been implemented in the upcoming version :)

Avatar
Johannes Deml

Sorry for resurrecting this thread, but I couldn't find any setting or information about stencils in the documentation. Is this available for all Shapes? And does it use stencil so it can be used for masking other elements as well?

My Use case is to use a shape as a stencil in 3D space (Not UI). Is that possible?

Edit: Ah, my bad! Missed the update two days ago. Found it exactly where I thought it should be :D

Avatar
jake slack

Awesome! Thank you :)

Avatar
Freya Holmér creator
  • Answer
  • Completed

This has now been implemented in the upcoming version :)