YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

In-Game: Stencil features do not work on the Draw GUI layer (without surfaces) because that layer does not support depth #6086

Open DragoniteSpam opened 5 months ago

DragoniteSpam commented 5 months ago

Is your feature request related to a problem?

The stencil buffer features added in 2024.600 don't currently work in the Draw GUI event, which is probably where most people would actually want to use it (it certainly is for me).

Run the sample project, and then change the Draw event to Draw GUI, and observe stencil clipping not work anymore.

TutorialStencilShenanigans.zip

I'm pretty sure this is because the Draw GUI layer/frame buffer doesn't have depth to go with it

3DTutorial67WizarducksCameraButDrawGUI.zip

and while this isn't needed in most cases it would be nice to have a way to enable it there so that we could do stencil stuff to clip GUI text.

Describe the solution you'd like

draw_gui_enable_depth() or some such option

Describe alternatives you've considered

Drawing the text for clipping onto a surface with depth/stencil enabled, and then drawing the surface on the GUI

Additional context

yknow, this stuff

scrolling text

tabularelf commented 5 months ago

This could be extended to include the back buffer

DragoniteSpam commented 5 months ago

Most of the time you wouldn't need it, but it would be nice to have the option for when you do