Accommodate lack of ETS_TEXTURE_1

This commit is contained in:
numzero 2023-03-13 18:17:47 +03:00
parent d81db9dd6d
commit 82d1feb933

View File

@ -174,7 +174,7 @@ void COpenGL3MaterialSolid2CB::OnSetConstants(IMaterialRendererServices* service
core::matrix4 Matrix = driver->getTransform(ETS_TEXTURE_0);
services->setPixelShaderConstant(TMatrix0ID, Matrix.pointer(), 16);
Matrix = driver->getTransform(ETS_TEXTURE_1);
Matrix = driver->getTransform(E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + 1));
services->setPixelShaderConstant(TMatrix1ID, Matrix.pointer(), 16);
services->setPixelShaderConstant(TextureUsage0ID, &TextureUsage0, 1);
@ -221,7 +221,7 @@ void COpenGL3MaterialLightmapCB::OnSetConstants(IMaterialRendererServices* servi
core::matrix4 Matrix = driver->getTransform(ETS_TEXTURE_0);
services->setPixelShaderConstant(TMatrix0ID, Matrix.pointer(), 16);
Matrix = driver->getTransform(ETS_TEXTURE_1);
Matrix = driver->getTransform(E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + 1));
services->setPixelShaderConstant(TMatrix1ID, Matrix.pointer(), 16);
services->setPixelShaderConstant(ModulateID, &Modulate, 1);