FIRE-713, Texture lag protection off by default due to content breaks, option now exposed in preferences

meow-7.2.2
Arrehn 2011-09-01 01:13:20 -04:00
parent 2c0c4042e5
commit 0c833eb360
3 changed files with 67 additions and 13 deletions

View File

@ -753,6 +753,19 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>RenderVolumeSAProtection</key>
<map>
<key>Comment</key>
<string>Enables automatic derendering of prims with high surface area (can protect against some video card crashers)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderVolumeSAThreshold</key>
<map>
<key>Comment</key>
@ -784,7 +797,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>1000.0</real>
<real>5000.0</real>
</map>
<key>EnableGroupChatPopups</key>
<map>

View File

@ -4018,19 +4018,25 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
llassert_always(vobj);
static LLCachedControl<F32> volume_sa_thresh(gSavedSettings,"RenderVolumeSAThreshold");
static LLCachedControl<F32> sculpt_sa_thresh(gSavedSettings, "RenderSculptSAThreshold");
static LLCachedControl<F32> volume_sa_max_frame(gSavedSettings, "RenderVolumeSAFrameMax");
F32 max_for_this_vol = (vobj->isSculpted()) ? sculpt_sa_thresh : volume_sa_thresh;
// AO: Z's protection auto-derender code
static LLCachedControl<bool> tex_protect(gSavedSettings,"RenderVolumeSAProtection");
if (tex_protect)
{
static LLCachedControl<F32> volume_sa_thresh(gSavedSettings,"RenderVolumeSAThreshold");
static LLCachedControl<F32> sculpt_sa_thresh(gSavedSettings, "RenderSculptSAThreshold");
static LLCachedControl<F32> volume_sa_max_frame(gSavedSettings, "RenderVolumeSAFrameMax");
F32 max_for_this_vol = (vobj->isSculpted()) ? sculpt_sa_thresh : volume_sa_thresh;
if (vobj->mVolumeSurfaceArea > max_for_this_vol)
{
LLPipeline::sVolumeSAFrame += vobj->mVolumeSurfaceArea;
if(LLPipeline::sVolumeSAFrame > volume_sa_max_frame)
{
continue;
}
}
if (vobj->mVolumeSurfaceArea > max_for_this_vol)
{
LLPipeline::sVolumeSAFrame += vobj->mVolumeSurfaceArea;
if(LLPipeline::sVolumeSAFrame > volume_sa_max_frame)
{
continue;
}
}
}
// </AO>
vobj->updateTextureVirtualSize();
vobj->preRebuild();

View File

@ -404,6 +404,41 @@
value="3"
width="150" />
</radio_group>
<text
left="5"
top_pad="10"
follows="left|top"
height="12"
name="SurfaceAreaThreshholdLabel"
width="300">
Texture Lag Protection (may break some objects):
</text>
<check_box
top_pad="10"
left="20"
label="Automatically hide large objects with high texture area. Treshhold: "
control_name="RenderVolumeSAProtection"
follows="left|top"
height="16"
name="RenderVolumeSAProtection"
width="380" />
<spinner
top_delta="-5"
control_name="RenderVolumeSAFrameMax"
decimal_digits="0"
layout="topleft"
follows="left|top"
height="18"
left_pad="5"
increment="1"
initial_val="5000"
max_val="2000"
min_val="500"
name="RenderVolumeSAFrameMax"
width="90" />
</panel>