Hey everyone,
throughout the time working with shaders in GM, I've found it convenient to set the visible property of all objects that I want to apply a shader on to false and then simply draw the objects in a single renderer object with
The problem with this is that the with statement goes through all instances based on their order of creation, not their depth, so the instances end up overlapping each other in a different order than they normally would. One way to solve this is to place the instances into a list, sort them by their depth and them draw them in a for cycle, but that is much slower compared to the with statement. And since GM internally already sorts the instances for the draw event (or at least I think it does), I thought it would be cool if our dear YoYoGames somehow exposed this order to be used in GML, maybe by the with statement being sorted by depth by default, or creating a new keyword, that would behave basically the same as with, except it would go through instances based on their depth.
So what are your thoughts on this guys? Is this something that you deal with too? Would this be a feature that you would welcome?
Patrik
EDIT: Also I'm sorry if this is a wrong forum section again.
EDIT2: Wrong forum section confirmed. God dammit!
throughout the time working with shaders in GM, I've found it convenient to set the visible property of all objects that I want to apply a shader on to false and then simply draw the objects in a single renderer object with
Code:
shader_set(myShader);
with (myObject) {
// draw instances here...
}
shader_reset();
So what are your thoughts on this guys? Is this something that you deal with too? Would this be a feature that you would welcome?
Patrik
EDIT: Also I'm sorry if this is a wrong forum section again.
EDIT2: Wrong forum section confirmed. God dammit!
Last edited: