diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-05-15 11:01:24 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-05-15 11:01:24 -0500 |
commit | cdc9852f052d804f8b25564ab7d90eb2b79cddd4 (patch) | |
tree | 1aab4d69fb7e85c814b1c77895b039348269e522 /indra/newview/llviewershadermgr.cpp | |
parent | e3f9244375e3ddfb96a38afac007f0a5a68d3b46 (diff) |
SL-19709 Fix for fullbright shiny not factoring out exposure and flickering fullbright alpha. Incidental decruft.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 57 |
1 files changed, 19 insertions, 38 deletions
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(); |