diff --git a/src/graphics/render_geometry.cpp b/src/graphics/render_geometry.cpp index c6f23ff3e..531077e41 100644 --- a/src/graphics/render_geometry.cpp +++ b/src/graphics/render_geometry.cpp @@ -173,7 +173,7 @@ void IrrDriver::renderSolidFirstPass() } template -void renderMeshes2ndPass(const std::vector &TexUnits, std::vector > &meshes) +void renderMeshes2ndPass(const std::vector > &TexUnits, std::vector > &meshes) { glUseProgram(Shader::template getInstance()->Program); glBindVertexArray(getVAO(VertexType)); @@ -184,8 +184,8 @@ void renderMeshes2ndPass(const std::vector &TexUnits, std::vectorgetLightViz()) { GLint swizzleMask[] = { GL_ONE, GL_ONE, GL_ONE, GL_ALPHA }; @@ -240,14 +240,14 @@ void IrrDriver::renderSolidSecondPass() m_scene_manager->drawAll(scene::ESNRP_SOLID); - renderMeshes2ndPass({ MeshShader::ObjectPass2Shader::getInstance()->TU_Albedo }, ListMatDefault::Arguments); - renderMeshes2ndPass({ MeshShader::ObjectRefPass2Shader::getInstance()->TU_Albedo }, ListMatAlphaRef::Arguments); - renderMeshes2ndPass({ MeshShader::SphereMapShader::getInstance()->TU_tex }, ListMatSphereMap::Arguments); - renderMeshes2ndPass({ MeshShader::DetailledObjectPass2Shader::getInstance()->TU_Albedo, MeshShader::DetailledObjectPass2Shader::getInstance()->TU_detail }, ListMatDetails::Arguments); - renderMeshes2ndPass({ MeshShader::GrassPass2Shader::getInstance()->TU_Albedo }, ListMatGrass::Arguments); - renderMeshes2ndPass({ MeshShader::ObjectUnlitShader::getInstance()->TU_tex }, ListMatUnlit::Arguments); - renderMeshes2ndPass({ 8, MeshShader::SplattingShader::getInstance()->TU_tex_layout, MeshShader::SplattingShader::getInstance()->TU_tex_detail0, MeshShader::SplattingShader::getInstance()->TU_tex_detail1, MeshShader::SplattingShader::getInstance()->TU_tex_detail2, MeshShader::SplattingShader::getInstance()->TU_tex_detail3 }, ListMatSplatting::Arguments); - renderMeshes2ndPass({ MeshShader::ObjectPass2Shader::getInstance()->TU_Albedo }, ListMatNormalMap::Arguments); + renderMeshes2ndPass({ { MeshShader::ObjectPass2Shader::getInstance()->TU_Albedo, true } }, ListMatDefault::Arguments); + renderMeshes2ndPass({ { MeshShader::ObjectRefPass2Shader::getInstance()->TU_Albedo, true } }, ListMatAlphaRef::Arguments); + renderMeshes2ndPass({ { MeshShader::SphereMapShader::getInstance()->TU_tex, true } }, ListMatSphereMap::Arguments); + renderMeshes2ndPass({ { MeshShader::DetailledObjectPass2Shader::getInstance()->TU_Albedo, true }, { MeshShader::DetailledObjectPass2Shader::getInstance()->TU_detail, true } }, ListMatDetails::Arguments); + renderMeshes2ndPass({ { MeshShader::GrassPass2Shader::getInstance()->TU_Albedo, true } }, ListMatGrass::Arguments); + renderMeshes2ndPass({ { MeshShader::ObjectUnlitShader::getInstance()->TU_tex, true } }, ListMatUnlit::Arguments); + renderMeshes2ndPass({ { 8, true }, { MeshShader::SplattingShader::getInstance()->TU_tex_layout, false }, { MeshShader::SplattingShader::getInstance()->TU_tex_detail0, true }, { MeshShader::SplattingShader::getInstance()->TU_tex_detail1, true }, { MeshShader::SplattingShader::getInstance()->TU_tex_detail2, true }, { MeshShader::SplattingShader::getInstance()->TU_tex_detail3, true } }, ListMatSplatting::Arguments); + renderMeshes2ndPass({ { MeshShader::ObjectPass2Shader::getInstance()->TU_Albedo, true } }, ListMatNormalMap::Arguments); } } @@ -274,16 +274,16 @@ void IrrDriver::renderTransparent() if (World::getWorld() && World::getWorld()->isFogEnabled()) { glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - renderMeshes2ndPass({ MeshShader::TransparentFogShader::getInstance()->TU_tex }, ListBlendTransparentFog::Arguments); +// renderMeshes2ndPass({ MeshShader::TransparentFogShader::getInstance()->TU_tex }, ListBlendTransparentFog::Arguments); glBlendFunc(GL_ONE, GL_ONE); - renderMeshes2ndPass({ MeshShader::TransparentFogShader::getInstance()->TU_tex }, ListAdditiveTransparentFog::Arguments); +// renderMeshes2ndPass({ MeshShader::TransparentFogShader::getInstance()->TU_tex }, ListAdditiveTransparentFog::Arguments); } else { glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - renderMeshes2ndPass({ MeshShader::TransparentShader::getInstance()->TU_tex }, ListBlendTransparent::Arguments); +// renderMeshes2ndPass({ MeshShader::TransparentShader::getInstance()->TU_tex }, ListBlendTransparent::Arguments); glBlendFunc(GL_ONE, GL_ONE); - renderMeshes2ndPass({ MeshShader::TransparentShader::getInstance()->TU_tex }, ListAdditiveTransparent::Arguments); +// renderMeshes2ndPass({ MeshShader::TransparentShader::getInstance()->TU_tex }, ListAdditiveTransparent::Arguments); } if (!UserConfigParams::m_dynamic_lights)