NORSPEC-118 Compatibility pass against advanced lighting disabled.

meow-7.2.2
Dave Parks 2013-04-25 13:29:40 -05:00
parent 454ae4cf61
commit 3a2576cefa
10 changed files with 37 additions and 20 deletions

View File

@ -50,7 +50,7 @@ void fullbright_shiny_lighting()
color.rgb = fullbrightScaleSoftClip(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = color;
}

View File

@ -51,7 +51,7 @@ void fullbright_shiny_lighting()
color.rgb = fullbrightScaleSoftClip(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = color;
}

View File

@ -48,7 +48,7 @@ void fullbright_shiny_lighting_water()
color.rgb = fullbrightShinyAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = applyWaterFog(color);
}

View File

@ -49,7 +49,7 @@ void fullbright_shiny_lighting_water()
color.rgb = fullbrightShinyAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = applyWaterFog(color);
}

View File

@ -50,7 +50,7 @@ void shiny_lighting()
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = color;
}

View File

@ -51,7 +51,7 @@ void shiny_lighting()
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = color;
}

View File

@ -47,7 +47,7 @@ void shiny_lighting_water()
color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
color.rgb = atmosLighting(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = applyWaterFog(color);
}

View File

@ -48,7 +48,7 @@ void shiny_lighting_water()
color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
color.rgb = atmosLighting(color.rgb);
color.a = max(color.a, vertex_color.a);
color.a = 1.0;
frag_color = applyWaterFog(color);
}

View File

@ -4037,6 +4037,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
BOOL fullbright = (type == LLRenderPass::PASS_FULLBRIGHT) ||
(type == LLRenderPass::PASS_INVISIBLE) ||
(type == LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK) ||
(type == LLRenderPass::PASS_ALPHA && facep->isState(LLFace::FULLBRIGHT));
if (!fullbright && type != LLRenderPass::PASS_GLOW && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_NORMAL))
@ -4076,7 +4077,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U8 index = facep->getTextureIndex();
LLMaterial* mat = LLPipeline::sRenderDeferred ? facep->getTextureEntry()->getMaterialParams().get() : NULL;
LLMaterial* mat = facep->getTextureEntry()->getMaterialParams().get();
bool batchable = false;
@ -5242,6 +5243,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
LLMaterial* mat = te->getMaterialParams().get();
bool can_be_shiny = true;
if (mat)
{
U8 mode = mat->getDiffuseAlphaMode();
can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
}
if (mat && LLPipeline::sRenderDeferred && !hud_group)
{
if (fullbright)
@ -5319,7 +5328,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
else if (gPipeline.canUseVertexShaders()
&& LLPipeline::sRenderBump
&& te->getShiny())
&& te->getShiny()
&& can_be_shiny)
{ //shiny
if (tex->getPrimaryFormat() == GL_ALPHA)
{ //invisiprim+shiny
@ -5363,7 +5373,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
else if (fullbright || bake_sunlight)
{ //fullbright
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK);
}
else
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
}
if (LLPipeline::sRenderDeferred && !hud_group && LLPipeline::sRenderBump && te->getBumpmap())
{ //if this is the deferred render and a bump map is present, register in post deferred bump
registerFace(group, facep, LLRenderPass::PASS_POST_BUMP);
@ -5378,7 +5395,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
else
{ //all around simple
llassert(mask & LLVertexBuffer::MAP_NORMAL);
registerFace(group, facep, LLRenderPass::PASS_SIMPLE);
if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{ //material alpha mask can be respected in non-deferred
registerFace(group, facep, LLRenderPass::PASS_ALPHA_MASK);
}
else
{
registerFace(group, facep, LLRenderPass::PASS_SIMPLE);
}
}
}

View File

@ -1677,14 +1677,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
alpha = false;
break;
default: //alpha mode set to "mask", go to alpha pool if fullbright
if (te->getFullbright())
{
alpha = true;
}
else
{
alpha = false; // Material's alpha mode is set to none, mask, or emissive. Toss it into the opaque material draw pool.
}
alpha = false; // Material's alpha mode is set to none, mask, or emissive. Toss it into the opaque material draw pool.
break;
}
}