Skip to content

Commit

Permalink
fixup: legacy forward lighting doesn't need lightFactor
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Nov 8, 2024
1 parent 303bb3a commit 2035c32
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions src/engine/renderer/gl_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,6 @@ GLShader_forwardLighting_omniXYZ::GLShader_forwardLighting_omniXYZ( GLShaderMana
u_ViewOrigin( this ),
u_LightOrigin( this ),
u_LightColor( this ),
u_LightFactor( this ),
u_LightRadius( this ),
u_LightScale( this ),
u_LightAttenuationMatrix( this ),
Expand Down Expand Up @@ -2512,7 +2511,6 @@ GLShader_forwardLighting_projXYZ::GLShader_forwardLighting_projXYZ( GLShaderMana
u_ViewOrigin( this ),
u_LightOrigin( this ),
u_LightColor( this ),
u_LightFactor( this ),
u_LightRadius( this ),
u_LightScale( this ),
u_LightAttenuationMatrix( this ),
Expand Down Expand Up @@ -2577,7 +2575,6 @@ GLShader_forwardLighting_directionalSun::GLShader_forwardLighting_directionalSun
u_ViewOrigin( this ),
u_LightDir( this ),
u_LightColor( this ),
u_LightFactor( this ),
u_LightRadius( this ),
u_LightScale( this ),
u_LightAttenuationMatrix( this ),
Expand Down
3 changes: 0 additions & 3 deletions src/engine/renderer/gl_shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -4130,7 +4130,6 @@ class GLShader_forwardLighting_omniXYZ :
public u_ViewOrigin,
public u_LightOrigin,
public u_LightColor,
public u_LightFactor,
public u_LightRadius,
public u_LightScale,
public u_LightAttenuationMatrix,
Expand Down Expand Up @@ -4174,7 +4173,6 @@ class GLShader_forwardLighting_projXYZ :
public u_ViewOrigin,
public u_LightOrigin,
public u_LightColor,
public u_LightFactor,
public u_LightRadius,
public u_LightScale,
public u_LightAttenuationMatrix,
Expand Down Expand Up @@ -4225,7 +4223,6 @@ class GLShader_forwardLighting_directionalSun :
public u_ViewOrigin,
public u_LightDir,
public u_LightColor,
public u_LightFactor,
public u_LightRadius,
public u_LightScale,
public u_LightAttenuationMatrix,
Expand Down
1 change: 0 additions & 1 deletion src/engine/renderer/glsl_source/forwardLighting_fp.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ uniform vec3 u_LightDir;
uniform vec3 u_LightOrigin;
#endif
uniform vec3 u_LightColor;
uniform float u_LightFactor;
uniform float u_LightRadius;
uniform float u_LightScale;
uniform float u_AlphaThreshold;
Expand Down
9 changes: 0 additions & 9 deletions src/engine/renderer/tr_shade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,9 +1416,6 @@ static void Render_forwardLighting_DBS_omni( shaderStage_t *pStage,
// u_AlphaThreshold
gl_forwardLightingShader_omniXYZ->SetUniform_AlphaTest( pStage->stateBits );

// u_LightFactor
gl_forwardLightingShader_omniXYZ->SetUniform_LightFactor( tr.mapLightFactor );

// bind u_HeightMap
if ( pStage->enableReliefMapping )
{
Expand Down Expand Up @@ -1594,9 +1591,6 @@ static void Render_forwardLighting_DBS_proj( shaderStage_t *pStage,
// u_AlphaThreshold
gl_forwardLightingShader_projXYZ->SetUniform_AlphaTest( pStage->stateBits );

// u_LightFactor
gl_forwardLightingShader_projXYZ->SetUniform_LightFactor( tr.mapLightFactor );

// bind u_HeightMap
if ( pStage->enableReliefMapping )
{
Expand Down Expand Up @@ -1773,9 +1767,6 @@ static void Render_forwardLighting_DBS_directional( shaderStage_t *pStage, trRef
// u_AlphaThreshold
gl_forwardLightingShader_directionalSun->SetUniform_AlphaTest( pStage->stateBits );

// u_LightFactor
gl_forwardLightingShader_directionalSun->SetUniform_LightFactor( tr.mapLightFactor );

// bind u_HeightMap
if ( pStage->enableReliefMapping )
{
Expand Down

0 comments on commit 2035c32

Please sign in to comment.