From 3211c6e3089b03d73f2e260be4037304660f834d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 11 Oct 2011 00:26:03 -0500 Subject: SH-2240 WIP on removing lots of string comparisons that were added to deal with exploding amounts of non-built-in GL state --- indra/llrender/llshadermgr.h | 125 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) (limited to 'indra/llrender/llshadermgr.h') diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 2f30103811..9cc2f1bd7f 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -36,9 +36,134 @@ public: LLShaderMgr(); virtual ~LLShaderMgr(); + typedef enum + { + MODELVIEW_MATRIX = 0, + PROJECTION_MATRIX, + INVERSE_PROJECTION_MATRIX, + MODELVIEW_PROJECTION_MATRIX, + NORMAL_MATRIX, + TEXTURE_MATRIX0, + TEXTURE_MATRIX1, + TEXTURE_MATRIX2, + TEXTURE_MATRIX3, + VIEWPORT, + LIGHT_POSITION, + LIGHT_DIRECTION, + LIGHT_ATTENUATION, + LIGHT_DIFFUSE, + LIGHT_AMBIENT, + MULTI_LIGHT_COUNT, + MULTI_LIGHT, + MULTI_LIGHT_COL, + MULTI_LIGHT_FAR_Z, + PROJECTOR_MATRIX, + PROJECTOR_NEAR, + PROJECTOR_P, + PROJECTOR_N, + PROJECTOR_ORIGIN, + PROJECTOR_RANGE, + PROJECTOR_AMBIANCE, + PROJECTOR_SHADOW_INDEX, + PROJECTOR_SHADOW_FADE, + PROJECTOR_FOCUS, + PROJECTOR_LOD, + PROJECTOR_AMBIENT_LOD, + DIFFUSE_COLOR, + HIGHLIGHT_COLOR, + DIFFUSE_MAP, + SPECULAR_MAP, + BUMP_MAP, + ENVIRONMENT_MAP, + CLOUD_NOISE_MAP, + FULLBRIGHT, + LIGHTNORM, + SUNLIGHT_COLOR, + AMBIENT, + BLUE_HORIZON, + BLUE_DENSITY, + HAZE_HORIZON, + HAZE_DENSITY, + CLOUD_SHADOW, + DENSITY_MULTIPLIER, + DISTANCE_MULTIPLIER, + MAX_Y, + GLOW, + CLOUD_COLOR, + CLOUD_POS_DENSITY1, + CLOUD_POS_DENSITY2, + CLOUD_SCALE, + GAMMA, + SCENE_LIGHT_STRENGTH, + LIGHT_CENTER, + LIGHT_SIZE, + LIGHT_FALLOFF, + + GLOW_MIN_LUMINANCE, + GLOW_MAX_EXTRACT_ALPHA, + GLOW_LUM_WEIGHTS, + GLOW_WARMTH_WEIGHTS, + GLOW_WARMTH_AMOUNT, + GLOW_STRENGTH, + GLOW_DELTA, + + DEFERRED_SHADOW_MATRIX, + DEFERRED_ENV_MAT, + DEFERRED_SHADOW_CLIP, + DEFERRED_SUN_WASH, + DEFERRED_SHADOW_NOISE, + DEFERRED_BLUR_SIZE, + DEFERRED_SSAO_RADIUS, + DEFERRED_SSAO_MAX_RADIUS, + DEFERRED_SSAO_FACTOR, + DEFERRED_SSAO_FACTOR_INV, + DEFERRED_SSAO_EFFECT_MAT, + DEFERRED_SCREEN_RES, + DEFERRED_NEAR_CLIP, + DEFERRED_SHADOW_OFFSET, + DEFERRED_SHADOW_BIAS, + DEFERRED_SPOT_SHADOW_BIAS, + DEFERRED_SPOT_SHADOW_OFFSET, + DEFERRED_SUN_DIR, + DEFERRED_SHADOW_RES, + DEFERRED_PROJ_SHADOW_RES, + DEFERRED_DEPTH_CUTOFF, + DEFERRED_NORM_CUTOFF, + + FXAA_TC_SCALE, + FXAA_RCP_SCREEN_RES, + FXAA_RCP_FRAME_OPT, + FXAA_RCP_FRAME_OPT2, + + DOF_FOCAL_DISTANCE, + DOF_BLUR_CONSTANT, + DOF_TAN_PIXEL_ANGLE, + DOF_MAGNIFICATION, + + DEFERRED_DEPTH, + DEFERRED_SHADOW0, + DEFERRED_SHADOW1, + DEFERRED_SHADOW2, + DEFERRED_SHADOW3, + DEFERRED_SHADOW4, + DEFERRED_SHADOW5, + DEFERRED_NORMAL, + DEFERRED_POSITION, + DEFERRED_DIFFUSE, + DEFERRED_SPECULAR, + DEFERRED_NOISE, + DEFERRED_LIGHTFUNC, + DEFERRED_LIGHT, + DEFERRED_BLOOM, + DEFERRED_PROJECTION, + END_RESERVED_UNIFORMS + } eGLSLReservedUniforms; + // singleton pattern implementation static LLShaderMgr * instance(); + virtual void initAttribsAndUniforms(void); + BOOL attachShaderFeatures(LLGLSLShader * shader); void dumpObjectLog(GLhandleARB ret, BOOL warns = TRUE); BOOL linkProgramObject(GLhandleARB obj, BOOL suppress_errors = FALSE); -- cgit v1.2.3 From 2179e1c1f2f3614678d528fe96640728ce663f2e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 2 Nov 2011 13:13:38 -0500 Subject: SH-2541 Fix for speckles on avatar on some cards -- don't use "maximum_alpha" for alpha tests in shaders as it was always being set to 1.0 anyway. --- indra/llrender/llshadermgr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llrender/llshadermgr.h') diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 9cc2f1bd7f..a5150b3e51 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -107,6 +107,8 @@ public: GLOW_STRENGTH, GLOW_DELTA, + MINIMUM_ALPHA, + DEFERRED_SHADOW_MATRIX, DEFERRED_ENV_MAT, DEFERRED_SHADOW_CLIP, -- cgit v1.2.3 From 367d6212ae9e18c398c25fe9e11646bfc801fd90 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 4 Nov 2011 17:07:40 -0500 Subject: SH-2652 Better DoF combine foo --- indra/llrender/llshadermgr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llshadermgr.h') diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index a5150b3e51..82ce2dfff2 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -141,6 +141,7 @@ public: DOF_BLUR_CONSTANT, DOF_TAN_PIXEL_ANGLE, DOF_MAGNIFICATION, + DOF_MAX_COF, DEFERRED_DEPTH, DEFERRED_SHADOW0, -- cgit v1.2.3 From c8f558f6775d62f03d6caab19668df80e95e8a8b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 10 Nov 2011 11:39:08 -0600 Subject: SH-2240 Better fix for red moon -- stop special casing "highlight_color" as a parameter. --- indra/llrender/llshadermgr.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llrender/llshadermgr.h') diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 82ce2dfff2..6ee95339f2 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -70,7 +70,6 @@ public: PROJECTOR_LOD, PROJECTOR_AMBIENT_LOD, DIFFUSE_COLOR, - HIGHLIGHT_COLOR, DIFFUSE_MAP, SPECULAR_MAP, BUMP_MAP, -- cgit v1.2.3 From df546bfba965ec9ec43b7611bb25b5b5ec8f01b5 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 10 Nov 2011 16:12:50 -0600 Subject: SH-2666 Tweak depth of field optimizations based on resident feedback. --- indra/llrender/llshadermgr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llshadermgr.h') diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 6ee95339f2..950e6c9c2f 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -141,6 +141,7 @@ public: DOF_TAN_PIXEL_ANGLE, DOF_MAGNIFICATION, DOF_MAX_COF, + DOF_RES_SCALE, DEFERRED_DEPTH, DEFERRED_SHADOW0, -- cgit v1.2.3