Skip to content

Commit 32f6889

Browse files
committed
Fix tonemap enablement regression
1 parent 4cfabd4 commit 32f6889

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/engine/renderer/gl_shader.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ struct addedExtension_t {
419419
static const std::vector<addedExtension_t> fragmentVertexAddedExtensions = {
420420
{ glConfig2.gpuShader4Available, 130, "EXT_gpu_shader4" },
421421
{ glConfig2.gpuShader5Available, 400, "ARB_gpu_shader5" },
422+
{ glConfig2.textureFloatAvailable, 130, "ARB_texture_float" },
422423
{ glConfig2.textureGatherAvailable, 400, "ARB_texture_gather" },
423424
{ glConfig2.textureIntegerAvailable, 0, "EXT_texture_integer" },
424425
{ glConfig2.textureRGAvailable, 0, "ARB_texture_rg" },
@@ -866,6 +867,10 @@ static std::string GenEngineConstants() {
866867
AddDefine( str, "r_colorGrading", 1 );
867868
}
868869

870+
if ( r_highPrecisionRendering.Get() ) {
871+
AddDefine( str, "r_highPrecisionRendering", 1 );
872+
}
873+
869874
return str;
870875
}
871876

src/engine/renderer/glsl_source/cameraEffects_fp.glsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ void main()
6262
color *= u_GlobalLightFactor;
6363

6464
#if defined(r_highPrecisionRendering) && defined(HAVE_ARB_texture_float)
65-
color.rgb = TonemapLottes( color.rgb * u_TonemapExposure );
65+
if( u_Tonemap ) {
66+
color.rgb = TonemapLottes( color.rgb * u_TonemapExposure );
67+
}
6668
#endif
6769

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

0 commit comments

Comments
 (0)