Skip to content

Commit b78db1f

Browse files
committed
Fix lighttile shader texture bindings
In bindful texture mode the wrong image was being used for the depth image: depthtile1RenderImage instead of the intended depthtile2RenderImage. Fixes #1734.
1 parent dadb32c commit b78db1f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/engine/renderer/gl_shader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2982,7 +2982,7 @@ GLShader_lighttile::GLShader_lighttile() :
29822982

29832983
void GLShader_lighttile::SetShaderProgramUniforms( ShaderProgramDescriptor *shaderProgram )
29842984
{
2985-
glUniform1i( glGetUniformLocation( shaderProgram->id, "u_DepthMap" ), 0 );
2985+
glUniform1i( glGetUniformLocation( shaderProgram->id, "u_DepthTile2" ), 0 );
29862986
}
29872987

29882988
GLShader_fxaa::GLShader_fxaa() :

src/engine/renderer/tr_backend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ void RB_RenderPostDepthLightTile()
13061306
gl_lighttileShader->SetUniformBlock_Lights( tr.dlightUBO );
13071307

13081308
gl_lighttileShader->SetUniform_DepthTile2Bindless(
1309-
GL_BindToTMU( 1, tr.depthtile2RenderImage )
1309+
GL_BindToTMU( 0, tr.depthtile2RenderImage )
13101310
);
13111311

13121312
R_BindVBO( tr.lighttileVBO );

0 commit comments

Comments
 (0)