Tails1000
Member
Sorry the title isn't clear, I don't know how to properly explain what I'm struggling with...
I know how to use clipping masks with completely opaque sprites, but once I try it with sprites that have transparency in them the effect doesn't work.
Here's what I'm dealing with visually. The left is what I have in-game, the right is what I want (created in photoshop)
I'm using a simple gradient circle sprite in the project. Here is the code:
I've been looking up tutorials and trying to find others with a similar problem, but I can't seem to find out what I'm doing wrong or if it's even a quick fix.
If anyone sees where I'm making a mistake I'd love to know. Thank you in advance for your assistance!
I know how to use clipping masks with completely opaque sprites, but once I try it with sprites that have transparency in them the effect doesn't work.
Here's what I'm dealing with visually. The left is what I have in-game, the right is what I want (created in photoshop)
I'm using a simple gradient circle sprite in the project. Here is the code:
Code:
//Draw Event//
draw_rectangle_color(0,0,room_width,room_height,c_orange,c_orange,c_blue,c_blue,0)
if !surface_exists(surf) {
surf = surface_create(room_width,room_height)
}
surface_set_target(surf)
draw_clear_alpha(c_black,0)
gpu_set_blendenable(false)
draw_circle(500,100,70,0)
gpu_set_blendenable(true);
gpu_set_blendmode_ext(bm_dest_alpha,bm_inv_dest_alpha);
gpu_set_alphatestenable(true);
draw_sprite_ext(spr_light,1,mouse_x,mouse_y,1,1,0,c_white,1)
gpu_set_alphatestenable(false);
gpu_set_blendmode(bm_normal);
surface_reset_target()
draw_surface(surf,0,0)
I've been looking up tutorials and trying to find others with a similar problem, but I can't seem to find out what I'm doing wrong or if it's even a quick fix.
If anyone sees where I'm making a mistake I'd love to know. Thank you in advance for your assistance!