• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

GMS 2 Shader for the entity cursor


Hello everybody, I apologize to the forum stuff for my previos post, but I need help again. Fortunately this time it's much much more constructive: I just ahve no idea how to make good shader. I mean I know how to use and write them, but I don't know how to make the content of the shader this time. So , I want to make a cursor for the skill in my game, the skill is called Invoke and it creates a companion on the place of the cursor, everything is ready but currently I am just drawing the separate sprite on the neccesary point(attached 2 screenshots: during the cast, and the result of skill). But now when we decided to create a new type of companion for the game, we have to draw "cursor-sprite" again, so I find it not the most efficient way to draw a cursor for the skill. And what I think we can do is just change it with some shader, but I ahve no idea what should it be except for the simple decision without shader: just draw_set_alpha = 0.x , but I don't like the result and even manually drawing the cursor_sprite is better.
So, any shader masters with an idea?(Or just people with good knowledge of drawing theory)

Edit: it will probably be good if the shader contains some uniform that will be changed by the skill cast progress. I mean in the game the skills are casted for some time, so it would be good to show the cast progress in the cursor, so say, when the skill just starts being casted the cursor is drawn very light transparent blue, and when the skill is full casted and wait for the player to release it is drawn like the sprite we have now. But these colors are just for the example to show what would be also good to see, it doesn't mean that the shader should do exactly this thing. So I will be very grateful for any help(Just a pin to the tutorial for such a shader is also appreciated)


Last edited: