https://github.com/increpare/colourpalettizer3dtexture
A postprocessing effect for godot 4.4 that clamps the colours to a particular palette (generated by an image)
https://github.com/increpare/colourpalettizer3dtexture
color-palette colour-palette godot godot4-4 godotengine posteffect shaders
Last synced: 7 months ago
JSON representation
A postprocessing effect for godot 4.4 that clamps the colours to a particular palette (generated by an image)
- Host: GitHub
- URL: https://github.com/increpare/colourpalettizer3dtexture
- Owner: increpare
- Created: 2025-03-14T22:22:24.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-03-14T22:39:43.000Z (7 months ago)
- Last Synced: 2025-03-14T23:25:33.896Z (7 months ago)
- Topics: color-palette, colour-palette, godot, godot4-4, godotengine, posteffect, shaders
- Language: GDScript
- Homepage:
- Size: 48.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# COLOUR PALETTIZER for GODOT

A small godot posteffect that fixes the colour palette. Other approaches I've seen do pretty heavy-duty shaders iterating over palettes, but this one generates a 3d texture in advance and just uses that as a lookup.
## How to use

Look at the demo scene - the core is just the CanvasLayer and the Color Rect. Load an image int 'pattern source', and the script will generate the texture 3D and apply it to the postprocessmaterial on the colorrect (only at runtime right now - this can be a bit slow so ideally it would be nice to be able to save it...it shouldn't be hard to do).
You can supply anything as a palette - I use screenshots of palletes from aseprite:

You can also use screenshots of anything - my suggestion though is to downscale/blur the image in your favourite image editor, and then to reduce the colour palette of the image down to 64/128 colors - otherwise the search process can be *very* slow.

To tweak the noise, just look at the material attached to ColorRect and play around:
