YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

Function to disable z-writing (but not z-testing) #2956

Open jsburger opened 1 year ago

jsburger commented 1 year ago

Is your feature request related to a problem?

gpu_set_zwriteenable(false) seems to disable z-testing, which I find redundant due to gpu_set_ztestenable() existing. Not only that, it seems to not actually disable z-writing. Regardless, I cannot create a situation where I z-test before drawing and do not z-write while drawing.

Describe the solution you'd like

Add a new function which disables writing to the z-buffer, but not reading from it while drawing.

Describe alternatives you've considered

No response

Additional context

I am using the (relatively) new function gpu_set_depth() in a 2d game. I am drawing a surface over some game elements for shadows. I need to maintain the depth of the game elements underneath the shadows, hence the need for preventing z-writing.

Gamer-XP commented 1 year ago

I'm using both functions and they work like expected. Could it be a bug in the latest versions? I'm sticking to the older GM version now, so they may have broken it at some point?