dungeon_crawler
diff prototype/src/light.cc @ 78:12a1dcfe91fa
gamma correct rendering
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 26 Oct 2012 21:22:14 +0300 |
parents | d89b403f630b |
children |
line diff
1.1 --- a/prototype/src/light.cc Fri Oct 26 03:03:52 2012 +0300 1.2 +++ b/prototype/src/light.cc Fri Oct 26 21:22:14 2012 +0300 1.3 @@ -130,7 +130,7 @@ 1.4 } 1.5 if((loc = glGetUniformLocation(sdr, "light_color")) != -1) { 1.6 float t = get_time_msec() / 1000.0 + flicker_offset * 4.0; 1.7 - float intens = fbm1(t * 2.0, 2) * 0.5 + 1.0; 1.8 + float intens = intensity * (fbm1(t * 2.0, 2) * 0.5 + 1.0); 1.9 glUniform3f(loc, color.x * intens, color.y * intens, color.z * intens); 1.10 } 1.11 }