Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

It can be applied to a single sprite2D node (if you want the effect for that node only), or it can be applied to a control node (I've tested it on a ColorRect) that covers the entire viewport to have a full screen effect.

This is an example with 2 AnimatedSpriteNode2D with the same sprite, but two different palette applied to the shader.



Did you have a different use case in mind? To provide a more tailored response, could you please share additional details about the specific use case you have in mind?

I have a spritesheet with the animations of a sprite of a football player. I want to change the color of the tshirt without having to create a new spritesheet with the new palette and I was wondering if your tool could help.

Thanks for the interest!

(2 edits)

So basically something like this:


You should be able to do that with these steps:

1. import the shader in your Godot project.

2. select the sprite2D node for your character.

3. in the inspector assign a new shader material to the node and select the imported shader in the "shader" property. 


4. in your sprite editor of choice (I use Aseprite) , create two palettes. A default palette with your default t-shirt color (you can include every color you wish to be changed), and a second palette with the same size of the default palette, and just change some of the colors. Make sure the default palette has the same colors of your character t-shirt!


5. assign the two palettes to the shader in the inspector.

6. set the tolerance to some low value (0.01)

7. now you should be able to control the effect intensity by changing the "weight" property. 

 You can change any of the shader properties from a script like so: 

 (material as ShaderMaterial).set_shader_parameter("weight", 1.0). 

 Hope this helps! Let me know if you need anything else.

Thanks so much for the explanation! I will try it for sure!