diff options
author | RealBadAngel <maciej.kasatkin@yahoo.com> | 2014-03-21 01:32:00 +0100 |
---|---|---|
committer | RealBadAngel <maciej.kasatkin@yahoo.com> | 2014-03-21 01:32:00 +0100 |
commit | 0dc1aec50940140e28f434c524296e284e73d623 (patch) | |
tree | b69e282c3b59db2f300e4d017afe67d4ad246a8c /src/game.cpp | |
parent | f3d83a4516eb9c6658a7c3e07bf1b7d4f4996bef (diff) | |
download | hax-minetest-server-0dc1aec50940140e28f434c524296e284e73d623.tar.gz hax-minetest-server-0dc1aec50940140e28f434c524296e284e73d623.zip |
Normal maps generation on the fly.
Parallax mapping with slope information.
Overriding normal maps.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 0a9dcfdae..761f65f83 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -858,14 +858,17 @@ public: services->setPixelShaderConstant("eyePosition", (irr::f32*)&eye_position, 3); services->setVertexShaderConstant("eyePosition", (irr::f32*)&eye_position, 3); - // Normal map texture layer + // Uniform sampler layers + int layer0 = 0; int layer1 = 1; int layer2 = 2; // before 1.8 there isn't a "integer interface", only float #if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8) + services->setPixelShaderConstant("baseTexture" , (irr::f32*)&layer0, 1); services->setPixelShaderConstant("normalTexture" , (irr::f32*)&layer1, 1); services->setPixelShaderConstant("useNormalmap" , (irr::f32*)&layer2, 1); #else + services->setPixelShaderConstant("baseTexture" , (irr::s32*)&layer0, 1); services->setPixelShaderConstant("normalTexture" , (irr::s32*)&layer1, 1); services->setPixelShaderConstant("useNormalmap" , (irr::s32*)&layer2, 1); #endif |