weston/libweston/renderer-gl
Leandro Ribeiro 32d0bd3d0e compositor: add grayscale output color effect
This adds a new output color effect: grayscale. It takes RGB color as
input and computes a gray pixel color using the luminance formula for
linear sRGB:

Y = 0.2126 * R + 0.7152 * G + 0.0722 * B

Just like the other color effects we have, this only works for sRGB and
are not enabled when color-management is on.

Note: although the technique is designed to be applied in linear, it's
costly to convert to linear and then back to electrical. As doing the
conversion in electrical still gives a reasonable result, we do it this
way. When we add support for color effects with color-management on,
we'll apply the effect in linear.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2026-03-04 13:11:56 -03:00
..
egl-glue.c gl-renderer: add function to query supported rendering formats 2025-09-02 13:34:00 +00:00
fragment.glsl compositor: add grayscale output color effect 2026-03-04 13:11:56 -03:00
gl-renderer-internal.h compositor: add grayscale output color effect 2026-03-04 13:11:56 -03:00
gl-renderer.c compositor: add grayscale output color effect 2026-03-04 13:11:56 -03:00
gl-renderer.h gl-renderer: add function to query supported rendering formats 2025-09-02 13:34:00 +00:00
gl-shader-config-color-transformation.c compositor: add grayscale output color effect 2026-03-04 13:11:56 -03:00
gl-shaders.c compositor: add grayscale output color effect 2026-03-04 13:11:56 -03:00
gl-utils.c gl-renderer: Disable texture validity checks by default 2026-02-13 17:04:05 +00:00
meson.build gl-renderer: Move utilities to new file gl-utils.c 2025-02-06 08:42:56 +00:00
vertex.glsl gl-renderer: Remove sub-mesh wireframe coloring 2024-07-04 14:15:04 +00:00