C
Craftis1024
Guest
I am having an issue where I've managed to get this CRT filtered shader to work but it won't apply itself over my GUI layer. When I don't set its depth low it draws over the GUI layer and the GUI layer is gone. When I do set the depth low it appears behind the GUI layer and in front of everything else. Is there a way to make it so the shader applies to everything without causing the GUI layer to disappear?
here's a screenshot of what I'm talking about
Here is the code I have in place for the shader in the create event
Here is the code I have in the Draw GUI Begin event
here's a screenshot of what I'm talking about

Here is the code I have in place for the shader in the create event
Code:
// CRT filter effect
application_surface_draw_enable(false);
shader_to_use = sh_CRT_Windows_full_shader;
crt_surface_scale = 1;
crt_surface_width = obj_display_manager.ideal_width;
crt_surface_height = obj_display_manager.ideal_width;
uni_crt_sizes = shader_get_uniform(shader_to_use, "u_crt_sizes");
Code:
// CRT filter
if global.scanlines == true
{
shader_set(shader_to_use);
shader_set_uniform_f(uni_crt_sizes,obj_display_manager.ideal_width,obj_display_manager.ideal_height,crt_surface_width, crt_surface_height);
draw_surface_part_ext(application_surface, 0, 0, obj_display_manager.ideal_width,obj_display_manager.ideal_height, 0, 0, crt_surface_scale, crt_surface_scale, c_white, 1);
shader_reset();
}
else
{
shader_reset();
application_surface_draw_enable(true);
}