Pixelated_Pope
Member
Check out the HTML5 interactive demo over on Itch.io.
If you like this Asset and want to support me by purchasing it, you can get it at the above link or on the Marketplace.
If you'd like a free copy, send me a DM!
Retro Palette Swapper is a bit more than just a shader; it is an entire system for drawing sprites, surfaces, tiles, and backgrounds with a manipulated palette in your Game Maker Studio 1 or 2 project.
Have you ever created a character in your game and wished you could change the character's hair or clothing color without adding a complete new set of sprites to your project for every single one of that character's animations?
What about making a sprite appear on fire in a much more vibrant way than just putting a red or orange image_blend on it?
Maybe you've got a black outline around your sprite and want to make it red or green when the player mouses over it?
All of this and much more is possible with Retro Palette Swapper!
Features
* Draw any sprite, surface, or layer with a specific palette!
* Use surfaces to build dynamic palettes on the fly!
* Gradually shift between palettes to create dynamic effects!
* Easy to drop into any existing project!
* Fully commented example code!
* Helpful scripts for manipulating palettes!
* Full featured tool available to help non-artists build palette sprites! (Free to download for everyone)
Demo
Before you buy, try out the demo available on itch and make sure it runs for you.
Requirements
All platforms supported (HTML has a few extra hoops to jump through)
This shader will make your project require a video card that supports Shader Model 3.0 (which was released in 2004... so that really shouldn't be a problem)
Additionally, your graphics need to be "retro"... or at the very least you should NOT be using the "interpolate colors between pixels" graphical option.
FAQ
Q: "I got it, but it isn't working."
A: Well, post here and I'll do my best to help you get it working. You may also want to scan this post to see if your issue has already been discussed.
Q: "The example project doesn't seem to do anything"
A: Make sure you've installed the latest version of direct-x and video card drivers. I promise this works.
Q :"My sprite doesn't look any different when swapped."
A: Make sure the colors in your palette are EXACT MATCHES of the colors in your sprite. There is no "approximation"; the colors must be identical. Use the palette builder to help you find color inconsistencies in your sprites.Additionally, make sure you've imported the shader properly. Double check the fragment and vertex tabs in the shader asset itself compared to the example project.
Q: "Only some of my colors are changing."
A: See previous answer.
Q: "I'm trying to get it to work with OperaGX. What's wrong?"
A: OperaGX is not a "browser" type in GameMaker. It is an OS Type. So when you build for Opera, it tries to use the Desktop version of the shader rather than the HTML5 version. So you can either go into the logic and make the change yourself in the system init function, or just use the HTML5 shader in both arguments of the init function. Hopefully I'll have this fixed in a future update when I'm feeling less lazy.
Q: "Everything looks SUPER weird."
A: Did you turn off the "Interpolate Colors Between Pixels" option in the global game settings? This will not work at all with that option on, so if your game's aesthetic relies on that, you are out of luck; this won't work for you.
Q: "I'm using GMS2, and I've copied the code into a new shader resource, but it won't work."
A: You need to set the shader type to GLSL ES. Right click on the shader in your resource tree and expand the "Shader Type" option.
Q: When I run the Palette Builder Tool, I get an error about the shader not working correctly. How do I fix that?
A: You need to install the latest DirectX end-user runtime from Microsoft. https://www.microsoft.com/en-us/download/details.aspx?id=35 Why is that required to run the pal builder but not the demo project? I honestly have no idea.
Last edited: