View Full Version : LUT into OpenGL

06-04-2014, 10:57 PM
Hi guys, I'm working on making some vintage camera filters and using LUTs that I need to render in OpenGL ES (for iphone).

Any ideas of how I could get these LUTs into OpenGL?


06-05-2014, 01:29 AM
A 2D texture with nearest filtering is bascially a 2D LUT. What kind of filter do you want to simulate?

06-05-2014, 07:16 PM
Thanks for the reply thokra. I'm trying to create a generator to add noise to video when recording. Think 8mm or something of that nature. Also trying to recreate an 80s video camera like the Sony HVC 3000 (https://www.youtube.com/watch?v=o4kH4GRQoG4).


06-06-2014, 04:37 AM
Although in the GLSL spec, no vendor to this day seems to actually implement GLSL noise functions. So, you'll have to search for ways to generate noise in a shader. This article presents an interesting new approach to generating 2D noise - which you should be able to port to GLSL. Also, if you look for "noise glsl" you'll surely find stuff - I guarantee. ;) Once you do, you can apply noise to each fragment as needed.

If you don't want to generate noise on the fly, you can always precompute or externally generate a noise texture (i.e with GIMP or Photoshop), and try various ways if shifting the tex coords you use to look up values in the texture to get randomized appearance.

For the 80s camera effect, you'd probably want some color transformation to change saturation, contrast and so on.