GLSL Color LUT

I’ve made a small demo to show how to use LUT.

To make a Look Up Table texture:

  1. Make a screenshot (big enough to fit the lut texture, so 1024x??? or more)
  2. Open/Paste the screenshot in your favourite image editing program (eg. Gimp)
  3. Paste the default LUT at the top or bottom of the image
  4. Manipulate the colors of the image (hue, brightness, contrast, saturation, lightness, balance, levels, curves, posterize, desaturate etc)
  5. 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)

1 Like