Skip to content

Commit 2d11cdd

Browse files
committed
Remove GLShader_depthReduction::SetShaderProgramUniforms
This shader has hard-coded texture unit bindings in the GLSL, so setting uniforms has no effect.
1 parent 4944b52 commit 2d11cdd

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/engine/renderer/Material.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,7 @@ void MaterialSystem::DepthReduction() {
15261526
uint32_t globalWorkgroupX = ( width + 7 ) / 8;
15271527
uint32_t globalWorkgroupY = ( height + 7 ) / 8;
15281528

1529+
// FIXME: u_DepthMap object on the shader is not actually used
15291530
GL_Bind( tr.currentDepthImage );
15301531
glBindImageTexture( 2, depthImage->texnum, 0, GL_FALSE, 0, GL_WRITE_ONLY, GL_R32F );
15311532

src/engine/renderer/gl_shader.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,10 +2968,6 @@ GLShader_depthReduction::GLShader_depthReduction() :
29682968
u_InitialDepthLevel( this ) {
29692969
}
29702970

2971-
void GLShader_depthReduction::SetShaderProgramUniforms( ShaderProgramDescriptor* shaderProgram ) {
2972-
glUniform1i( glGetUniformLocation( shaderProgram->id, "u_DepthMap" ), 0 );
2973-
}
2974-
29752971
GLShader_clearSurfaces::GLShader_clearSurfaces() :
29762972
GLShader( "clearSurfaces",
29772973
false, "clearSurfaces" ),

src/engine/renderer/gl_shader.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3769,7 +3769,6 @@ class GLShader_depthReduction :
37693769
public u_InitialDepthLevel {
37703770
public:
37713771
GLShader_depthReduction();
3772-
void SetShaderProgramUniforms( ShaderProgramDescriptor* shaderProgram ) override;
37733772
};
37743773

37753774
class GLShader_clearSurfaces :

0 commit comments

Comments
 (0)