P
PixHil Entertainment
Guest
CREATE:
STEP:
DRAW:
I remember how this use to work in Studio: 1 but i'm having trouble drawing anything to a surface let alone blending it within the scene with Studio 2. Can anyone shed light on this issue?
Code:
globalvar global_lighting;
global_lighting = surface_create(room_width, room_height);
Code:
surface_set_target(global_lighting);
draw_set_color(c_gray);
draw_rectangle(0, 0, room_width, room_height, false);
surface_reset_target();
Code:
gpu_set_blendenable(true);
gpu_set_blendmode(bm_subtract);
draw_surface(global_lighting, room_width, room_height);
gpu_set_blendmode(bm_normal);