1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Fix CAO mesh lighting with shaders disabled

the 'Lighting' material flag does not have portable behavior
This commit is contained in:
sfan5 2024-09-10 18:41:57 +02:00
parent 740dc0162e
commit 65af606729
3 changed files with 11 additions and 31 deletions

View file

@ -181,13 +181,6 @@ void setMeshBufferColor(scene::IMeshBuffer *buf, const video::SColor &color)
((video::S3DVertex *) (vertices + i * stride))->Color = color;
}
void setAnimatedMeshColor(scene::IAnimatedMeshSceneNode *node, const video::SColor &color)
{
for (u32 i = 0; i < node->getMaterialCount(); ++i) {
node->getMaterial(i).EmissiveColor = color;
}
}
void setMeshColor(scene::IMesh *mesh, const video::SColor &color)
{
if (mesh == NULL)