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

Shaders Applying shader to draw_sprite_ext()

J

JON213

Guest
hello,
Would there be a way to apply a shader to an object while using the draw_sprite_ext function.
I have tried this but it didn't seem to work :(
GML:
shader_set(sd_white);
draw_sprite_ext(sprite_index,image_index,x,y,draw_x,draw_y,image_angle,image_blend,1);
shader_reset()
Thanks in advance.
 

obscene

Member
That's exactly how you do it. Maybe the shader has some uniforms you are required to pass to it?

Also just a note, I assume you realize you have appropriate values for draw_x,draw_y as those are in the place of image_xscale, image_yscale.
 
J

JON213

Guest
Thankyou! I am using Shaun Spaulding's hit flash shader.
GML:
gl_FragColor = vec4(1.0,1.0,1.0,1.0)
draw_x and draw_y are used to briefly increase the enemy's size when its hit.
 
Top