• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Help using subrtract blendmode on surfaces

Pkirkby

Member
Hey everyone, I've created a surface which is dark blue, and signifies the night time. As you can see in my example, I have several lights placed, and a light around the player. I'd like those lights to punch a hole in the surface. Here's the code for my surface draw:

if (!surface_exists(surface))
{
surface = surface_create(room_width,room_height);
}

surface_set_target(surface);
draw_clear_alpha(c_navy,nightAlpha)
depth = 400;
surface_reset_target();
draw_surface(surface,0,0);

The name of the spotlight around the player is simply called oSpotlight. I've looked at a few thins on gpu_blendmodes but I havent been able to figure this out, any help would be great, thanks!
 

Attachments

Last edited:
Top