mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Use proper variable types for uniform sampler layers
This commit is contained in:
parent
c17c40a0f5
commit
cfc8e44759
@ -907,15 +907,18 @@ public:
|
|||||||
services->setPixelShaderConstant("yawVec", (irr::f32 *)&minimap_yaw_vec, 3);
|
services->setPixelShaderConstant("yawVec", (irr::f32 *)&minimap_yaw_vec, 3);
|
||||||
|
|
||||||
// Uniform sampler layers
|
// Uniform sampler layers
|
||||||
int layer0 = 0;
|
|
||||||
int layer1 = 1;
|
|
||||||
int layer2 = 2;
|
|
||||||
// before 1.8 there isn't a "integer interface", only float
|
// before 1.8 there isn't a "integer interface", only float
|
||||||
#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
|
#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
|
||||||
|
f32 layer0 = 0;
|
||||||
|
f32 layer1 = 1;
|
||||||
|
f32 layer2 = 2;
|
||||||
services->setPixelShaderConstant("baseTexture" , (irr::f32 *)&layer0, 1);
|
services->setPixelShaderConstant("baseTexture" , (irr::f32 *)&layer0, 1);
|
||||||
services->setPixelShaderConstant("normalTexture" , (irr::f32 *)&layer1, 1);
|
services->setPixelShaderConstant("normalTexture" , (irr::f32 *)&layer1, 1);
|
||||||
services->setPixelShaderConstant("textureFlags" , (irr::f32 *)&layer2, 1);
|
services->setPixelShaderConstant("textureFlags" , (irr::f32 *)&layer2, 1);
|
||||||
#else
|
#else
|
||||||
|
s32 layer0 = 0;
|
||||||
|
s32 layer1 = 1;
|
||||||
|
s32 layer2 = 2;
|
||||||
services->setPixelShaderConstant("baseTexture" , (irr::s32 *)&layer0, 1);
|
services->setPixelShaderConstant("baseTexture" , (irr::s32 *)&layer0, 1);
|
||||||
services->setPixelShaderConstant("normalTexture" , (irr::s32 *)&layer1, 1);
|
services->setPixelShaderConstant("normalTexture" , (irr::s32 *)&layer1, 1);
|
||||||
services->setPixelShaderConstant("textureFlags" , (irr::s32 *)&layer2, 1);
|
services->setPixelShaderConstant("textureFlags" , (irr::s32 *)&layer2, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user