Skip to content

Commit

Permalink
Revert "Revert "Enable tonemap.""
Browse files Browse the repository at this point in the history
This reverts commit e573398.
  • Loading branch information
vlj committed Apr 23, 2014
1 parent 7bab6fd commit 77795c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions data/shaders/tonemap.frag
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ out vec4 FragColor;
vec3 getCIEYxy(vec3 rgbColor);
vec3 getRGBFromCIEXxy(vec3 YxyColor);

float exposure = .4;
float whitePoint = 1.5;
float exposure = .3;
float whitePoint = 1.;
float delta = .1;

void main()
Expand All @@ -22,5 +22,6 @@ void main()
vec3 Yxy = getCIEYxy(col.xyz);
float Lp = Yxy.r * exposure / avgLuminance;
Yxy.r = (Lp * (1. * Lp / (whitePoint * whitePoint))) / (1. + Lp);
FragColor.xyz = getRGBFromCIEXxy(Yxy);
FragColor = vec4(getRGBFromCIEXxy(Yxy), 1.);

}
4 changes: 2 additions & 2 deletions src/graphics/post_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,10 @@ void PostProcessing::render()
glDisable(GL_DEPTH_TEST);
glDisable(GL_BLEND);

/* computeLogLuminance(in_rtt);
computeLogLuminance(in_rtt);
toneMap(out_fbo, in_rtt);
std::swap(in_rtt, out_rtt);
std::swap(in_fbo, out_fbo);*/
std::swap(in_fbo, out_fbo);

PROFILER_PUSH_CPU_MARKER("- Bloom", 0xFF, 0x00, 0x00);
if (UserConfigParams::m_bloom)
Expand Down

0 comments on commit 77795c7

Please sign in to comment.