diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 1 | ||||
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 10 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 10 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 17 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/environment/srgbF.glsl | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/transportF.glsl | 60 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl | 12 | ||||
-rw-r--r-- | indra/newview/lldrawpoolalpha.cpp | 16 | ||||
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 57 |
12 files changed, 70 insertions, 128 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index b7f08aa9af..017634a2b9 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -89,7 +89,6 @@ LLShaderFeatures::LLShaderFeatures() , isAlphaLighting(false) , isSpecular(false) , hasWaterFog(false) - , hasTransport(false) , hasSkinning(false) , hasObjectSkinning(false) , hasAtmospherics(false) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index e1679c7f52..e5211d9548 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -276,7 +276,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) } } - if (features->hasAtmospherics || features->isDeferred || features->hasTransport) + if (features->hasAtmospherics || features->isDeferred) { if (!shader->attachFragmentObject("windlight/atmosphericsFuncs.glsl")) { return FALSE; @@ -288,14 +288,6 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader) } } - if (features->hasTransport) - { - if (!shader->attachFragmentObject("windlight/transportF.glsl")) - { - return FALSE; - } - } - // NOTE order of shader object attaching is VERY IMPORTANT!!! if (features->hasWaterFog) { diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index dd0ea0096c..b5dda23828 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -699,6 +699,16 @@ bool LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of } } + LLVector4a* v = (LLVector4a*)mMappedData; + + for (U32 i = start; i <= end; ++i) + { + if (!v->isFinite3()) + { + LL_ERRS() << "Non-finite vertex position data detected." << LL_ENDL; + } + } + LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; if (shader && shader->mFeatures.mIndexedTextureChannels > 1) diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl index 3c51a8e44c..c8d6e395a3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl @@ -29,8 +29,6 @@ out vec4 frag_color; -vec3 fullbrightAtmosTransport(vec3 light); - VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index 5515d8e2a3..631ffc9625 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -45,7 +45,8 @@ vec3 srgb_to_linear(vec3 cs); vec3 legacy_adjust_fullbright(vec3 c); vec3 legacy_adjust(vec3 c); vec3 linear_to_srgb(vec3 cl); -vec3 fullbrightAtmosTransport(vec3 light); +vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten); +void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao); #ifdef HAS_ALPHA_MASK uniform float minimum_alpha; @@ -79,8 +80,18 @@ void main() color.rgb *= vertex_color.rgb; -#ifdef WATER_FOG vec3 pos = vary_position; + +#ifndef IS_HUD + vec3 sunlit; + vec3 amblit; + vec3 additive; + vec3 atten; + calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false); +#endif + +#ifdef WATER_FOG + vec4 fogged = applyWaterFogView(pos, vec4(color.rgb, final_alpha)); color.rgb = fogged.rgb; color.a = fogged.a; @@ -92,7 +103,7 @@ void main() color.rgb = legacy_adjust(color.rgb); color.rgb = srgb_to_linear(color.rgb); color.rgb = legacy_adjust_fullbright(color.rgb); - color.rgb = fullbrightAtmosTransport(color.rgb); + color.rgb = atmosFragLighting(color.rgb, additive, atten); #endif frag_color = max(color, vec4(0)); diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl index 406a7ef3b3..370aa75d04 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl @@ -23,8 +23,6 @@ * $/LicenseInfo$ */ -/*[EXTRA_CODE_HERE]*/ - out vec4 frag_color; void main() diff --git a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl index 3817633df0..689c345b2c 100644 --- a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl @@ -125,6 +125,6 @@ vec3 legacy_adjust(vec3 c) vec3 legacy_adjust_fullbright(vec3 c) { float exp_scale = texture(exposureMap, vec2(0.5, 0.5)).r; - return c / exp_scale * 1.34; + return c / exp_scale * 1.34; //magic 1.34 arrived at by binary search for a value that reproduces midpoint grey consistenty } diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl deleted file mode 100644 index 8221ba9516..0000000000 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @file class2\wl\transportF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -////////////////////////////////////////////////////////// -// The fragment shader for the terrain atmospherics -////////////////////////////////////////////////////////// - -vec3 getAdditiveColor(); -vec3 getAtmosAttenuation(); - -vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten); - -// the below implementations are deprecated but remain here as adapters for shaders that haven't been refactored yet - -vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - return atmosFragLighting(light, additive, atten); -} - -vec3 atmosTransport(vec3 light) -{ - return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation()); -} - -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - return atmosTransportFrag(light, additive, atten); -} - -vec3 fullbrightAtmosTransport(vec3 light) -{ - return atmosTransport(light); -} - -vec3 fullbrightShinyAtmosTransport(vec3 light) -{ - return atmosTransport(light); -} diff --git a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl index 6b7dc7ac1d..f1b1997c43 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl @@ -43,8 +43,9 @@ VARYING vec3 vary_position; uniform samplerCube environmentMap; -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten); - +vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten); +vec3 legacy_adjust_fullbright(vec3 c); +vec3 legacy_adjust(vec3 c); void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao); vec3 linear_to_srgb(vec3 c); @@ -84,10 +85,13 @@ void main() vec3 norm = normalize(vary_texcoord1.xyz); vec4 spec = vec4(0,0,0,0); sampleReflectionProbesLegacy(ambenv, glossenv, legacyenv, vec2(0), pos.xyz, norm.xyz, spec.a, env_intensity); - applyLegacyEnv(color.rgb, legacyenv, spec, pos, norm, env_intensity); + color.rgb = legacy_adjust(color.rgb); color.rgb = srgb_to_linear(color.rgb); - color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten); + color.rgb = legacy_adjust_fullbright(color.rgb); + + applyLegacyEnv(color.rgb, legacyenv, spec, pos, norm, env_intensity); + color.rgb = atmosFragLighting(color.rgb, additive, atten); #endif color.a = 1.0; diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index f8d2a9e942..7893caf3c0 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -138,12 +138,6 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); } - S32 channel = shader->enableTexture(LLShaderMgr::EXPOSURE_MAP); - if (channel > -1) - { - gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap); - } - //also prepare rigged variant if (shader->mRiggedVariant && shader->mRiggedVariant != shader) { @@ -754,7 +748,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) target_shader = fullbright_shader; } - if (params.mAvatar != nullptr) { target_shader = target_shader->mRiggedVariant; @@ -764,6 +757,15 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) {// If we need shaders, and we're not ALREADY using the proper shader, then bind it // (this way we won't rebind shaders unnecessarily). gPipeline.bindDeferredShaderFast(*target_shader); + + if (params.mFullbright) + { // make sure the bind the exposure map for fullbright shaders so they can cancel out exposure + S32 channel = target_shader->enableTexture(LLShaderMgr::EXPOSURE_MAP); + if (channel > -1) + { + gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap); + } + } } LLVector4 spec_color(1, 1, 1, 1); diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 38768a19c8..a0ce0ef6cf 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -298,13 +298,20 @@ void LLDrawPoolBump::beginFullbrightShiny() { shader = &gHUDFullbrightShinyProgram; } - + if (mRigged) { llassert(shader->mRiggedVariant); shader = shader->mRiggedVariant; } + // bind exposure map so fullbright shader can cancel out exposure + S32 channel = shader->enableTexture(LLShaderMgr::EXPOSURE_MAP); + if (channel > -1) + { + gGL.getTexUnit(channel)->bind(&gPipeline.mExposureMap); + } + LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL; if (cube_map && !LLPipeline::sReflectionProbesEnabled) diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 4ceef07e72..291a23d117 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -735,7 +735,6 @@ std::string LLViewerShaderMgr::loadBasicShaders() index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/gammaF.glsl", mShaderLevel[SHADER_WINDLIGHT]) ); index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsFuncs.glsl", mShaderLevel[SHADER_WINDLIGHT] ) ); index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/atmosphericsF.glsl", mShaderLevel[SHADER_WINDLIGHT] ) ); - index_channels.push_back(-1); shaders.push_back( make_pair( "windlight/transportF.glsl", mShaderLevel[SHADER_WINDLIGHT] ) ); index_channels.push_back(-1); shaders.push_back( make_pair( "environment/waterFogF.glsl", mShaderLevel[SHADER_WATER] ) ); index_channels.push_back(-1); shaders.push_back( make_pair( "environment/encodeNormF.glsl", mShaderLevel[SHADER_ENVIRONMENT] ) ); index_channels.push_back(-1); shaders.push_back( make_pair( "environment/srgbF.glsl", mShaderLevel[SHADER_ENVIRONMENT] ) ); @@ -791,8 +790,7 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterProgram.mFeatures.hasAtmospherics = true; gWaterProgram.mFeatures.hasWaterFog = true; gWaterProgram.mFeatures.hasGamma = true; - gWaterProgram.mFeatures.hasTransport = true; - gWaterProgram.mFeatures.hasSrgb = true; + gWaterProgram.mFeatures.hasSrgb = true; gWaterProgram.mFeatures.hasReflectionProbes = true; gWaterProgram.mFeatures.hasShadows = use_sun_shadow; gWaterProgram.mShaderFiles.clear(); @@ -823,8 +821,7 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterEdgeProgram.mFeatures.hasAtmospherics = true; gWaterEdgeProgram.mFeatures.hasWaterFog = true; gWaterEdgeProgram.mFeatures.hasGamma = true; - gWaterEdgeProgram.mFeatures.hasTransport = true; - gWaterEdgeProgram.mFeatures.hasSrgb = true; + gWaterEdgeProgram.mFeatures.hasSrgb = true; gWaterEdgeProgram.mFeatures.hasReflectionProbes = true; gWaterEdgeProgram.mFeatures.hasShadows = use_sun_shadow; gWaterEdgeProgram.mShaderFiles.clear(); @@ -1205,7 +1202,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() bool has_skin = i & 0x10; gDeferredMaterialProgram[i].mFeatures.hasSrgb = true; - gDeferredMaterialProgram[i].mFeatures.hasTransport = true; gDeferredMaterialProgram[i].mFeatures.encodesNormal = true; gDeferredMaterialProgram[i].mFeatures.calculatesAtmospherics = true; gDeferredMaterialProgram[i].mFeatures.hasAtmospherics = true; @@ -1302,7 +1298,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredMaterialWaterProgram[i].mFeatures.hasAtmospherics = true; gDeferredMaterialWaterProgram[i].mFeatures.hasGamma = true; - gDeferredMaterialWaterProgram[i].mFeatures.hasTransport = true; gDeferredMaterialWaterProgram[i].mFeatures.hasShadows = use_sun_shadow; if (has_skin) @@ -1401,7 +1396,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() shader->mFeatures.calculatesAtmospherics = true; shader->mFeatures.hasAtmospherics = true; shader->mFeatures.hasGamma = true; - shader->mFeatures.hasTransport = true; shader->mFeatures.hasShadows = use_sun_shadow; shader->mFeatures.isDeferred = true; // include deferredUtils shader->mFeatures.hasReflectionProbes = mShaderLevel[SHADER_DEFERRED]; @@ -1716,7 +1710,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() shader->mFeatures.calculatesAtmospherics = true; shader->mFeatures.hasAtmospherics = true; shader->mFeatures.hasGamma = true; - shader->mFeatures.hasTransport = true; shader->mFeatures.hasShadows = use_sun_shadow; shader->mFeatures.hasReflectionProbes = true; shader->mFeatures.hasWaterFog = true; @@ -1855,7 +1848,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() shader[i]->mFeatures.calculatesAtmospherics = true; shader[i]->mFeatures.hasAtmospherics = true; shader[i]->mFeatures.hasGamma = true; - shader[i]->mFeatures.hasTransport = true; shader[i]->mFeatures.hasShadows = use_sun_shadow; shader[i]->mFeatures.hasReflectionProbes = true; shader[i]->mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; @@ -1914,7 +1906,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarEyesProgram.mName = "Deferred Avatar Eyes Shader"; gDeferredAvatarEyesProgram.mFeatures.calculatesAtmospherics = true; gDeferredAvatarEyesProgram.mFeatures.hasGamma = true; - gDeferredAvatarEyesProgram.mFeatures.hasTransport = true; + gDeferredAvatarEyesProgram.mFeatures.hasAtmospherics = true; gDeferredAvatarEyesProgram.mFeatures.disableTextureIndex = true; gDeferredAvatarEyesProgram.mFeatures.hasSrgb = true; gDeferredAvatarEyesProgram.mFeatures.encodesNormal = true; @@ -1933,7 +1925,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightProgram.mName = "Deferred Fullbright Shader"; gDeferredFullbrightProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightProgram.mFeatures.hasGamma = true; - gDeferredFullbrightProgram.mFeatures.hasTransport = true; + gDeferredFullbrightProgram.mFeatures.hasAtmospherics = true; gDeferredFullbrightProgram.mFeatures.hasSrgb = true; gDeferredFullbrightProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredFullbrightProgram.mShaderFiles.clear(); @@ -1950,7 +1942,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gHUDFullbrightProgram.mName = "HUD Fullbright Shader"; gHUDFullbrightProgram.mFeatures.calculatesAtmospherics = true; gHUDFullbrightProgram.mFeatures.hasGamma = true; - gHUDFullbrightProgram.mFeatures.hasTransport = true; + gHUDFullbrightProgram.mFeatures.hasAtmospherics = true; gHUDFullbrightProgram.mFeatures.hasSrgb = true; gHUDFullbrightProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gHUDFullbrightProgram.mShaderFiles.clear(); @@ -1968,7 +1960,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightAlphaMaskProgram.mName = "Deferred Fullbright Alpha Masking Shader"; gDeferredFullbrightAlphaMaskProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightAlphaMaskProgram.mFeatures.hasGamma = true; - gDeferredFullbrightAlphaMaskProgram.mFeatures.hasTransport = true; + gDeferredFullbrightAlphaMaskProgram.mFeatures.hasAtmospherics = true; gDeferredFullbrightAlphaMaskProgram.mFeatures.hasSrgb = true; gDeferredFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredFullbrightAlphaMaskProgram.mShaderFiles.clear(); @@ -1987,7 +1979,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gHUDFullbrightAlphaMaskProgram.mName = "HUD Fullbright Alpha Masking Shader"; gHUDFullbrightAlphaMaskProgram.mFeatures.calculatesAtmospherics = true; gHUDFullbrightAlphaMaskProgram.mFeatures.hasGamma = true; - gHUDFullbrightAlphaMaskProgram.mFeatures.hasTransport = true; + gHUDFullbrightAlphaMaskProgram.mFeatures.hasAtmospherics = true; gHUDFullbrightAlphaMaskProgram.mFeatures.hasSrgb = true; gHUDFullbrightAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gHUDFullbrightAlphaMaskProgram.mShaderFiles.clear(); @@ -2006,7 +1998,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightAlphaMaskAlphaProgram.mName = "Deferred Fullbright Alpha Masking Alpha Shader"; gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasGamma = true; - gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasTransport = true; + gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasAtmospherics = true; gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.hasSrgb = true; gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.isDeferred = true; gDeferredFullbrightAlphaMaskAlphaProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; @@ -2027,7 +2019,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gHUDFullbrightAlphaMaskAlphaProgram.mName = "HUD Fullbright Alpha Masking Alpha Shader"; gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.calculatesAtmospherics = true; gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasGamma = true; - gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasTransport = true; + gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasAtmospherics = true; gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.hasSrgb = true; gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.isDeferred = true; gHUDFullbrightAlphaMaskAlphaProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; @@ -2048,7 +2040,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightWaterProgram.mName = "Deferred Fullbright Underwater Shader"; gDeferredFullbrightWaterProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightWaterProgram.mFeatures.hasGamma = true; - gDeferredFullbrightWaterProgram.mFeatures.hasTransport = true; + gDeferredFullbrightWaterProgram.mFeatures.hasAtmospherics = true; gDeferredFullbrightWaterProgram.mFeatures.hasWaterFog = true; gDeferredFullbrightWaterProgram.mFeatures.hasSrgb = true; gDeferredFullbrightWaterProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; @@ -2068,7 +2060,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightWaterAlphaProgram.mName = "Deferred Fullbright Underwater Alpha Shader"; gDeferredFullbrightWaterAlphaProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightWaterAlphaProgram.mFeatures.hasGamma = true; - gDeferredFullbrightWaterAlphaProgram.mFeatures.hasTransport = true; + gDeferredFullbrightWaterAlphaProgram.mFeatures.hasAtmospherics = true; gDeferredFullbrightWaterAlphaProgram.mFeatures.hasWaterFog = true; gDeferredFullbrightWaterAlphaProgram.mFeatures.hasSrgb = true; gDeferredFullbrightWaterAlphaProgram.mFeatures.isDeferred = true; @@ -2091,7 +2083,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightAlphaMaskWaterProgram.mName = "Deferred Fullbright Underwater Alpha Masking Shader"; gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasGamma = true; - gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasTransport = true; + gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasAtmospherics = true; gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasWaterFog = true; gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.hasSrgb = true; gDeferredFullbrightAlphaMaskWaterProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; @@ -2113,7 +2105,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightShinyProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightShinyProgram.mFeatures.hasAtmospherics = true; gDeferredFullbrightShinyProgram.mFeatures.hasGamma = true; - gDeferredFullbrightShinyProgram.mFeatures.hasTransport = true; gDeferredFullbrightShinyProgram.mFeatures.hasSrgb = true; gDeferredFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredFullbrightShinyProgram.mShaderFiles.clear(); @@ -2132,7 +2123,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gHUDFullbrightShinyProgram.mFeatures.calculatesAtmospherics = true; gHUDFullbrightShinyProgram.mFeatures.hasAtmospherics = true; gHUDFullbrightShinyProgram.mFeatures.hasGamma = true; - gHUDFullbrightShinyProgram.mFeatures.hasTransport = true; gHUDFullbrightShinyProgram.mFeatures.hasSrgb = true; gHUDFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gHUDFullbrightShinyProgram.mShaderFiles.clear(); @@ -2151,7 +2141,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredEmissiveProgram.mName = "Deferred Emissive Shader"; gDeferredEmissiveProgram.mFeatures.calculatesAtmospherics = true; gDeferredEmissiveProgram.mFeatures.hasGamma = true; - gDeferredEmissiveProgram.mFeatures.hasTransport = true; + gDeferredEmissiveProgram.mFeatures.hasAtmospherics = true; gDeferredEmissiveProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels; gDeferredEmissiveProgram.mShaderFiles.clear(); gDeferredEmissiveProgram.mShaderFiles.push_back(make_pair("deferred/emissiveV.glsl", GL_VERTEX_SHADER)); @@ -2169,7 +2159,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSoftenProgram.mFeatures.hasSrgb = true; gDeferredSoftenProgram.mFeatures.calculatesAtmospherics = true; gDeferredSoftenProgram.mFeatures.hasAtmospherics = true; - gDeferredSoftenProgram.mFeatures.hasTransport = true; gDeferredSoftenProgram.mFeatures.hasGamma = true; gDeferredSoftenProgram.mFeatures.isDeferred = true; gDeferredSoftenProgram.mFeatures.hasShadows = use_sun_shadow; @@ -2226,7 +2215,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredSoftenWaterProgram.mFeatures.hasSrgb = true; gDeferredSoftenWaterProgram.mFeatures.calculatesAtmospherics = true; gDeferredSoftenWaterProgram.mFeatures.hasAtmospherics = true; - gDeferredSoftenWaterProgram.mFeatures.hasTransport = true; gDeferredSoftenWaterProgram.mFeatures.hasGamma = true; gDeferredSoftenWaterProgram.mFeatures.isDeferred = true; gDeferredSoftenWaterProgram.mFeatures.hasShadows = use_sun_shadow; @@ -2265,14 +2253,11 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (success) { gDeferredShadowProgram.mName = "Deferred Shadow Shader"; - gDeferredShadowProgram.mFeatures.isDeferred = true; - gDeferredShadowProgram.mFeatures.hasShadows = true; gDeferredShadowProgram.mShaderFiles.clear(); gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowV.glsl", GL_VERTEX_SHADER)); gDeferredShadowProgram.mShaderFiles.push_back(make_pair("deferred/shadowF.glsl", GL_FRAGMENT_SHADER)); gDeferredShadowProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; - // gDeferredShadowProgram.addPermutation("DEPTH_CLAMP", "1"); // disable depth clamp for now - gDeferredShadowProgram.mRiggedVariant = &gDeferredSkinnedShadowProgram; + gDeferredShadowProgram.mRiggedVariant = &gDeferredSkinnedShadowProgram; success = gDeferredShadowProgram.createShader(NULL, NULL); llassert(success); } @@ -2402,7 +2387,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredTerrainProgram.mFeatures.calculatesAtmospherics = true; gDeferredTerrainProgram.mFeatures.hasAtmospherics = true; gDeferredTerrainProgram.mFeatures.hasGamma = true; - gDeferredTerrainProgram.mFeatures.hasTransport = true; gDeferredTerrainProgram.mShaderFiles.clear(); gDeferredTerrainProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER)); @@ -2425,8 +2409,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredTerrainWaterProgram.mFeatures.calculatesAtmospherics = true; gDeferredTerrainWaterProgram.mFeatures.hasAtmospherics = true; gDeferredTerrainWaterProgram.mFeatures.hasGamma = true; - gDeferredTerrainWaterProgram.mFeatures.hasTransport = true; - + gDeferredTerrainWaterProgram.mShaderFiles.clear(); gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainV.glsl", GL_VERTEX_SHADER)); gDeferredTerrainWaterProgram.mShaderFiles.push_back(make_pair("deferred/terrainF.glsl", GL_FRAGMENT_SHADER)); @@ -2462,7 +2445,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarAlphaProgram.mFeatures.encodesNormal = true; gDeferredAvatarAlphaProgram.mFeatures.calculatesAtmospherics = true; gDeferredAvatarAlphaProgram.mFeatures.hasAtmospherics = true; - gDeferredAvatarAlphaProgram.mFeatures.hasTransport = true; gDeferredAvatarAlphaProgram.mFeatures.hasGamma = true; gDeferredAvatarAlphaProgram.mFeatures.isDeferred = true; gDeferredAvatarAlphaProgram.mFeatures.hasShadows = true; @@ -2639,7 +2621,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWLSkyProgram.mName = "Deferred Windlight Sky Shader"; gDeferredWLSkyProgram.mShaderFiles.clear(); gDeferredWLSkyProgram.mFeatures.calculatesAtmospherics = true; - gDeferredWLSkyProgram.mFeatures.hasTransport = true; + gDeferredWLSkyProgram.mFeatures.hasAtmospherics = true; gDeferredWLSkyProgram.mFeatures.hasGamma = true; gDeferredWLSkyProgram.mFeatures.hasSrgb = true; @@ -2657,7 +2639,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWLCloudProgram.mName = "Deferred Windlight Cloud Program"; gDeferredWLCloudProgram.mShaderFiles.clear(); gDeferredWLCloudProgram.mFeatures.calculatesAtmospherics = true; - gDeferredWLCloudProgram.mFeatures.hasTransport = true; + gDeferredWLCloudProgram.mFeatures.hasAtmospherics = true; gDeferredWLCloudProgram.mFeatures.hasGamma = true; gDeferredWLCloudProgram.mFeatures.hasSrgb = true; @@ -2674,7 +2656,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredWLSunProgram.mName = "Deferred Windlight Sun Program"; gDeferredWLSunProgram.mFeatures.calculatesAtmospherics = true; - gDeferredWLSunProgram.mFeatures.hasTransport = true; + gDeferredWLSunProgram.mFeatures.hasAtmospherics = true; gDeferredWLSunProgram.mFeatures.hasGamma = true; gDeferredWLSunProgram.mFeatures.hasAtmospherics = true; gDeferredWLSunProgram.mFeatures.disableTextureIndex = true; @@ -2692,7 +2674,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredWLMoonProgram.mName = "Deferred Windlight Moon Program"; gDeferredWLMoonProgram.mFeatures.calculatesAtmospherics = true; - gDeferredWLMoonProgram.mFeatures.hasTransport = true; + gDeferredWLMoonProgram.mFeatures.hasAtmospherics = true; gDeferredWLMoonProgram.mFeatures.hasGamma = true; gDeferredWLMoonProgram.mFeatures.hasAtmospherics = true; gDeferredWLMoonProgram.mFeatures.hasSrgb = true; @@ -3192,7 +3174,6 @@ BOOL LLViewerShaderMgr::loadShadersInterface() gReflectionProbeDisplayProgram.mFeatures.hasSrgb = true; gReflectionProbeDisplayProgram.mFeatures.calculatesAtmospherics = true; gReflectionProbeDisplayProgram.mFeatures.hasAtmospherics = true; - gReflectionProbeDisplayProgram.mFeatures.hasTransport = true; gReflectionProbeDisplayProgram.mFeatures.hasGamma = true; gReflectionProbeDisplayProgram.mFeatures.isDeferred = true; gReflectionProbeDisplayProgram.mShaderFiles.clear(); |