
Okay, now you have a palette with reduced colors but. You may need to modify the resulting colors again just like any palette, but the overall color count should be reduced, sometimes significantly. Every time you use this, a new palette will be added to your project with the new crushed palette. This results in similar colors being combined. What crushing does is it will divide each RGB element by your crush factor, floor the result and then re-multiply them by the factor. What the hell is a crush factor? Think about it like this: Every color is made up of 3 RGB values, each 0-255. A dialog will pop up asking you for a "crush factor". With an active project, press C on the keyboard. So what are these features?ĭoes your art have too many colors that are just too similar to one another that it's driving you crazy and your artist doesn't seem to understand that #45B292 & #45B192 shouldn't both be used in the same sprite, then this feature is for you.
Game maker palette swap full#
I was planning on doing all sorts of crazy stuff, but decided to save it for 4.0 (which will be a full rebuild from the ground up in WPF instead of GML. I fixed a crash when trying to interact with the preview box without loading any sprites (Thanks for reporting, Adam!)
Game maker palette swap update#
In addition to updates to the shader itself, I've add a minor update to the Palette Builder. So, really, can't emphasize enough for HTML users to double check the Actual texture page size. It was a suggestion by Sidorakh (fellow GM Discord Admin) to export it and see the ACTUAL size. I set my texture page to 2048 but it just would not work. This actually tripped me up for awhile while developing the shader for HTML. Turns out, that no matter what you have it set to, if you have a single page and GM can fit it in something smaller than you set it to, it will export it at that smaller size. But if it doesn't seem to be working at all or very inaccurately, try going back into your global game settings and previewing your texture page. In most cases, this will be the resolution you selected in your global game settings. If you open up either of the HTML5 shaders, you will find a #define for "TexturePageSize". Speaking of which, I think I need to re-iterate one of the new requirements for HTML5. These constants are available in all 3 pal swap shaders. In most cases, I recommend leaving it at. If you feel it's not matching colors it should, increase this number until it feels right. Modifying the tolerance value will affect how accurate palette swapping is.

However, if you were digging the more lenient color swapping, I have made it available for you to customize. Swapping has now returned to the previous level of accuracy that I had in version 1.x.Ģ. Especially if you are using some clever way to prevent specific parts of the sprite from drawing with an alternate palette, as Ajmal was.ġ. So, in the previous 2.0, when using an alt palette every single pixel you draw WILL use a color from the alt palette. Alright, so, after working with Ajmal who is using the asset in his recent game jam game, I realized that my idea to make palette swapping "more lenient" was probably a bad idea.
