

I did it this way in the draw event i have shader_set(shd_paletteswap) Just create a sprite with your palettes starting top left and going down and the next palette to the right of the first and so on.įeed the shader the palette and the maximum amount of colors in your palettes Test_color = texture2D( palette,vec2(0.0/maxcolors,x_x/maxcolors)) New_color = texture2D( palette, vec2(currentcolumn,x_x/maxcolors)) Vec4 new_color = texture2D( palette, vec2(0.0/maxcolors,0.0/maxcolors)) Vec4 test_color = texture2D( palette, vec2(0.0/maxcolors,0.0 /maxcolors)) Vec4 base_color = texture2D( gm_BaseTexture, v_vTexcoord) Vec2 newcoords = vec2(currentcolumn, 0.0 ) I figured I would share it here and other people could tear it down and make it better if need be. I'm not really sure if what I got here is any good performance wise or anything like that. There were several great shaders, an awesome looking one by u/pixelatedpope especially, but none of them were simple enough for what I wanted. After searching up all the ways other people have accomplished this I couldn't find a simple solution. I am working on a Megaman clone project to learn Gamemaker and I wanted to work on the palette swapping from the original game.
