openFrameworks addon to apply LUT (Color Lookup Table) filters
with a GPU shader using standard .cube
files. (sizes 16, 32, 64)
All process is done live and fast into the GPU
It's faster than other alternatives that use the CPU.
(like the bundled openFrameworks\examples\graphics\lutFilterExample
)
Inspired from:
https://github.com/yasuhirohoshino/ofxGpuLut
that does the almost same GPU process but with special .png
files.
An useful Windows-only free app to batch convert and create LUT files:
https://grossgrade.com/
#include "ofxGpuLutCube.h"
ofxGpuLutCube GpuLutCube;
//setup()
GpuLutCube.setup();
//update() or draw()
GpuLutCube.begin();
{
//draw and feed your scene here
}
GpuLutCube.end();
//draw()
GpuLutCube.draw();
//gui
GpuLutCube.drawGui();
//help
GpuLutCube.drawHelp();
//helper methods
GpuLutCube.loadNext();
GpuLutCube.loadPrevious();
GpuLutCube.loadLut(int i);
GpuLutCube.loadRandomize();
- Browsing LUT files folder using GUI or keys.
- Easy integration into your
ofApp
with anofParameterGroup
and anofxGui
panel - Float parameter to set filter mix/dry.
- Int parameter to select
LUT index
. - String parameter to show
LUT name
. - Included example with
/data/
files (291.cube
files + shader files).(Remember to include/data
files!) - Two testing images. Left/Right keys to select images.
- OF 0.11
- Visual Studio 2017
Addon modifications by MoebiusSurfing
https://github.com/moebiussurfing
Based on and using the code of HUBRIS:
https://github.com/youandhubris/GPU-LUT-OpenFrameworks
https://forum.openframeworks.cc/t/gpu-lut-photoshop/18070
BY HUBRIS
[http://cargocollective.com/hubris]
[http://github.com/youandhubris]
THANKS to @johanjohan:
https://github.com/johanjohan
to point me to this source here:
yasuhirohoshino/ofxGpuLut#3
pow2 snippet from @johanjohan.
THANKS to:
https://github.com/yasuhirohoshino
for the original https://github.com/yasuhirohoshino/ofxGpuLut
- Set custom draw position and size (x, y, w, h).
- A better solution to realtime vertical flip that sometimes happens.
- To not use internal FBO or add getter/setter to use by reference.
- A faster loader of files, threaded or cache some files.
- Settings to store/load LUT by name.
.cube
files browser system and thumbs maybe withofxImGui
.
PLEASE FEEL FREE TO ADD MODIFICATIONS/ISSUES/FEATURES AND TO SEND ME PULL REQUESTS
MIT License.