mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix texture matrix handling in our shaders
This commit is contained in:
parent
9e5d6bc162
commit
e90ef85e7d
3 changed files with 9 additions and 5 deletions
|
@ -1096,8 +1096,11 @@ void COpenGL3DriverBase::setMaterial(const SMaterial &material)
|
|||
OverrideMaterial.apply(Material);
|
||||
|
||||
for (u32 i = 0; i < Feature.MaxTextureUnits; ++i) {
|
||||
CacheHandler->getTextureCache().set(i, material.getTexture(i));
|
||||
setTransform((E_TRANSFORMATION_STATE)(ETS_TEXTURE_0 + i), material.getTextureMatrix(i));
|
||||
auto *texture = material.getTexture(i);
|
||||
CacheHandler->getTextureCache().set(i, texture);
|
||||
if (texture) {
|
||||
setTransform((E_TRANSFORMATION_STATE)(ETS_TEXTURE_0 + i), material.getTextureMatrix(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue