Skip to content

Commit 5fcbb99

Browse files
committed
Apply exposure when there is tone mapping or not, the right time
1 parent c5a5037 commit 5fcbb99

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/engine/renderer/glsl_source/cameraEffects_fp.glsl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ void main() {
103103
vec4 color = texture2D(u_CurrentMap, st);
104104
color *= u_GlobalLightFactor;
105105

106-
color.rgb *= u_Exposure;
107-
108106
#if defined(r_highPrecisionRendering) && defined(HAVE_ARB_texture_float)
109107
if( u_Tonemap ) {
110108
#if defined(ADAPTIVE_EXPOSURE_AVAILABLE)
@@ -114,9 +112,15 @@ void main() {
114112
}
115113
#endif
116114

115+
color.rgb *= u_Exposure;
116+
117117
color.rgb = TonemapLottes( color.rgb );
118118
}
119+
else
119120
#endif
121+
{
122+
color.rgb *= u_Exposure;
123+
}
120124

121125
color.rgb = clamp( color.rgb, vec3( 0.0f ), vec3( 1.0f ) );
122126

0 commit comments

Comments
 (0)