Commit b6a3d570 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Clean up more dead uniforms

parent 64f7a61c
......@@ -1266,7 +1266,6 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("ssao_radius");
mReservedUniforms.push_back("ssao_max_radius");
mReservedUniforms.push_back("ssao_factor");
mReservedUniforms.push_back("ssao_factor_inv");
mReservedUniforms.push_back("ssao_effect");
mReservedUniforms.push_back("screen_res");
mReservedUniforms.push_back("near_clip");
......@@ -1364,10 +1363,6 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("detail_3");
mReservedUniforms.push_back("alpha_ramp");
mReservedUniforms.push_back("origin");
mReservedUniforms.push_back("fog_color");
mReservedUniforms.push_back("blend_factor");
mReservedUniforms.push_back("no_atmo");
mReservedUniforms.push_back("moisture_level");
......@@ -1378,10 +1373,6 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedUniforms.push_back("moon_brightness");
mReservedUniforms.push_back("cloud_variance");
mReservedUniforms.push_back("sh_input_r");
mReservedUniforms.push_back("sh_input_g");
mReservedUniforms.push_back("sh_input_b");
mReservedUniforms.push_back("sun_moon_glow_factor");
mReservedUniforms.push_back("water_edge");
mReservedUniforms.push_back("sun_up_factor");
......
......@@ -121,8 +121,7 @@ class LLShaderMgr
DEFERRED_SSAO_RADIUS, // "ssao_radius"
DEFERRED_SSAO_MAX_RADIUS, // "ssao_max_radius"
DEFERRED_SSAO_FACTOR, // "ssao_factor"
DEFERRED_SSAO_FACTOR_INV, // "ssao_factor_inv"
DEFERRED_SSAO_EFFECT,
DEFERRED_SSAO_EFFECT, // "ssao_effect"
DEFERRED_SCREEN_RES, // "screen_res"
DEFERRED_NEAR_CLIP, // "near_clip"
DEFERRED_SHADOW_OFFSET, // "shadow_offset"
......@@ -213,10 +212,6 @@ class LLShaderMgr
TERRAIN_DETAIL3, // "detail_3"
TERRAIN_ALPHARAMP, // "alpha_ramp"
SHINY_ORIGIN, // "origin"
FOG_COLOR, // "fog_color"
BLEND_FACTOR, // "blend_factor"
NO_ATMO, // "no_atmo"
......@@ -227,13 +222,8 @@ class LLShaderMgr
HALO_MAP, // "halo_map"
MOON_BRIGHTNESS, // "moon_brightness"
CLOUD_VARIANCE, // "cloud_variance"
SH_INPUT_L1R, // "sh_input_r"
SH_INPUT_L1G, // "sh_input_g"
SH_INPUT_L1B, // "sh_input_b"
SUN_MOON_GLOW_FACTOR, // "sun_moon_glow_factor"
WATER_EDGE_FACTOR, // "water_edge"
SUN_UP_FACTOR, // "sun_up_factor"
......
......@@ -30,7 +30,6 @@ uniform sampler2DRect depthMap;
uniform float ssao_radius;
uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
uniform mat4 inv_proj;
uniform vec2 screen_res;
......
......@@ -32,10 +32,6 @@ uniform mat4 modelview_projection_matrix;
void calcAtmospherics(vec3 inPositionEye);
uniform vec4 origin;
ATTRIBUTE vec3 position;
void passTextureIndex();
ATTRIBUTE vec3 normal;
......
......@@ -38,7 +38,6 @@ uniform sampler2DRect specularRect;
uniform sampler2D noiseMap;
uniform sampler2D lightFunc;
uniform vec3 env_mat[3];
uniform int light_count;
uniform vec4 light[LIGHT_COUNT];
uniform vec4 light_col[LIGHT_COUNT];
......
......@@ -38,8 +38,6 @@ uniform sampler2DRect specularRect;
uniform sampler2D noiseMap;
uniform sampler2D lightFunc;
uniform vec3 env_mat[3];
uniform vec3 color;
uniform float falloff;
uniform float size;
......@@ -50,7 +48,6 @@ VARYING vec3 trans_center;
uniform vec2 screen_res;
uniform mat4 inv_proj;
uniform vec4 viewport;
vec3 getNorm(vec2 pos_screen);
vec4 getPosition(vec2 pos_screen);
......
......@@ -32,10 +32,6 @@ uniform mat4 modelview_projection_matrix;
void calcAtmospherics(vec3 inPositionEye);
uniform vec4 origin;
ATTRIBUTE vec3 position;
void passTextureIndex();
ATTRIBUTE vec3 normal;
......
......@@ -43,8 +43,6 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color);
void calcAtmospherics(vec3 inPositionEye);
uniform vec4 origin;
void main()
{
//transform vertex
......
......@@ -384,14 +384,6 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
{
if (!invisible && shader )
{
LLMatrix4 mat;
mat.initRows(LLVector4(gGLModelView+0),
LLVector4(gGLModelView+4),
LLVector4(gGLModelView+8),
LLVector4(gGLModelView+12));
LLVector3 vec = LLVector3(gShinyOrigin) * mat;
LLVector4 vec4(vec, gShinyOrigin.mV[3]);
shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV);
if (shader_level > 1)
{
cube_map->setMatrix(1);
......@@ -539,11 +531,6 @@ void LLDrawPoolBump::beginFullbrightShiny()
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
if( cube_map )
{
LLMatrix4 mat;
mat.initRows(LLVector4(gGLModelView+0),
LLVector4(gGLModelView+4),
LLVector4(gGLModelView+8),
LLVector4(gGLModelView+12));
shader->bind();
if (LLPipeline::sRenderingHUDs)
{
......@@ -554,10 +541,6 @@ void LLDrawPoolBump::beginFullbrightShiny()
shader->uniform1i(LLShaderMgr::NO_ATMO, 0);
}
LLVector3 vec = LLVector3(gShinyOrigin) * mat;
LLVector4 vec4(vec, gShinyOrigin.mV[3]);
shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV);
cube_map->setMatrix(1);
// Make sure that texture coord generation happens for tex unit 1, as that's the one we use for
// the cube map in the one pass shiny shaders
......
......@@ -291,9 +291,6 @@ static LLTrace::BlockTimerStatHandle FTM_STATESORT_POSTSORT("Post Sort");
static LLStaticHashedString sTint("tint");
static LLStaticHashedString sAmbiance("ambiance");
static LLStaticHashedString sAlphaScale("alpha_scale");
static LLStaticHashedString sNormMat("norm_mat");
static LLStaticHashedString sOffset("offset");
static LLStaticHashedString sScreenRes("screenRes");
static LLStaticHashedString sDelta("delta");
static LLStaticHashedString sDistFactor("dist_factor");
static LLStaticHashedString sKern("kern");
......@@ -8599,14 +8596,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
shader.uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.getF32ptr());
}
if (shader.getUniformLocation(LLShaderMgr::VIEWPORT) != -1)
{
shader.uniform4f(LLShaderMgr::VIEWPORT, (F32) gGLViewport[0],
(F32) gGLViewport[1],
(F32) gGLViewport[2],
(F32) gGLViewport[3]);
}
if (sReflectionRender && !shader.getUniformLocation(LLShaderMgr::MODELVIEW_MATRIX))
{
shader.uniformMatrix4fv(LLShaderMgr::MODELVIEW_MATRIX, 1, FALSE, mReflectionModelView.m);
......@@ -8747,7 +8736,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
F32 ssao_factor = RenderSSAOFactor;
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR, ssao_factor);
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.0 / ssao_factor);
LLVector3 ssao_effect = RenderSSAOEffect;
shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_EFFECT, ssao_effect[0]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment