1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Clean up TileLayer::applyMaterialOptions

This commit is contained in:
sfan5
2025-02-15 14:25:04 +01:00
parent 7d3f0628c4
commit 83fd837d75
5 changed files with 25 additions and 63 deletions

View File

@@ -220,14 +220,9 @@ static scene::SMesh *generateNodeMesh(Client *client, MapNode n,
// Set up material
auto &mat = buf->Material;
mat.setTexture(0, p.layer.texture);
u32 shader_id = shdsrc->getShader("object_shader", p.layer.material_type, NDT_NORMAL);
mat.MaterialType = shdsrc->getShaderInfo(shader_id).material;
if (layer == 1) {
mat.PolygonOffsetSlopeScale = -1;
mat.PolygonOffsetDepthBias = -1;
}
p.layer.applyMaterialOptionsWithShaders(mat);
p.layer.applyMaterialOptions(mat, layer);
mesh->addMeshBuffer(buf.get());
}