[vulkan] Clamp composed values to >= 0

This takes care of the nans that got into the output buffer resulting is
weird holes in any overlays.
This commit is contained in:
Bill Currie 2023-07-22 00:43:05 +09:00
parent 99c6c58e25
commit befb3ca31b
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ main (void)
c = subpassLoad (color).rgb;
l = subpassLoad (light).rgb;
e = subpassLoad (emission).rgb;
o = BlendFrags (vec4 (c * l + e, 1)).xyz;
o = max(BlendFrags (vec4 (c * l + e, 1)).xyz, vec3(0));
o = pow (o, vec3(0.83));//FIXME make gamma correction configurable
frag_color = vec4 (o, 1);
}