Godot: O(1) color quantization shader and pixel palette to LUT conversion project
A downloadable tool
Credits
Shader code by Markolainen and ChatGPT (i.e. frankencode of unknown authors).
Code for sSRG to Oklab (as well as coming upp with Oklab) Björn Ottosson.
Code for OKlab to sRGB by earthbound19.
Resurrect 64 Palette by Kerrie Lake.
Image by mijung Park.
What is it?
This is two things, of which one is a shader which applies a LUT on your screen, in this case used for color quantization.
The second thing is code to convert any single pixel high palette image into a LUT. This conversion is done by checking color difference in Oklab color space.
If you want to know more you'll find resources explaning this better than me. :)
How to use it
Make any palette image file with 1 pixel height the texture of of DoesStuff. Run the project and it'll export a LUT as export.png. This can then be used by setting is as the LUT in the shader code.
This project does automatically set the created LUT as the LUT for the shader, so you can test the effect with the mouse cursor.
Published | 15 days ago |
Status | Released |
Category | Tool |
Author | markolainen |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.