Big List of Defold Pro Tips!

Easily desaturate the color of sprites with this custom sprite shader.

Based on this post

A modified sprite shader (other shaders can be modified in same way) that adds ability to change saturation in the same way tinting was previously mentioned. I changed the example slightly (did I misunderstand this?) because it seems fully 1 makes whatever is being unsaturated fully desaturated, but in the code it was ignoring a full value of 1. A value of 0 does not modify it however. Default value is 0.

materials.zip (1.3 KB)

Put into main folder and the shader can be applied to sprites.

12 Likes