Graphics twitter, how do you handle clipping of child UI elements inside of another element that has arbitrary vector graphics? Rounded corners being an example that comes to mind. Stencil? Something else?
-
-
Vastauksena käyttäjälle @tloch14
I render the widget as 9 quads and use textures w/ alpha to create the corner or edge shape. Only works for relatively simple stuff though.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @enleeten
Right, and I'm interested in *literally* arbitrary vector shapes. Limitations are real-time and fairly strict memory limitations.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
You could render the arbitrary shape to a texture, then use that texture as an alpha mask for the UI elements you’d like to clip.
2 vastausta 0 uudelleentwiittausta 0 tykkäystä
Yes. Concerned about excessive vram usage, too many FBO swaps, and what it imposes on the shader author. I want to experiment with pixel local storage (or sub-passes in Vulkan) to see if I can get all the things I want.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.