staticskizzles
Member
GML:
gpu_set_blendmode(bm_subtract);
if room == rm_village {
draw_rectangle_color(3434,3520,3551,3567,c_white,c_white,c_white,c_white,0);
}
I'm drawing to a surface (ingame water reflection) which reflects instances onto the surface. There's certain pixels I don't want to be reflective and the above code to remove pixels from that surface just isn't working.
I've tried changing the draw colour to c_black instead of c_white, I also tried draw_rectangle() without "color" but I have a feeling it's not erasing because I have draw_sprite_ext() for all the reflections in the same event (before the erasing of course).
I've considered draw_sprite_part() route instead of trying to erase anything but that draws parts of sprites rectangularly and that's not exactly what I'm after.
Incase I created any confusion there, here's the order...
draw event:
surface_set_target();
draw_clear();
gpu_set_blendmode();
draw_sprite_ext() (for every instance with independent image_blend.
draw_sprite() (looped for all other instances)
then erasing with
gpu_set_blendmode(bm_subtract);
draw_rectangle();
shader_reset();
surface_reset_target();
draw_surface();
The surface is remade each draw event, so I have a feeling draw_sprite() functions will override any bm_subtract draws even if they're afterwards in the draw event. I'm not entirely certain how drawing surfaces works beneath the code however.
I hope that isn't the case. Is what I'm trying to achieve impossible?
Last edited: