mattdesl / glsl-lut

lookup table color transforms for glslify
http://mattdesl.github.io/glsl-lut/example/demo.html
MIT License
175 stars 12 forks source link

Blue colour banding #1

Closed Maxoos closed 9 years ago

Maxoos commented 9 years ago

Thanks for this lovely thing! However, there seem to be a banding issue on the blue colour. Have a look at this sample:

blue_issue

This is the LUT image being used: full_negative_hue

Would love to find a fix for this... Thanks!

mattdesl commented 9 years ago

Are you using gl.LINEAR for both directions? Does the banding appear with the default LUT provided in the repo?

It might be a limitation of the algorithm; since we are not using a true 3D LUT but a pseudo-LUT in 2 directions.

Could also try changing some things to highp (instead of lowp) in the shader.

mattdesl commented 9 years ago

Ok, I just tested and your lookup table is causing the banding. It's probably because you saved with JPG which is a lossy format.

Try taking the original PNG and then apply your adjustments and save as PNG-24 (lossless).

Maxoos commented 9 years ago

Thank you for looking into this.

I tried again with the original LUT, imported into Adobe Lightroom, moved all HUE in HSL to -80 and exported as TIF. Converted to uncompress PNG using Photoshop. It did not make a difference so I think there is a different issue.

Please see this TIFF file out of lightroom. https://drive.google.com/file/d/0B9XeYSGwr2ZSRTFrMXkwdWViOUk/view?usp=sharing

Maxoos commented 9 years ago

Ok so i've accidentally left the color nice reduction on, and so it created some artefacts. Thanks for your time :)

mattdesl commented 9 years ago

Cool! :smile: