Experimental volume face batching changes (Cursory testing shows: +~10% larger mean batch size).
-Drive pass selection by face pools. Doing such removes a fair bit of redundant (and often buggy) code. -Ignore irrelivant batch breakers depending on pass/pool type. -Face sorting algorithm modified to potentially allow larger batches. -Removed a few unused/broken things (bake_sunlight/no_materials) -Fullbright handling should hopefully be a little more consistent. -Prevent fullbright faces from being placed in 'simple' pool. (They are already simple-er) Fixed attribute error that popped up with bump faces when batching was disabled.
This commit is contained in:
@@ -1297,15 +1297,33 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
|
||||
if (rebuild_color) // FALSE if tep == NULL
|
||||
{ //decide if shiny goes in alpha channel of color
|
||||
|
||||
static const LLCachedControl<bool> alt_batching("SHAltBatching",true);
|
||||
if (tep &&
|
||||
getPoolType() != LLDrawPool::POOL_ALPHA) // <--- alpha channel MUST contain transparency, not shiny
|
||||
((!alt_batching && getPoolType() != LLDrawPool::POOL_ALPHA) ||
|
||||
(alt_batching && getPoolType() != LLDrawPool::POOL_ALPHA &&
|
||||
getPoolType() != LLDrawPool::POOL_ALPHA_MASK &&
|
||||
getPoolType() != LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK && // <--- alpha channel MUST contain transparency, not shiny
|
||||
(getPoolType() != LLDrawPool::POOL_SIMPLE || LLPipeline::sRenderDeferred)))) // Impostor pass for simple uses alpha masking. Need to be opaque.
|
||||
{
|
||||
LLMaterial* mat = tep->getMaterialParams().get();
|
||||
|
||||
bool shiny_in_alpha = false;
|
||||
bool shiny_in_alpha = alt_batching ? true : false;
|
||||
|
||||
if(alt_batching)
|
||||
{
|
||||
if (LLPipeline::sRenderDeferred)
|
||||
{ //store shiny in alpha if we don't have a specular map
|
||||
if (getPoolType() == LLDrawPool::POOL_MATERIALS && mat->getSpecularID().notNull())
|
||||
{
|
||||
shiny_in_alpha = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LLPipeline::sRenderDeferred)
|
||||
{
|
||||
if (!mat || mat->getSpecularID().isNull())
|
||||
{
|
||||
shiny_in_alpha = true;
|
||||
@@ -1318,6 +1336,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
shiny_in_alpha = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shiny_in_alpha)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user