RipRoarinBoogerBenis
Member
I followed a somewhat out of date tutorial to build a simple lighting system I intend to expand, but while it works for the most part, the sprite bound to the mouse and the triangle primitives created by the walls leave behind afterimages like a windows 98 error.
I've gone through a few forums that have explored the issue but can't find a solution that works, so I'm going to ask here.
Here's the tutorial:
The code:
Create Event:
Begin Step:
End Step:
Draw Event:
And the result, just to help clarify:
I've gone through a few forums that have explored the issue but can't find a solution that works, so I'm going to ask here.
Here's the tutorial:
The code:
Create Event:
Code:
global.shadows = surface_create(1280, 720);
Code:
surface_free(global.shadows);
global.shadows = surface_create(1280, 720);
surface_set_target(global.shadows);
draw_sprite(spr_light_test, -1, mouse_x, mouse_y);
Code:
surface_reset_target();
Code:
gpu_set_blendmode(bm_add);
draw_surface(global.shadows, 0, 0);
gpu_set_blendmode(bm_normal);