mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Rename SMaterial::TextureLayer -> SMaterial::TextureLayers
It's not the "texture layer" of the material, but an array of texture layers.
This commit is contained in:
parent
05ebe2418b
commit
6bf63d4b41
9 changed files with 38 additions and 38 deletions
|
@ -48,7 +48,7 @@ void MeshBufListList::add(scene::IMeshBuffer *buf, v3s16 position, u8 layer)
|
|||
for (MeshBufList &l : list) {
|
||||
// comparing a full material is quite expensive so we don't do it if
|
||||
// not even first texture is equal
|
||||
if (l.m.TextureLayer[0].Texture != m.TextureLayer[0].Texture)
|
||||
if (l.m.TextureLayers[0].Texture != m.TextureLayers[0].Texture)
|
||||
continue;
|
||||
|
||||
if (l.m == m) {
|
||||
|
@ -851,7 +851,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
|||
// pass the shadow map texture to the buffer texture
|
||||
ShadowRenderer *shadow = m_rendering_engine->get_shadow_renderer();
|
||||
if (shadow && shadow->is_active()) {
|
||||
auto &layer = material.TextureLayer[ShadowRenderer::TEXTURE_LAYER_SHADOW];
|
||||
auto &layer = material.TextureLayers[ShadowRenderer::TEXTURE_LAYER_SHADOW];
|
||||
layer.Texture = shadow->get_texture();
|
||||
layer.TextureWrapU = video::E_TEXTURE_CLAMP::ETC_CLAMP_TO_EDGE;
|
||||
layer.TextureWrapV = video::E_TEXTURE_CLAMP::ETC_CLAMP_TO_EDGE;
|
||||
|
@ -864,7 +864,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
|||
}
|
||||
driver->setMaterial(material);
|
||||
++material_swaps;
|
||||
material.TextureLayer[ShadowRenderer::TEXTURE_LAYER_SHADOW].Texture = nullptr;
|
||||
material.TextureLayers[ShadowRenderer::TEXTURE_LAYER_SHADOW].Texture = nullptr;
|
||||
}
|
||||
|
||||
v3f block_wpos = intToFloat(mesh_grid.getMeshPos(descriptor.m_pos) * MAP_BLOCKSIZE, BS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue