Skip to content

Commit 9b3f05e

Browse files
committed
renderer: also set u_SRGB in lightMapping shader for the material system
1 parent 209a6ed commit 9b3f05e

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/engine/renderer/Material.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@ void BindShaderLightMapping( Material* material ) {
946946
}
947947

948948
gl_lightMappingShaderMaterial->SetUniform_ViewOrigin( backEnd.orientation.viewOrigin );
949+
gl_lightMappingShaderMaterial->SetUniform_SRGB( tr.worldLinearizeTexture );
949950
gl_lightMappingShaderMaterial->SetUniform_numLights( backEnd.refdef.numLights );
950951
gl_lightMappingShaderMaterial->SetUniform_ModelMatrix( backEnd.orientation.transformMatrix );
951952
gl_lightMappingShaderMaterial->SetUniform_ModelViewProjectionMatrix( glState.modelViewProjectionMatrix[glState.stackIndex] );

src/engine/renderer/gl_shader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2573,6 +2573,7 @@ GLShader_lightMappingMaterial::GLShader_lightMappingMaterial() :
25732573
u_LightGridScale( this ),
25742574
u_numLights( this ),
25752575
u_Lights( this ),
2576+
u_SRGB( this ),
25762577
u_ShowTris( this ),
25772578
u_MaterialColour( this ),
25782579
u_ProfilerZero( this ),
@@ -3047,4 +3048,4 @@ GlobalUBOProxy::GlobalUBOProxy() :
30473048
u_Tonemap( this ),
30483049
u_TonemapParms( this ),
30493050
u_Exposure( this ) {
3050-
}
3051+
}

src/engine/renderer/gl_shader.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,6 +3068,7 @@ class GLShader_lightMappingMaterial :
30683068
public u_LightGridScale,
30693069
public u_numLights,
30703070
public u_Lights,
3071+
public u_SRGB,
30713072
public u_ShowTris,
30723073
public u_MaterialColour,
30733074
public u_ProfilerZero,

0 commit comments

Comments
 (0)