Make alpha drawpool optimizations an opt-in render debug setting for the adventurous.
parent
d5f3e7f28e
commit
69f5ab9004
|
|
@ -8558,6 +8558,28 @@
|
|||
</array>
|
||||
</map>
|
||||
|
||||
<key>RenderAlphaBatchFullbrights</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Render fullbright alpha content more efficiently, but with possible visual differences from prev viewers.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderAlphaBatchEmissives</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Render emissive alpha content more efficiently, but with possible visual differences from prev viewers.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderAnisotropic</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -49,10 +49,6 @@
|
|||
#include "llspatialpartition.h"
|
||||
#include "llglcommonfunc.h"
|
||||
|
||||
// These optimizations can and will induce lighting, texturing, and/or GL state bugs
|
||||
#define BATCH_FULLBRIGHTS 0
|
||||
#define BATCH_EMISSIVES 0
|
||||
|
||||
BOOL LLDrawPoolAlpha::sShowDebugAlpha = FALSE;
|
||||
|
||||
static BOOL deferred_render = FALSE;
|
||||
|
|
@ -612,6 +608,8 @@ void LLDrawPoolAlpha::renderEmissives(U32 mask, std::vector<LLDrawInfo*>& emissi
|
|||
|
||||
void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
||||
{
|
||||
BOOL batch_fullbrights = gSavedSettings.getBOOL("RenderAlphaBatchFullbrights");
|
||||
BOOL batch_emissives = gSavedSettings.getBOOL("RenderAlphaBatchEmissives");
|
||||
BOOL initialized_lighting = FALSE;
|
||||
BOOL light_enabled = TRUE;
|
||||
|
||||
|
|
@ -671,13 +669,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
}
|
||||
}
|
||||
|
||||
#if BATCH_FULLBRIGHTS
|
||||
if (params.mFullbright)
|
||||
if (params.mFullbright && batch_fullbrights)
|
||||
{
|
||||
fullbrights.push_back(¶ms);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
LLRenderPass::applyModelMatrix(params);
|
||||
|
||||
|
|
@ -812,11 +808,15 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
params.mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_EMISSIVE))
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_EMISSIVE);
|
||||
#if BATCH_EMISSIVES
|
||||
emissives.push_back(¶ms);
|
||||
#else
|
||||
drawEmissiveInline(mask, ¶ms);
|
||||
#endif
|
||||
|
||||
if (batch_emissives)
|
||||
{
|
||||
emissives.push_back(¶ms);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawEmissiveInline(mask, ¶ms);
|
||||
}
|
||||
}
|
||||
|
||||
if (tex_setup)
|
||||
|
|
@ -828,15 +828,17 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
}
|
||||
}
|
||||
|
||||
#if BATCH_FULLBRIGHTS
|
||||
if (batch_fullbrights)
|
||||
{
|
||||
light_enabled = false;
|
||||
renderFullbrights(mask, fullbrights);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if BATCH_EMISSIVES
|
||||
if (batch_emissives)
|
||||
{
|
||||
light_enabled = true;
|
||||
renderEmissives(mask, emissives);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (current_shader)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue