Skip to content

Commit

Permalink
Don't set global uniforms in UpdateSurfaceData*
Browse files Browse the repository at this point in the history
  • Loading branch information
VReaperV committed Dec 25, 2024
1 parent cef103f commit 09a785e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/engine/renderer/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ void UpdateSurfaceDataGeneric3D( uint32_t* materials, Material& material, shader

gl_genericShaderMaterial->BindProgram( material.deformIndex );

gl_genericShaderMaterial->SetUniform_ModelMatrix( backEnd.orientation.transformMatrix );
gl_genericShaderMaterial->SetUniform_ModelViewProjectionMatrix( glState.modelViewProjectionMatrix[glState.stackIndex] );

// u_AlphaThreshold
gl_genericShaderMaterial->SetUniform_AlphaTest( pStage->stateBits );

Expand Down Expand Up @@ -192,8 +189,6 @@ void UpdateSurfaceDataLightMapping( uint32_t* materials, Material& material, sha

gl_lightMappingShaderMaterial->BindProgram( material.deformIndex );

gl_lightMappingShaderMaterial->SetUniform_ModelMatrix( backEnd.orientation.transformMatrix );

// u_ColorModulate
colorGen_t rgbGen = SetRgbGen( pStage );
alphaGen_t alphaGen = SetAlphaGen( pStage );
Expand Down Expand Up @@ -385,10 +380,6 @@ void UpdateSurfaceDataLiquid( uint32_t* materials, Material& material, shaderSta
gl_liquidShaderMaterial->SetUniform_FogDensity( fogDensity );
gl_liquidShaderMaterial->SetUniform_FogColor( fogColor );

gl_liquidShaderMaterial->SetUniform_UnprojectMatrix( backEnd.viewParms.unprojectionMatrix );
gl_liquidShaderMaterial->SetUniform_ModelMatrix( backEnd.orientation.transformMatrix );
gl_liquidShaderMaterial->SetUniform_ModelViewProjectionMatrix( glState.modelViewProjectionMatrix[glState.stackIndex] );

// NOTE: specular component is computed by shader.
// FIXME: physical mapping is not implemented.
if ( pStage->enableSpecularMapping ) {
Expand Down

0 comments on commit 09a785e

Please sign in to comment.