Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(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!