• 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 Only one shader appearing

jf_knight

Member
I'm trying to use two shaders on the applications surface. My problem is that only one of them, "sh_saturation_new", appears to be working. What can I do to make them both work?
Here is what I have on a "Draw GUI END";

Code:
shader_set(shader2);
surface_set_target(application_surface); //Set the surface
draw_surface(application_surface, 0, 0);
surface_reset_target();
shader_reset();

//Draw to screen

shader_set(sh_saturation_new);
draw_surface(application_surface, 0, 0);
shader_reset();
 

Simon Gust

Member
I'm trying to use two shaders on the applications surface. My problem is that only one of them, "sh_saturation_new", appears to be working. What can I do to make them both work?
Here is what I have on a "Draw GUI END";

Code:
shader_set(shader2);
surface_set_target(application_surface); //Set the surface
draw_surface(application_surface, 0, 0);
surface_reset_target();
shader_reset();

//Draw to screen

shader_set(sh_saturation_new);
draw_surface(application_surface, 0, 0);
shader_reset();
You have to make a temporary surface.
 
P

pieterator

Guest
If "sh_satruration_new" seems to be working you can try the following:
(so just drawing to the screen twice)
Code:
shader_set(shader2);
draw_surface(application_surface, 0, 0);
shader_reset();

//Draw to screen

shader_set(sh_saturation_new);
draw_surface(application_surface, 0, 0);
shader_reset();
Otherwise you can try and copy the application surface to a temporary surface and then drawing it:
Code:
//Copy application surface to a previously created temporary surface.
surface_copy(temp_surface,0,0,application_surface);

shader_set(shader2);
draw_surface(temp_surface, 0, 0);
shader_reset();

//Draw to screen

//Copy the temp surface again.
surface_copy(temp_surface,0,0,application_surface);

shader_set(sh_saturation_new);
draw_surface(temp_surface, 0, 0);
shader_reset();
 
Top