diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index 1850a142a..fb82e1aa8 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -221,7 +221,6 @@ Material::Material(const XMLNode *node, bool deprecated) else if (s == "splatting") { m_shader_type = SHADERTYPE_SPLATTING; - node->get("hf-texture", &m_hf_texture); node->get("splatting-texture-1", &m_splatting_texture_1); node->get("splatting-texture-2", &m_splatting_texture_2); node->get("splatting-texture-3", &m_splatting_texture_3); @@ -865,17 +864,14 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m } m->setTexture(5, tex); - TexConfig s4tc(false/*srgb*/, false/*premul_alpha*/, - true/*mesh_tex*/, false/*set_material*/); if (m_splatting_texture_4.size() > 0) { - + TexConfig s4tc(false/*srgb*/, false/*premul_alpha*/, + true/*mesh_tex*/, false/*set_material*/); tex = stm->getTexture(m_splatting_texture_4, &s4tc); } m->setTexture(6, tex); m->setTexture(7, glossytex); - tex = stm->getTexture(m_hf_texture, &s4tc); - m->setTexture(8, tex); // Material and shaders m->MaterialType = Shaders::getShader(ES_SPLATTING); diff --git a/src/graphics/material.hpp b/src/graphics/material.hpp index 281390dac..c8f52aa5b 100644 --- a/src/graphics/material.hpp +++ b/src/graphics/material.hpp @@ -248,9 +248,6 @@ private: std::string m_colorization_mask; - /** If m_splatting is true, indicates the high frequery texture */ - std::string m_hf_texture; - /** If m_splatting is true, indicates the first splatting texture */ std::string m_splatting_texture_1; diff --git a/src/graphics/materials.cpp b/src/graphics/materials.cpp index db688aed1..e7b098071 100644 --- a/src/graphics/materials.cpp +++ b/src/graphics/materials.cpp @@ -223,8 +223,7 @@ SplattingShader::SplattingShader() 4, "tex_detail0", ST_TRILINEAR_ANISOTROPIC_FILTERED, 5, "tex_detail1", ST_TRILINEAR_ANISOTROPIC_FILTERED, 6, "tex_detail2", ST_TRILINEAR_ANISOTROPIC_FILTERED, - 7, "tex_detail3", ST_TRILINEAR_ANISOTROPIC_FILTERED, - 8, "tex_hf", ST_TRILINEAR_ANISOTROPIC_FILTERED); + 7, "tex_detail3", ST_TRILINEAR_ANISOTROPIC_FILTERED); } // SplattingShader // ============================================================================ @@ -840,10 +839,10 @@ const std::tuple DetailMat::RSMTextures = std::tuple(0); // ---------------------------------------------------------------------------- const std::tuple SplattingMat::FirstPassTextures - = std::tuple(8); -const std::tuple + = std::tuple(7); +const std::tuple SplattingMat::SecondPassTextures - = std::tuple(1, 3, 4, 5, 6, 7); + = std::tuple(1, 3, 4, 5, 6); std::tuple<> SplattingMat::ShadowTextures; const std::tuple SplattingMat::RSMTextures diff --git a/src/graphics/materials.hpp b/src/graphics/materials.hpp index 2aab67737..4bc52bd82 100644 --- a/src/graphics/materials.hpp +++ b/src/graphics/materials.hpp @@ -140,7 +140,7 @@ public: }; // InstancedSphereMapShader // ============================================================================ -class SplattingShader : public TextureShader +class SplattingShader : public TextureShader { public: SplattingShader(); @@ -679,7 +679,7 @@ struct SplattingMat static const enum Material::ShaderType MaterialType = Material::SHADERTYPE_SPLATTING; static const std::tuple FirstPassTextures; - static const std::tuple + static const std::tuple SecondPassTextures; static std::tuple<> ShadowTextures; static const std::tuple diff --git a/src/graphics/stk_mesh.cpp b/src/graphics/stk_mesh.cpp index 89b6f9276..87e2e2b29 100644 --- a/src/graphics/stk_mesh.cpp +++ b/src/graphics/stk_mesh.cpp @@ -461,7 +461,6 @@ void initTextures(GLMesh &mesh, Material::ShaderType mat) setTexture(mesh, 5, true, getShaderTypeName(mat)); setTexture(mesh, 6, false, getShaderTypeName(mat)); setTexture(mesh, 7, false, getShaderTypeName(mat)); - setTexture(mesh, 8, false, getShaderTypeName(mat)); break; } } // initTextures