summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml13
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl22
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleColorF.glsl15
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.cpp12
-rw-r--r--indra/newview/pipeline.cpp82
-rw-r--r--indra/newview/pipeline.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml86
8 files changed, 144 insertions, 97 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index af2d44ea2b..f8487c020e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8464,7 +8464,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>0.8</real>
+ <real>0.7</real>
</map>
<key>RenderShadowGaussian</key>
@@ -14170,6 +14170,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MPRenderShadowOpti</key>
+ <map>
+ <key>Comment</key>
+ <string>Shadows Optimisations</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>MPVCameraCollapsed</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index a4f144faba..63ab0b9b38 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -438,9 +438,10 @@ float geometricOcclusion(PBRInfo pbrInputs)
float NdotL = pbrInputs.NdotL;
float NdotV = pbrInputs.NdotV;
float r = pbrInputs.alphaRoughness;
+ float r2 = r * r;
- float attenuationL = 2.0 * NdotL / (NdotL + sqrt(r * r + (1.0 - r * r) * (NdotL * NdotL)));
- float attenuationV = 2.0 * NdotV / (NdotV + sqrt(r * r + (1.0 - r * r) * (NdotV * NdotV)));
+ float attenuationL = 2.0 * NdotL / (NdotL + sqrt(r2 + (1.0 - r2) * (NdotL * NdotL)));
+ float attenuationV = 2.0 * NdotV / (NdotV + sqrt(r2 + (1.0 - r2) * (NdotV * NdotV)));
return attenuationL * attenuationV;
}
@@ -625,24 +626,11 @@ vec3 pbrBaseLight(vec3 diffuseColor, vec3 specularColor, float metallic, vec3 v,
uniform vec4 waterPlane;
uniform float waterSign;
-// discard if given position in eye space is on the wrong side of the waterPlane according to waterSign
void waterClip(vec3 pos)
{
- // TODO: make this less branchy
- if (waterSign > 0.0)
+ if (((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) * waterSign) < 0.0)
{
- if ((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) < 0.0)
- {
- discard;
- }
- }
- else
- {
- if ((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) > 0.0)
- {
- discard;
- }
+ discard;
}
-
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
index 4acab159cb..4331418b33 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl
@@ -37,14 +37,10 @@ uniform sampler2D emissiveRect;
uniform sampler2D normalMap;
uniform float diffuse_luminance_scale;
-float lum(vec3 col)
-{
- vec3 l = vec3(0.2126, 0.7152, 0.0722);
- return dot(l, col);
-}
void main()
{
+ const vec3 l = vec3(0.2126, 0.7152, 0.0722);
vec2 tc = vary_fragcoord*0.6+0.2;
tc.y -= 0.1; // HACK - nudge exposure sample down a little bit to favor ground over sky
vec3 c = texture(diffuseRect, tc).rgb;
@@ -62,7 +58,7 @@ void main()
c += texture(emissiveRect, tc).rgb;
- float L = lum(c);
+ float L = dot(l, c);
frag_color = vec4(max(L, 0.0));
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleColorF.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleColorF.glsl
index dea76da5a5..30d70122cb 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleColorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleColorF.glsl
@@ -33,20 +33,9 @@ uniform float waterSign;
void waterClip(vec3 pos)
{
- // TODO: make this less branchy
- if (waterSign > 0)
+ if (((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) * waterSign) < 0.0)
{
- if ((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) < 0.0)
- {
- discard;
- }
- }
- else
- {
- if ((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) > 0.0)
- {
- discard;
- }
+ discard;
}
}
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index a8a1e507a8..94b95b21c2 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -274,7 +274,9 @@ void LLFloaterPreferenceGraphicsAdvanced::setMaxNonImpostorsText(U32 value, LLTe
void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
{
LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
+ LLComboBox* ctrl_shadows_quality = getChild<LLComboBox>("MPShadowQuality");
LLTextBox* shadows_text = getChild<LLTextBox>("RenderShadowDetailText");
+ LLTextBox* shadows_quality_text = getChild<LLTextBox>("RenderShadowQualityText");
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
@@ -290,7 +292,9 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
//deferred needs windlight, disable deferred
ctrl_shadows->setEnabled(false);
ctrl_shadows->setValue(0);
+ ctrl_shadows_quality->setEnabled(false);
shadows_text->setEnabled(false);
+ shadows_quality_text->setEnabled(false);
ctrl_ssao->setEnabled(false);
ctrl_ssao->setValue(false);
@@ -304,7 +308,9 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(false);
ctrl_shadows->setValue(0);
+ ctrl_shadows_quality->setEnabled(false);
shadows_text->setEnabled(false);
+ shadows_quality_text->setEnabled(false);
ctrl_ssao->setEnabled(false);
ctrl_ssao->setValue(false);
@@ -325,7 +331,9 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings()
{
ctrl_shadows->setEnabled(false);
ctrl_shadows->setValue(0);
+ ctrl_shadows_quality->setEnabled(false);
shadows_text->setEnabled(false);
+ shadows_quality_text->setEnabled(false);
}
// Vintage mode
@@ -355,7 +363,9 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail");
+ LLComboBox* ctrl_shadow_quality = getChild<LLComboBox>("MPShadowQuality");
LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText");
+ LLTextBox* shadows_quality_text = getChild<LLTextBox>("RenderShadowQualityText");
// note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && ctrl_deferred->get();
@@ -368,7 +378,9 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
ctrl_shadow->setEnabled(enabled);
+ ctrl_shadow_quality->setEnabled(enabled);
shadow_text->setEnabled(enabled);
+ shadows_quality_text->setEnabled(enabled);
// Hardware settings
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index b40c9fa6db..b9fe9cd343 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -144,6 +144,7 @@ U32 LLPipeline::RenderFSAAType;
U32 LLPipeline::RenderResolutionDivisor;
bool LLPipeline::RenderUIBuffer;
S32 LLPipeline::RenderShadowDetail;
+S32 LLPipeline::MPRenderShadowOpti;
S32 LLPipeline::RenderShadowSplits;
bool LLPipeline::RenderDeferredSSAO;
F32 LLPipeline::RenderShadowResolutionScale;
@@ -526,6 +527,7 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderResolutionDivisor");
connectRefreshCachedSettingsSafe("RenderUIBuffer");
connectRefreshCachedSettingsSafe("RenderShadowDetail");
+ connectRefreshCachedSettingsSafe("MPRenderShadowOpti");
connectRefreshCachedSettingsSafe("RenderShadowSplits");
connectRefreshCachedSettingsSafe("RenderDeferredSSAO");
connectRefreshCachedSettingsSafe("RenderShadowResolutionScale");
@@ -729,7 +731,9 @@ void LLPipeline::resizeShadowTexture()
{
releaseSunShadowTargets();
releaseSpotShadowTargets();
- allocateShadowBuffer(mRT->width, mRT->height);
+ GLuint resX = gViewerWindow->getWorldViewWidthRaw();
+ GLuint resY = gViewerWindow->getWorldViewHeightRaw();
+ allocateShadowBuffer(resX, resY);
gResizeShadowTexture = false;
}
@@ -946,7 +950,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY)
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
S32 shadow_detail = RenderShadowDetail;
- F32 scale = gCubeSnapshot ? 1.0f : llmax(0.f, RenderShadowResolutionScale); // Don't scale probe shadow maps
+ F32 scale = gCubeSnapshot ? 1.0f : llmax(0.5f, RenderShadowResolutionScale); // Don't scale probe shadow maps
U32 sun_shadow_map_width = BlurHappySize(resX, scale);
U32 sun_shadow_map_height = BlurHappySize(resY, scale);
@@ -1058,6 +1062,7 @@ void LLPipeline::refreshCachedSettings()
RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
RenderUIBuffer = gSavedSettings.getBOOL("RenderUIBuffer");
RenderShadowDetail = gSavedSettings.getS32("RenderShadowDetail");
+ MPRenderShadowOpti = gSavedSettings.getS32("MPRenderShadowOpti");
RenderShadowSplits = gSavedSettings.getS32("RenderShadowSplits");
RenderDeferredSSAO = gSavedSettings.getBOOL("RenderDeferredSSAO");
RenderShadowResolutionScale = gSavedSettings.getF32("RenderShadowResolutionScale");
@@ -1450,7 +1455,7 @@ void LLPipeline::createLUTBuffers()
}
U32 pix_format = GL_R16F;
-#if LL_DARWIN
+#if 0 && LL_DARWIN
// Need to work around limited precision with 10.6.8 and older drivers
//
pix_format = GL_R32F;
@@ -3968,12 +3973,10 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion)
llassert(!sRenderingHUDs);
-#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
-#endif
if (&camera == LLViewerCamera::getInstance())
{ // a bit hacky, this is the start of the main render frame, figure out delta between last modelview matrix and
@@ -4093,12 +4096,10 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion)
} // Tracy ZoneScoped
-#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
-#endif
}
// Render all of our geometry that's required after our deferred pass.
@@ -4108,12 +4109,10 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
LL_PROFILE_GPU_ZONE("renderGeomPostDeferred");
-#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
-#endif
U32 cur_type = 0;
@@ -4241,12 +4240,10 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
renderDebug();
}
-#if GL_VERSION_1_1
if (gUseWireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
-#endif
}
void LLPipeline::renderGeomShadow(LLCamera& camera)
@@ -4339,9 +4336,7 @@ void LLPipeline::renderPhysicsDisplay()
gGL.flush();
gDebugProgram.bind();
-#if GL_VERSION_1_1
LLGLEnable(GL_POLYGON_OFFSET_LINE);
-#endif
glPolygonOffset(3.f, 3.f);
glLineWidth(3.f);
LLGLEnable blend(GL_BLEND);
@@ -4357,12 +4352,10 @@ void LLPipeline::renderPhysicsDisplay()
bool wireframe = (pass == 2);
-#if GL_VERSION_1_1
if (wireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
}
-#endif
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -4382,12 +4375,10 @@ void LLPipeline::renderPhysicsDisplay()
}
gGL.flush();
-#if GL_VERSION_1_1
if (wireframe)
{
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
-#endif
}
glLineWidth(1.f);
gDebugProgram.unbind();
@@ -4467,9 +4458,7 @@ void LLPipeline::renderDebug()
glClearColor(clearColor.mV[0],clearColor.mV[1],clearColor.mV[2],0);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // no stencil -- deprecated | GL_STENCIL_BUFFER_BIT);
gGL.setColorMask(true, false);
-#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-#endif
}
//NavMesh
@@ -4499,9 +4488,7 @@ void LLPipeline::renderDebug()
gPathfindingProgram.bind();
gGL.flush();
-#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-#endif
glLineWidth(1.0f);
gGL.flush();
}
@@ -4558,9 +4545,8 @@ void LLPipeline::renderDebug()
LLGLDisable cull(i >= 2 ? GL_CULL_FACE : 0);
gGL.flush();
-#if GL_VERSION_1_1
+
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-#endif
//get rid of some z-fighting
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
@@ -4585,10 +4571,8 @@ void LLPipeline::renderDebug()
gGL.flush();
}
-#if GL_VERSION_1_1
LLGLEnable lineOffset(GL_POLYGON_OFFSET_LINE);
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
-#endif
F32 offset = gSavedSettings.getF32("PathfindingLineOffset");
@@ -4608,14 +4592,10 @@ void LLPipeline::renderDebug()
}
else
{
-#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-#endif
gPathfindingProgram.uniform1f(sAmbiance, ambiance);
llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] );
-#if GL_VERSION_1_1
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-#endif
}
}
@@ -4632,9 +4612,7 @@ void LLPipeline::renderDebug()
glLineWidth(1.f);
}
-#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-#endif
}
}
}
@@ -4645,9 +4623,7 @@ void LLPipeline::renderDebug()
{ //render navmesh xray
F32 ambiance = gSavedSettings.getF32("PathfindingAmbiance");
-#if GL_VERSION_1_1
LLGLEnable lineOffset(GL_POLYGON_OFFSET_LINE);
-#endif
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
F32 offset = gSavedSettings.getF32("PathfindingLineOffset");
@@ -4664,14 +4640,10 @@ void LLPipeline::renderDebug()
if (gSavedSettings.getBOOL("PathfindingXRayWireframe"))
{ //draw hidden wireframe as darker and less opaque
-#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
-#endif
gPathfindingProgram.uniform1f(sAmbiance, 1.f);
llPathingLibInstance->renderNavMesh();
-#if GL_VERSION_1_1
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-#endif
}
else
{
@@ -4711,9 +4683,7 @@ void LLPipeline::renderDebug()
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep, true);
-#if GL_VERSION_1_1
glPointSize(8.f);
-#endif
LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
gGL.begin(LLRender::POINTS);
@@ -4738,9 +4708,7 @@ void LLPipeline::renderDebug()
}
gGL.end();
gGL.flush();
-#if GL_VERSION_1_1
glPointSize(1.f);
-#endif
}
// Debug stuff.
@@ -4944,9 +4912,7 @@ void LLPipeline::renderDebug()
{
//render visible point cloud
gGL.flush();
-#if GL_VERSION_1_1
glPointSize(8.f);
-#endif
gGL.begin(LLRender::POINTS);
F32* c = col+i*4;
@@ -4960,9 +4926,7 @@ void LLPipeline::renderDebug()
gGL.end();
gGL.flush();
-#if GL_VERSION_1_1
glPointSize(1.f);
-#endif
LLVector3* ext = mShadowExtents[i];
LLVector3 pos = (ext[0]+ext[1])*0.5f;
@@ -7584,7 +7548,8 @@ void LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst)
void LLPipeline::generateSMAABuffers(LLRenderTarget* src)
{
llassert(!gCubeSnapshot);
- bool multisample = RenderFSAAType == 2 && gSMAAEdgeDetectProgram[0].isComplete() && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
+ if(RenderFSAAType < 2) return;
+ bool multisample = gSMAAEdgeDetectProgram[0].isComplete() && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
// Present everything.
if (multisample)
@@ -7702,7 +7667,13 @@ void LLPipeline::generateSMAABuffers(LLRenderTarget* src)
void LLPipeline::applySMAA(LLRenderTarget* src, LLRenderTarget* dst)
{
llassert(!gCubeSnapshot);
- bool multisample = RenderFSAAType == 2 && gSMAAEdgeDetectProgram[0].isComplete() && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
+
+ bool multisample = false;
+
+ if(RenderFSAAType > 1)
+ {
+ multisample = gSMAAEdgeDetectProgram[0].isComplete() && mFXAAMap.isComplete() && mSMAABlendBuffer.isComplete();
+ }
// Present everything.
if (multisample)
@@ -9325,13 +9296,9 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
return;
}
-#if GL_VERSION_4_0
S32 channel = shader.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY);
-#else
- S32 channel;
-#endif
bool bound = false;
-#if GL_VERSION_4_0
+
if (channel > -1 && mReflectionMapManager.mTexture.notNull())
{
mReflectionMapManager.mTexture->bind(channel);
@@ -9362,7 +9329,6 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader)
setEnvMat(shader);
}
-#endif
// reflection probe shaders generally sample the scene map as well for SSR
channel = shader.enableTexture(LLShaderMgr::SCENE_MAP);
@@ -9528,7 +9494,6 @@ void LLPipeline::renderShadow(const glm::mat4& view, const glm::mat4& proj, LLCa
}
};
-
LLVertexBuffer::unbind();
for (int j = 0; j < 2; ++j) // 0 -- static, 1 -- rigged
{
@@ -9570,6 +9535,7 @@ void LLPipeline::renderShadow(const glm::mat4& view, const glm::mat4& proj, LLCa
renderGeomShadow(shadow_cam);
}
+ if(MPRenderShadowOpti < 3)
{
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow alpha");
LL_PROFILE_GPU_ZONE("shadow alpha");
@@ -9900,7 +9866,7 @@ public:
void LLPipeline::generateSunShadow(LLCamera& camera)
{
- if (!sRenderDeferred || RenderShadowDetail <= 0)
+ if (!sRenderDeferred || RenderShadowDetail <= 0 || (MPRenderShadowOpti > 0 && gCubeSnapshot))
{
return;
}
@@ -10182,8 +10148,12 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
std::vector<LLVector3> fp;
+ U32 splits = 3;
+ if(MPRenderShadowOpti == 1) splits = 2;
+ else if(MPRenderShadowOpti >= 2) splits = 1;
+
if (!gPipeline.getVisiblePointCloud(shadow_cam, min, max, fp, lightDir)
- || j > RenderShadowSplits)
+ || j > splits)
{
//no possible shadow receivers
if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot)
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 315e38ed8c..da9b8189e2 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -702,7 +702,7 @@ public:
LLRenderTarget shadow[4];
};
- // main full resoltuion render target
+ // main full resolution render target
RenderTargetPack mMainRT;
// auxillary 512x512 render target pack
@@ -1011,6 +1011,7 @@ public:
static U32 RenderResolutionDivisor;
static bool RenderUIBuffer;
static S32 RenderShadowDetail;
+ static S32 MPRenderShadowOpti;
static S32 RenderShadowSplits;
static bool RenderDeferredSSAO;
static F32 RenderShadowResolutionScale;
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index d6cb3928cc..88d6ae1bc2 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- height="452"
+ height="492"
layout="topleft"
name="prefs_graphics_advanced"
help_topic="Preferences_Graphics_Advanced"
@@ -744,7 +744,7 @@
text_readonly_color="LabelDisabledColor"
top_delta="22"
width="128">
- Shadows:
+ Shadows source:
</text>
<combo_box
control_name="RenderShadowDetail"
@@ -768,6 +768,86 @@
value="2"/>
</combo_box>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="420"
+ name="RenderShadowQualityText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="22"
+ width="128">
+ Shadows Optimisations
+ </text>
+
+ <combo_box
+ control_name="MPRenderShadowOpti"
+ height="18"
+ layout="topleft"
+ left_delta="130"
+ top_delta="0"
+ name="MPShadowQuality"
+ width="150">
+ <combo_box.item
+ label="No optimisation"
+ name="0"
+ value="0"/>
+ <combo_box.item
+ label="Medium"
+ name="1"
+ value="1"/>
+ <combo_box.item
+ label="Faster"
+ name="2"
+ value="2"/>
+ <combo_box.item
+ label="Fastest"
+ name="3"
+ value="3"/>
+ </combo_box>
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="420"
+ name="RenderShadowResolutionScaleText"
+ text_readonly_color="LabelDisabledColor"
+ top_delta="22"
+ width="128">
+ Shadows Resolution
+ </text>
+
+ <combo_box
+ control_name="RenderShadowResolutionScale"
+ height="18"
+ layout="topleft"
+ left_delta="130"
+ top_delta="0"
+ name="RenderShadowResolutionScale"
+ width="150">
+ <combo_box.item
+ label="Default"
+ name="Default"
+ value="1.0"/>
+ <combo_box.item
+ label="High"
+ name="High"
+ value="1.5"/>
+ <combo_box.item
+ label="Ultra"
+ name="Ultra"
+ value="2.0"/>
+ <combo_box.item
+ label="Crazy"
+ name="Crazy"
+ value="3.0"/>
+ </combo_box>
+
<check_box
control_name="RenderScreenSpaceReflections"
height="16"
@@ -1095,7 +1175,7 @@
layout="topleft"
left="13"
name="horiz_border"
- top="415"
+ top="448"
top_delta="5"
width="774"/>
<button