I’ve made a small demo to show how to use LUT.
To make a Look Up Table texture:
- Make a screenshot (big enough to fit the lut texture, so 1024x??? or more)
- Open/Paste the screenshot in your favourite image editing program (eg. Gimp)
- Paste the default LUT at the top or bottom of the image
- Manipulate the colors of the image (hue, brightness, contrast, saturation, lightness, balance, levels, curves, posterize, desaturate etc)
- Cut the LUT out of the image and save it to disk
tobspr says to set the format to F_rgb16, but I have yet to find a way to save a png with more then 8bpp (other then the Panada3D PNMImage)
EDIT: I looks like I was wrong, and you can load a 8bpp png as F_rgb16 as long as it has no alpha, and also a program called Krita can write 16 bit png with no problems. Files updated.
EDIT 2: fix by rdb, now it uses textureLod
LUT.zip (225 KB)