Browse Source

Gamma correction

master
gradient 8 years ago
parent
commit
7eace1efe4
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      examples/test/shaders/test.frag

+ 3
- 0
examples/test/shaders/test.frag View File

@ -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);
}

Loading…
Cancel
Save