This commit is contained in:
Vincent Lejeune 2014-09-06 23:35:00 +02:00
parent f0796b2380
commit 88f21e2490
2 changed files with 15 additions and 3 deletions

View File

@ -423,7 +423,7 @@ void IrrDriver::renderSolidSecondPass()
TexUnit(2, true),
TexUnit(3, true),
TexUnit(4, true),
TexUnit(5, true)
TexUnit(0, true)
), ListMatSplatting::getInstance()->SolidPass, createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
renderMeshes2ndPass<MeshShader::SphereMapShader, video::EVT_STANDARD, 2, 1>(TexUnits(
TexUnit(0, true)

View File

@ -197,7 +197,7 @@ handleSTKCommon(scene::ISceneNode *Node, std::vector<scene::ISceneNode *> *Immed
MeshForGlowPass[mesh->mb].emplace_back(mesh, node);
if (mesh->TextureMatrix.isIdentity())
if (Mat != MAT_SPLATTING && mesh->TextureMatrix.isIdentity())
MeshForSolidPass[Mat][mesh->mb].emplace_back(mesh, Node);
else
{
@ -214,6 +214,9 @@ handleSTKCommon(scene::ISceneNode *Node, std::vector<scene::ISceneNode *> *Immed
case MAT_UNLIT:
ListMatUnlit::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, mesh->TextureMatrix);
break;
case MAT_SPLATTING:
ListMatSplatting::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix);
break;
}
}
}
@ -310,7 +313,16 @@ handleSTKCommon(scene::ISceneNode *Node, std::vector<scene::ISceneNode *> *Immed
if (irr_driver->hasARB_draw_indirect())
{
for_in(mesh, node->MeshSolidMaterial[Mat])
MeshForRSMPass[Mat][mesh->mb].emplace_back(mesh, Node);
{
if (Mat != MAT_SPLATTING)
MeshForRSMPass[Mat][mesh->mb].emplace_back(mesh, Node);
else
{
core::matrix4 ModelMatrix = Node->getAbsoluteTransformation(), InvModelMatrix;
ModelMatrix.getInverse(InvModelMatrix);
ListMatSplatting::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix);
}
}
}
else
{