From dccd6989b2d23358ee6b9e054d62ee6cd2d5ac0d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 20 Mar 2021 16:49:12 +0900 Subject: [PATCH] [vulkan] Implement gamma correction Currently hard-coded to 0.67 (1/1.5), but it does the job for now. --- libs/video/renderer/vulkan/shader/compose.frag | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/video/renderer/vulkan/shader/compose.frag b/libs/video/renderer/vulkan/shader/compose.frag index 39ac94845..631737c67 100644 --- a/libs/video/renderer/vulkan/shader/compose.frag +++ b/libs/video/renderer/vulkan/shader/compose.frag @@ -15,5 +15,6 @@ main (void) o = subpassLoad (opaque).rgb; t = subpassLoad (translucent); c = mix (o, t.rgb, t.a); + c = pow (c, vec3(0.67));//FIXME make gamma correction configurable frag_color = vec4 (c, 1); }