From 7eace1efe4ff334675b9d4cd376611a1d5c5be6c Mon Sep 17 00:00:00 2001 From: gradient Date: Mon, 29 May 2017 23:07:59 -0500 Subject: [PATCH] Gamma correction --- examples/test/shaders/test.frag | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/test/shaders/test.frag b/examples/test/shaders/test.frag index d261ad7..7db54f3 100644 --- a/examples/test/shaders/test.frag +++ b/examples/test/shaders/test.frag @@ -96,5 +96,8 @@ void main() { // color = colormap(iters/MAX_STEPS+0.5); vec3 p = eye + dir * depth; // recast the ray color = shade(p, mat_idx); + + // gamma + color = vec4(pow(clamp(color.xyz, 0.0, 1.0), vec3(0.4545)), 1.0); } -- 2.11.4.GIT