• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

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