mirror of
https://github.com/minetest/minetest.git
synced 2024-07-04 15:05:27 +02:00
Remove always false use_shaders param
This commit is contained in:
parent
c1a76bc7db
commit
b3d957127c
@ -49,7 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
* \param colors returns the colors of the mesh buffers in the mesh.
|
* \param colors returns the colors of the mesh buffers in the mesh.
|
||||||
*/
|
*/
|
||||||
static void postProcessNodeMesh(scene::SMesh *mesh, const ContentFeatures &f,
|
static void postProcessNodeMesh(scene::SMesh *mesh, const ContentFeatures &f,
|
||||||
bool use_shaders, std::vector<ItemPartColor> *colors, bool apply_scale)
|
std::vector<ItemPartColor> *colors, bool apply_scale)
|
||||||
{
|
{
|
||||||
const u32 mc = mesh->getMeshBufferCount();
|
const u32 mc = mesh->getMeshBufferCount();
|
||||||
// Allocate colors for existing buffers
|
// Allocate colors for existing buffers
|
||||||
@ -81,16 +81,6 @@ static void postProcessNodeMesh(scene::SMesh *mesh, const ContentFeatures &f,
|
|||||||
} else {
|
} else {
|
||||||
material.setTexture(0, layer->texture);
|
material.setTexture(0, layer->texture);
|
||||||
}
|
}
|
||||||
if (use_shaders) {
|
|
||||||
if (layer->normal_texture) {
|
|
||||||
if (layer->animation_frame_count > 1) {
|
|
||||||
const FrameSpec &animation_frame = (*layer->frames)[0];
|
|
||||||
material.setTexture(1, animation_frame.normal_texture);
|
|
||||||
} else
|
|
||||||
material.setTexture(1, layer->normal_texture);
|
|
||||||
}
|
|
||||||
material.setTexture(2, layer->flags_texture);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (apply_scale && tile->world_aligned) {
|
if (apply_scale && tile->world_aligned) {
|
||||||
u32 n = buf->getVertexCount();
|
u32 n = buf->getVertexCount();
|
||||||
@ -353,7 +343,7 @@ void WieldMeshSceneNode::setCube(const ContentFeatures &f,
|
|||||||
scene::IMesh *cubemesh = g_extrusion_mesh_cache->createCube();
|
scene::IMesh *cubemesh = g_extrusion_mesh_cache->createCube();
|
||||||
scene::SMesh *copy = cloneMesh(cubemesh);
|
scene::SMesh *copy = cloneMesh(cubemesh);
|
||||||
cubemesh->drop();
|
cubemesh->drop();
|
||||||
postProcessNodeMesh(copy, f, false, &m_colors, true);
|
postProcessNodeMesh(copy, f, &m_colors, true);
|
||||||
|
|
||||||
// Customize materials
|
// Customize materials
|
||||||
for (u32 i = 0; i < cubemesh->getMeshBufferCount(); ++i) {
|
for (u32 i = 0; i < cubemesh->getMeshBufferCount(); ++i) {
|
||||||
@ -744,7 +734,7 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
|
|||||||
} else
|
} else
|
||||||
scaleMesh(mesh, v3f(1.2, 1.2, 1.2));
|
scaleMesh(mesh, v3f(1.2, 1.2, 1.2));
|
||||||
// add overlays
|
// add overlays
|
||||||
postProcessNodeMesh(mesh, f, false, &result->buffer_colors, true);
|
postProcessNodeMesh(mesh, f, &result->buffer_colors, true);
|
||||||
if (f.drawtype == NDT_ALLFACES)
|
if (f.drawtype == NDT_ALLFACES)
|
||||||
scaleMesh(mesh, v3f(f.visual_scale));
|
scaleMesh(mesh, v3f(f.visual_scale));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user