weston/libweston/renderer-gl
Vitaly Prosyak 93c6180c71 gl-renderer: shaders implementation of color mapping function
The following GL extensions provide support for shaders CM:
 -GL_OES_texture_float_linear makes GL_RGB32F linear filterable.
 -GL ES 3.0 provides Texture3D support in GL API.
 -GL_OES_texture_3D provides sampler3D support in ESSL 1.00.

If abovesaid is supported then renderer sets flag WESTON_CAP_COLOR_OPS
which means that all fields in struct weston_color_transform are
supported, for example, 1DLUT and 3DLUT.

Use GL_OES_texture_3D to implement 3DLUT function which
uses trilinear interpolation for pixel processing or bypass as is.
Quote from https://nick-shaw.github.io/cinematiccolor/luts-and-transforms.html
"3D LUTs have long been embraced by color scientists and are one of
the tools commonly used for gamut mapping. In fact, 3D LUTs are used
within ICC profiles to model the complex device behaviors necessary
for accurate color image reproduction".
Quote from https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-quality-rendering/
chapter-24-using-lookup-tables-accelerate-color
is about interpolation: "By generating intermediate results based
on a weighted average of the eight corners of the bounding cube,
this algorithm is typically sufficient for color processing,
and it is implemented in graphics hardware".

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
2022-02-09 20:42:50 -05:00
..
egl-glue.c gl-renderer: query DRM device given an EGLDisplay 2021-11-25 10:47:39 -03:00
fragment.glsl gl-renderer: shaders implementation of color mapping function 2022-02-09 20:42:50 -05:00
gl-renderer-internal.h gl-renderer: add declaration of color mapping function 2022-02-09 20:42:50 -05:00
gl-renderer.c gl-renderer: shaders implementation of color mapping function 2022-02-09 20:42:50 -05:00
gl-renderer.h gl-renderer: Replace pbuffer-create args with struct 2020-03-20 15:25:24 +00:00
gl-shader-config-color-transformation.c gl-renderer: shaders implementation of color mapping function 2022-02-09 20:42:50 -05:00
gl-shaders.c gl-renderer: shaders implementation of color mapping function 2022-02-09 20:42:50 -05:00
meson.build gl-renderer: implement 3 x 1D LUT color pre-curve 2021-06-21 14:36:33 +00:00
vertex.glsl gl-renderer: move vertex shader into new file 2021-02-25 13:16:02 +02:00