Skip to content

WIP | GSK GL: Add compositing gamma correction

Marcus Gursch requested to merge mgursch/gtk:gtk-compositing-gamma into master

This merge request adds support for compositing gamma correction in the OpenGL backend of GSK. Additionally, a global (per display) compositing gamma setting is added to gdk. This setting can be adjusted with the "Compositing Gamma" slider found in Inspector/Global/Settings.

Marked as WIP due to regressions which have yet to be sorted out:

  • Partial updates are currently deactivated (only in GSK GL)
  • For some types of node, no linearization is applied, making them appear lighter the higher gamma is set:
    • GtkVideo
    • GL shader nodes which "produce" colors (rather than transforming/processing some underlying texture)
  • Slight banding appears for dark gradients when gamma is set high. Using higher precision (e.g. GL_RGBA16F) backbuffer color formats fixes this but breaks some shaders in the gtk4 demo application.
  • Also breaks integer UI scaling.
Edited by Marcus Gursch

Merge request reports