• 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!

Legacy GM game turns black after deleting shader object

Y

Yvalson

Guest
so I'm using shaders for the first time. but after I remove the object that is making it. for some reason my entire screen turns black. here is the code:

/create
application_surface_draw_enable(0);
bloomIntensity = shader_get_uniform(shdr_bloom, 'intensity');
bloomblurSize = shader_get_uniform(shdr_bloom, 'blurSize');
Bloomy = 0
Go_Back = 0

/step
///Bloom

if(Bloomy < 1.5 && Go_Back = 0){
Bloomy += 0.075
}

if(Bloomy = 1.5){
Go_Back = 1
}

if(Go_Back = 1){
Bloomy -= 0.1
}

//Destory

if(Go_Back = 1 && Bloomy = 0){
instance_destroy()
}

/draw gui end
shader_set(shdr_bloom);
shader_set_uniform_f(bloomIntensity, Bloomy); //0 = off, 1 = a bit, 80 = extremely intense
//shader_set_uniform_f(bloomblurSize, ((window_mouse_get_x()-250)/1000)); // usually something like 1/512 (0.001)
shader_set_uniform_f(bloomblurSize, 1/512);
draw_surface(application_surface, 0, 0);
shader_reset();
 

NightFrost

Member
Make sure you don't have any other code running that turns application surface draw off or puts its fingers into the app surface draw process.
 
Top