diff options
| author | Graham Madarasz <graham@lindenlab.com> | 2013-05-23 10:42:32 -0700 |
|---|---|---|
| committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-23 10:42:32 -0700 |
| commit | 9ef98bece29b6740e4f779ab6a3534b5b1e7f974 (patch) | |
| tree | 55211701d33b55ac9c449b6ffb1059850d032cc0 /indra/newview/llvovolume.cpp | |
| parent | 74a84738ed8779e345f34b95f029862b3c9ccf6e (diff) | |
NORSPEC-193 NORSPEC-161 make legacy shiny a batch breaker when materials are in play
Diffstat (limited to 'indra/newview/llvovolume.cpp')
| -rwxr-xr-x | indra/newview/llvovolume.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ca7849fdad..24275c57e0 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4102,6 +4102,8 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? facep->getTextureEntry()->getBumpmap() : 0; + U8 shiny = facep->getTextureEntry()->getShiny(); + LLViewerTexture* tex = facep->getTexture(); U8 index = facep->getTextureIndex(); @@ -4162,6 +4164,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_vec[idx]->mTextureMatrix == tex_mat && draw_vec[idx]->mModelMatrix == model_mat && draw_vec[idx]->mMaterial == mat && + (!mat || (draw_vec[idx]->mShiny == shiny)) && // need to break batches when a material is shared, but legacy shiny is different draw_vec[idx]->mShaderMask == shader_mask) { draw_vec[idx]->mCount += facep->getIndicesCount(); @@ -4191,7 +4194,8 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_info->mTextureMatrix = tex_mat; draw_info->mModelMatrix = model_mat; - U8 shiny = facep->getTextureEntry()->getShiny(); + draw_info->mShiny = shiny; + float alpha[4] = { 0.00f, |
