Do not split animated mesh from static list
This commit is contained in:
parent
bf5410b793
commit
264a9dbe46
@ -250,10 +250,6 @@ void IrrDriver::renderSolidFirstPass()
|
|||||||
ListInstancedMatAlphaRef::getInstance()->clear();
|
ListInstancedMatAlphaRef::getInstance()->clear();
|
||||||
ListInstancedMatGrass::getInstance()->clear();
|
ListInstancedMatGrass::getInstance()->clear();
|
||||||
ListInstancedMatNormalMap::getInstance()->clear();
|
ListInstancedMatNormalMap::getInstance()->clear();
|
||||||
AnimatedListMatDefault::getInstance()->clear();
|
|
||||||
AnimatedListMatAlphaRef::getInstance()->clear();
|
|
||||||
AnimatedListMatDetails::getInstance()->clear();
|
|
||||||
AnimatedListMatUnlit::getInstance()->clear();
|
|
||||||
// Add a 30 ms timeout
|
// Add a 30 ms timeout
|
||||||
if (!m_sync)
|
if (!m_sync)
|
||||||
m_sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
m_sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||||
@ -294,12 +290,6 @@ void IrrDriver::renderSolidFirstPass()
|
|||||||
TexUnit(0, true)
|
TexUnit(0, true)
|
||||||
), ListMatNormalMap::getInstance());
|
), ListMatNormalMap::getInstance());
|
||||||
|
|
||||||
|
|
||||||
renderMeshes1stPass<MeshShader::ObjectPass1Shader, video::EVT_STANDARD, 2, 1>(TexUnits(TexUnit(0, true)), AnimatedListMatDefault::getInstance());
|
|
||||||
renderMeshes1stPass<MeshShader::ObjectRefPass1Shader, video::EVT_STANDARD, 3, 2, 1>(TexUnits(TexUnit(0, true)), AnimatedListMatAlphaRef::getInstance());
|
|
||||||
renderMeshes1stPass<MeshShader::ObjectPass1Shader, video::EVT_2TCOORDS, 2, 1>(TexUnits(TexUnit(0, true)), AnimatedListMatDetails::getInstance());
|
|
||||||
renderMeshes1stPass<MeshShader::ObjectRefPass1Shader, video::EVT_STANDARD, 3, 2, 1>(TexUnits(TexUnit(0, true)), AnimatedListMatUnlit::getInstance());
|
|
||||||
|
|
||||||
if (UserConfigParams::m_azdo)
|
if (UserConfigParams::m_azdo)
|
||||||
{
|
{
|
||||||
#ifdef Buffer_Storage
|
#ifdef Buffer_Storage
|
||||||
@ -540,39 +530,22 @@ void IrrDriver::renderSolidSecondPass()
|
|||||||
TexUnit(0, true)
|
TexUnit(0, true)
|
||||||
), ListMatDefault::getInstance(),
|
), ListMatDefault::getInstance(),
|
||||||
createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
renderMeshes2ndPass<MeshShader::ObjectPass2Shader, video::EVT_STANDARD, 3, 1>(TexUnits(
|
|
||||||
TexUnit(0, true)
|
|
||||||
), AnimatedListMatDefault::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
|
||||||
|
|
||||||
renderMeshes2ndPass<MeshShader::ObjectRefPass2Shader, video::EVT_STANDARD, 3, 1 >(TexUnits(
|
renderMeshes2ndPass<MeshShader::ObjectRefPass2Shader, video::EVT_STANDARD, 3, 1 >(TexUnits(
|
||||||
TexUnit(0, true)
|
TexUnit(0, true)
|
||||||
), ListMatAlphaRef::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
), ListMatAlphaRef::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
renderMeshes2ndPass<MeshShader::ObjectRefPass2Shader, video::EVT_STANDARD, 3, 1 >(TexUnits(
|
|
||||||
TexUnit(0, true)
|
|
||||||
), AnimatedListMatAlphaRef::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
|
||||||
|
|
||||||
renderMeshes2ndPass<MeshShader::SphereMapShader, video::EVT_STANDARD, 2, 1>(TexUnits(
|
renderMeshes2ndPass<MeshShader::SphereMapShader, video::EVT_STANDARD, 2, 1>(TexUnits(
|
||||||
TexUnit(0, true)
|
TexUnit(0, true)
|
||||||
), ListMatSphereMap::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
), ListMatSphereMap::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
|
|
||||||
renderMeshes2ndPass<MeshShader::DetailledObjectPass2Shader, video::EVT_2TCOORDS, 1>(TexUnits(
|
renderMeshes2ndPass<MeshShader::DetailledObjectPass2Shader, video::EVT_2TCOORDS, 1>(TexUnits(
|
||||||
TexUnit(0, true),
|
TexUnit(0, true),
|
||||||
TexUnit(1, true)
|
TexUnit(1, true)
|
||||||
), ListMatDetails::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
), ListMatDetails::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
renderMeshes2ndPass<MeshShader::DetailledObjectPass2Shader, video::EVT_2TCOORDS, 1>(TexUnits(
|
|
||||||
TexUnit(0, true),
|
|
||||||
TexUnit(1, true)
|
|
||||||
), AnimatedListMatDetails::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
|
||||||
renderMeshes2ndPass<MeshShader::GrassPass2Shader, video::EVT_STANDARD, 3, 1>(TexUnits(
|
renderMeshes2ndPass<MeshShader::GrassPass2Shader, video::EVT_STANDARD, 3, 1>(TexUnits(
|
||||||
TexUnit(0, true)
|
TexUnit(0, true)
|
||||||
), ListMatGrass::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
), ListMatGrass::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
|
|
||||||
renderMeshes2ndPass<MeshShader::ObjectUnlitShader, video::EVT_STANDARD, 3, 1>(TexUnits(
|
renderMeshes2ndPass<MeshShader::ObjectUnlitShader, video::EVT_STANDARD, 3, 1>(TexUnits(
|
||||||
TexUnit(0, true)
|
TexUnit(0, true)
|
||||||
), ListMatUnlit::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
), ListMatUnlit::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
renderMeshes2ndPass<MeshShader::ObjectUnlitShader, video::EVT_STANDARD, 3, 1>(TexUnits(
|
|
||||||
TexUnit(0, true)
|
|
||||||
), AnimatedListMatUnlit::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
|
||||||
|
|
||||||
renderMeshes2ndPass<MeshShader::SplattingShader, video::EVT_2TCOORDS, 1>(TexUnits(
|
renderMeshes2ndPass<MeshShader::SplattingShader, video::EVT_2TCOORDS, 1>(TexUnits(
|
||||||
TexUnit(1, false),
|
TexUnit(1, false),
|
||||||
@ -581,7 +554,6 @@ void IrrDriver::renderSolidSecondPass()
|
|||||||
TexUnit(4, true),
|
TexUnit(4, true),
|
||||||
TexUnit(5, true)
|
TexUnit(5, true)
|
||||||
), ListMatSplatting::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
), ListMatSplatting::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
|
|
||||||
renderMeshes2ndPass<MeshShader::ObjectPass2Shader, video::EVT_TANGENTS, 3, 1>(TexUnits(
|
renderMeshes2ndPass<MeshShader::ObjectPass2Shader, video::EVT_TANGENTS, 3, 1>(TexUnits(
|
||||||
TexUnit(0, true)
|
TexUnit(0, true)
|
||||||
), ListMatNormalMap::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
), ListMatNormalMap::getInstance(), createVector<uint64_t>(DiffuseHandle, SpecularHandle, SSAOHandle), DiffSpecSSAOTex);
|
||||||
@ -961,10 +933,6 @@ void IrrDriver::renderShadows()
|
|||||||
ListInstancedMatAlphaRef::getInstance()->clear();
|
ListInstancedMatAlphaRef::getInstance()->clear();
|
||||||
ListInstancedMatGrass::getInstance()->clear();
|
ListInstancedMatGrass::getInstance()->clear();
|
||||||
ListInstancedMatNormalMap::getInstance()->clear();
|
ListInstancedMatNormalMap::getInstance()->clear();
|
||||||
AnimatedListMatDefault::getInstance()->clear();
|
|
||||||
AnimatedListMatAlphaRef::getInstance()->clear();
|
|
||||||
AnimatedListMatDetails::getInstance()->clear();
|
|
||||||
AnimatedListMatUnlit::getInstance()->clear();
|
|
||||||
m_scene_manager->drawAll(scene::ESNRP_SOLID);
|
m_scene_manager->drawAll(scene::ESNRP_SOLID);
|
||||||
|
|
||||||
std::vector<GLuint> noTexUnits;
|
std::vector<GLuint> noTexUnits;
|
||||||
@ -977,11 +945,6 @@ void IrrDriver::renderShadows()
|
|||||||
renderShadow<MeshShader::RefShadowShader, EVT_STANDARD, 1>(std::vector<GLuint>{ 0 }, ListMatUnlit::getInstance());
|
renderShadow<MeshShader::RefShadowShader, EVT_STANDARD, 1>(std::vector<GLuint>{ 0 }, ListMatUnlit::getInstance());
|
||||||
renderShadow<MeshShader::GrassShadowShader, EVT_STANDARD, 3, 1>(std::vector<GLuint>{ 0 }, ListMatGrass::getInstance());
|
renderShadow<MeshShader::GrassShadowShader, EVT_STANDARD, 3, 1>(std::vector<GLuint>{ 0 }, ListMatGrass::getInstance());
|
||||||
|
|
||||||
renderShadow<MeshShader::ShadowShader, EVT_STANDARD, 1>(noTexUnits, AnimatedListMatDefault::getInstance());
|
|
||||||
renderShadow<MeshShader::RefShadowShader, EVT_STANDARD, 1>(std::vector<GLuint>{ 0 }, AnimatedListMatAlphaRef::getInstance());
|
|
||||||
renderShadow<MeshShader::RefShadowShader, EVT_STANDARD, 1>(std::vector<GLuint>{ 0 }, AnimatedListMatUnlit::getInstance());
|
|
||||||
renderShadow<MeshShader::ShadowShader, EVT_2TCOORDS, 1>(noTexUnits, AnimatedListMatDetails::getInstance());
|
|
||||||
|
|
||||||
if (UserConfigParams::m_azdo)
|
if (UserConfigParams::m_azdo)
|
||||||
{
|
{
|
||||||
#ifdef Buffer_Storage
|
#ifdef Buffer_Storage
|
||||||
|
@ -146,16 +146,16 @@ void STKAnimatedMesh::render()
|
|||||||
|
|
||||||
GLMesh* mesh;
|
GLMesh* mesh;
|
||||||
for_in(mesh, MeshSolidMaterial[MAT_DEFAULT])
|
for_in(mesh, MeshSolidMaterial[MAT_DEFAULT])
|
||||||
pushVector(AnimatedListMatDefault::getInstance(), mesh, AbsoluteTransformation, invmodel, mesh->TextureMatrix);
|
pushVector(ListMatDefault::getInstance(), mesh, AbsoluteTransformation, invmodel, mesh->TextureMatrix);
|
||||||
|
|
||||||
for_in(mesh, MeshSolidMaterial[MAT_ALPHA_REF])
|
for_in(mesh, MeshSolidMaterial[MAT_ALPHA_REF])
|
||||||
pushVector(AnimatedListMatAlphaRef::getInstance(), mesh, AbsoluteTransformation, invmodel, mesh->TextureMatrix);
|
pushVector(ListMatAlphaRef::getInstance(), mesh, AbsoluteTransformation, invmodel, mesh->TextureMatrix);
|
||||||
|
|
||||||
for_in(mesh, MeshSolidMaterial[MAT_DETAIL])
|
for_in(mesh, MeshSolidMaterial[MAT_DETAIL])
|
||||||
pushVector(AnimatedListMatDetails::getInstance(), mesh, AbsoluteTransformation, invmodel, mesh->TextureMatrix);
|
pushVector(ListMatDetails::getInstance(), mesh, AbsoluteTransformation, invmodel, mesh->TextureMatrix);
|
||||||
|
|
||||||
for_in(mesh, MeshSolidMaterial[MAT_UNLIT])
|
for_in(mesh, MeshSolidMaterial[MAT_UNLIT])
|
||||||
pushVector(AnimatedListMatUnlit::getInstance(), mesh, AbsoluteTransformation, core::matrix4::EM4CONST_IDENTITY, mesh->TextureMatrix);
|
pushVector(ListMatUnlit::getInstance(), mesh, AbsoluteTransformation, core::matrix4::EM4CONST_IDENTITY, mesh->TextureMatrix);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -67,15 +67,9 @@ class MeshList : public Singleton<T>, public std::vector<STK::Tuple<Args...> >
|
|||||||
class ListMatDefault : public MeshList<ListMatDefault, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
class ListMatDefault : public MeshList<ListMatDefault, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
class AnimatedListMatDefault : public MeshList<AnimatedListMatDefault, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
|
||||||
{};
|
|
||||||
|
|
||||||
class ListMatAlphaRef : public MeshList<ListMatAlphaRef, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
class ListMatAlphaRef : public MeshList<ListMatAlphaRef, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
class AnimatedListMatAlphaRef : public MeshList<AnimatedListMatAlphaRef, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
|
||||||
{};
|
|
||||||
|
|
||||||
class ListMatNormalMap : public MeshList<ListMatNormalMap, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
class ListMatNormalMap : public MeshList<ListMatNormalMap, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
@ -91,15 +85,9 @@ class ListMatSplatting : public MeshList<ListMatSplatting, GLMesh *, core::matri
|
|||||||
class ListMatUnlit : public MeshList<ListMatUnlit, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
class ListMatUnlit : public MeshList<ListMatUnlit, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
class AnimatedListMatUnlit : public MeshList<AnimatedListMatUnlit, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
|
||||||
{};
|
|
||||||
|
|
||||||
class ListMatDetails : public MeshList<ListMatDetails, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
class ListMatDetails : public MeshList<ListMatDetails, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
class AnimatedListMatDetails : public MeshList<AnimatedListMatDetails, GLMesh *, core::matrix4, core::matrix4, core::matrix4>
|
|
||||||
{};
|
|
||||||
|
|
||||||
class ListBlendTransparent : public MeshList<ListBlendTransparent, GLMesh *, core::matrix4, core::matrix4>
|
class ListBlendTransparent : public MeshList<ListBlendTransparent, GLMesh *, core::matrix4, core::matrix4>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user