diff --git a/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp b/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp index 4a20f020..bcf99ac6 100644 --- a/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp +++ b/source/Irrlicht/OpenGL/FixedPipelineRenderer.cpp @@ -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);