Skip to content

Commit 2ac3515

Browse files
committed
Rename u_TonemapExposure -> u_Exposure
since it can now be used without tone mapping.
1 parent 634a02b commit 2ac3515

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/engine/renderer/gl_shader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,7 @@ GLShader_cameraEffects::GLShader_cameraEffects() :
28342834
u_SRGB( this ),
28352835
u_Tonemap( this ),
28362836
u_TonemapParms( this ),
2837-
u_TonemapExposure( this ),
2837+
u_Exposure( this ),
28382838
u_InverseGamma( this )
28392839
{
28402840
}
@@ -3095,5 +3095,5 @@ GlobalUBOProxy::GlobalUBOProxy() :
30953095
u_InverseGamma( this ),
30963096
u_Tonemap( this ),
30973097
u_TonemapParms( this ),
3098-
u_TonemapExposure( this ) {
3098+
u_Exposure( this ) {
30993099
}

src/engine/renderer/gl_shader.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,15 +2815,15 @@ class u_TonemapParms :
28152815
}
28162816
};
28172817

2818-
class u_TonemapExposure :
2818+
class u_Exposure :
28192819
GLUniform1f {
28202820
public:
2821-
u_TonemapExposure( GLShader* shader ) :
2822-
GLUniform1f( shader, "u_TonemapExposure", FRAME ) {
2821+
u_Exposure( GLShader* shader ) :
2822+
GLUniform1f( shader, "u_Exposure", FRAME ) {
28232823
}
28242824

2825-
void SetUniform_TonemapExposure( float tonemapExposure ) {
2826-
this->SetValue( tonemapExposure );
2825+
void SetUniform_Exposure( float exposure ) {
2826+
this->SetValue( exposure );
28272827
}
28282828
};
28292829

@@ -3290,7 +3290,7 @@ class GLShader_cameraEffects :
32903290
public u_SRGB,
32913291
public u_Tonemap,
32923292
public u_TonemapParms,
3293-
public u_TonemapExposure,
3293+
public u_Exposure,
32943294
public u_InverseGamma
32953295
{
32963296
public:
@@ -3520,7 +3520,7 @@ class GlobalUBOProxy :
35203520
public u_InverseGamma,
35213521
public u_Tonemap,
35223522
public u_TonemapParms,
3523-
public u_TonemapExposure {
3523+
public u_Exposure {
35243524

35253525
public:
35263526
GlobalUBOProxy();

src/engine/renderer/glsl_source/cameraEffects_fp.glsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ z: shoulderClip
6262
w: highlightsCompression */
6363
uniform bool u_Tonemap;
6464
uniform vec4 u_TonemapParms;
65-
uniform float u_TonemapExposure;
65+
uniform float u_Exposure;
6666

6767
vec3 TonemapLottes( vec3 color ) {
6868
// Lottes 2016, "Advanced Techniques and Optimization of HDR Color Pipelines"
@@ -88,7 +88,7 @@ void main()
8888
convertToSRGB( color.rgb );
8989
}
9090

91-
color.rgb *= u_TonemapExposure;
91+
color.rgb *= u_Exposure;
9292

9393
#if defined(r_highPrecisionRendering) && defined(HAVE_ARB_texture_float)
9494
if( u_Tonemap ) {

src/engine/renderer/tr_backend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,7 @@ void RB_CameraPostFX() {
17371737
gl_cameraEffectsShader->SetUniform_InverseGamma( 1.0 / r_gamma->value );
17381738

17391739
gl_cameraEffectsShader->SetUniform_SRGB( tr.worldLinearizeTexture );
1740-
gl_cameraEffectsShader->SetUniform_TonemapExposure( r_toneMappingExposure.Get() );
1740+
gl_cameraEffectsShader->SetUniform_Exposure( r_toneMappingExposure.Get() );
17411741

17421742
const bool tonemap = r_toneMapping.Get() && r_highPrecisionRendering.Get() && glConfig.textureFloatAvailable;
17431743
if ( tonemap ) {
@@ -2889,7 +2889,7 @@ static void SetFrameUniforms() {
28892889

28902890
globalUBOProxy->SetUniform_ColorModulate( tr.viewParms.gradingWeights );
28912891
globalUBOProxy->SetUniform_InverseGamma( 1.0f / r_gamma->value );
2892-
globalUBOProxy->SetUniform_TonemapExposure( r_toneMappingExposure.Get() );
2892+
globalUBOProxy->SetUniform_Exposure( r_toneMappingExposure.Get() );
28932893

28942894
const bool tonemap = r_toneMapping.Get() && r_highPrecisionRendering.Get() && glConfig.textureFloatAvailable;
28952895
if ( tonemap ) {

0 commit comments

Comments
 (0)