Skip to content

Commit 8e1d491

Browse files
committed
Remove unused uniform u_ViewUp
1 parent e101fed commit 8e1d491

File tree

4 files changed

+1
-22
lines changed

4 files changed

+1
-22
lines changed

src/engine/renderer/Material.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,6 @@ void BindShaderGeneric3D( Material* material ) {
740740
// Set shader uniforms.
741741
if ( material->tcGenEnvironment ) {
742742
gl_genericShaderMaterial->SetUniform_ViewOrigin( backEnd.orientation.viewOrigin );
743-
gl_genericShaderMaterial->SetUniform_ViewUp( backEnd.orientation.axis[2] );
744743
}
745744

746745
gl_genericShaderMaterial->SetUniform_ModelMatrix( backEnd.orientation.transformMatrix );

src/engine/renderer/gl_shader.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,7 +1726,7 @@ std::string GLShaderManager::ShaderPostProcess( GLShader *shader, const std::str
17261726

17271727
/* Remove local uniform declarations, but avoid removing uniform / storage blocks;
17281728
* their values will be sourced from a buffer instead
1729-
* Global uniforms (like u_ViewUp and u_ViewOrigin) will still be set as regular uniforms */
1729+
* Global uniforms (like u_ViewOrigin) will still be set as regular uniforms */
17301730
while( std::getline( shaderTextStream, line, '\n' ) ) {
17311731
bool skip = false;
17321732
if ( line.find( "uniform" ) < line.find( "//" ) && line.find( ";" ) != std::string::npos ) {
@@ -2460,7 +2460,6 @@ GLShader_generic::GLShader_generic() :
24602460
u_DepthMap( this ),
24612461
u_TextureMatrix( this ),
24622462
u_ViewOrigin( this ),
2463-
u_ViewUp( this ),
24642463
u_AlphaThreshold( this ),
24652464
u_ModelMatrix( this ),
24662465
u_ModelViewProjectionMatrix( this ),
@@ -2495,7 +2494,6 @@ GLShader_genericMaterial::GLShader_genericMaterial() :
24952494
u_DepthMap( this ),
24962495
u_TextureMatrix( this ),
24972496
u_ViewOrigin( this ),
2498-
u_ViewUp( this ),
24992497
u_AlphaThreshold( this ),
25002498
u_ModelMatrix( this ),
25012499
u_ModelViewProjectionMatrix( this ),

src/engine/renderer/gl_shader.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2712,21 +2712,6 @@ class u_ViewOrigin :
27122712
}
27132713
};
27142714

2715-
class u_ViewUp :
2716-
GLUniform3f
2717-
{
2718-
public:
2719-
u_ViewUp( GLShader *shader ) :
2720-
GLUniform3f( shader, "u_ViewUp", true )
2721-
{
2722-
}
2723-
2724-
void SetUniform_ViewUp( const vec3_t v )
2725-
{
2726-
this->SetValue( v );
2727-
}
2728-
};
2729-
27302715
class u_LightDir :
27312716
GLUniform3f
27322717
{
@@ -4066,7 +4051,6 @@ class GLShader_generic :
40664051
public u_DepthMap,
40674052
public u_TextureMatrix,
40684053
public u_ViewOrigin,
4069-
public u_ViewUp,
40704054
public u_AlphaThreshold,
40714055
public u_ModelMatrix,
40724056
public u_ModelViewProjectionMatrix,
@@ -4097,7 +4081,6 @@ class GLShader_genericMaterial :
40974081
public u_DepthMap,
40984082
public u_TextureMatrix,
40994083
public u_ViewOrigin,
4100-
public u_ViewUp,
41014084
public u_AlphaThreshold,
41024085
public u_ModelMatrix,
41034086
public u_ModelViewProjectionMatrix,

src/engine/renderer/tr_shade.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,6 @@ void Render_generic3D( shaderStage_t *pStage )
931931
{
932932
// calculate the environment texcoords in object space
933933
gl_genericShader->SetUniform_ViewOrigin( backEnd.orientation.viewOrigin );
934-
gl_genericShader->SetUniform_ViewUp( backEnd.orientation.axis[ 2 ] );
935934
}
936935

937936
// u_AlphaThreshold

0 commit comments

Comments
 (0)