Drop ETS_TEXTURE_1

The transformation state itself is still available via ETS_TEXTURE_0+1
This commit is contained in:
numzero 2023-03-06 13:58:38 +03:00
parent a6d062ebd9
commit 6de0afa8b3
2 changed files with 3 additions and 5 deletions

View File

@ -57,10 +57,8 @@ namespace video
//! Projection transformation
ETS_PROJECTION,
//! Texture 0 transformation
//! Use ETS_TEXTURE_0 + texture_number to access other texture transformations
//! Use E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + texture_number) to access other texture transformations
ETS_TEXTURE_0,
//! Texture 1 transformation
ETS_TEXTURE_1,
//! Only used internally
ETS_COUNT = ETS_TEXTURE_0 + MATERIAL_MAX_TEXTURES
};

View File

@ -176,7 +176,7 @@ void COGLES2MaterialSolid2CB::OnSetConstants(IMaterialRendererServices* services
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);
@ -223,7 +223,7 @@ void COGLES2MaterialLightmapCB::OnSetConstants(IMaterialRendererServices* servic
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);