Skip to content
  • Vitaly Prosyak's avatar
    gl-renderer: shaders implementation of color mapping function · 93c6180c
    Vitaly Prosyak authored
    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: default avatarVitaly Prosyak <vitaly.prosyak@amd.com>
    93c6180c
Loading