aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorVitaliy <numzer0@yandex.ru>2021-03-22 01:22:22 +0300
committersfan5 <sfan5@live.de>2021-04-09 22:04:51 +0200
commit1c89a07226d069817ffd8ad4034e00b8fc1b96d5 (patch)
treee06747b0373821d4a40f70831a0cef363a0cd738 /src/client/game.cpp
parent43e262f13e8046dbe756cbfa45bf78e022e010cc (diff)
downloadminetest-1c89a07226d069817ffd8ad4034e00b8fc1b96d5.tar.gz
minetest-1c89a07226d069817ffd8ad4034e00b8fc1b96d5.tar.bz2
minetest-1c89a07226d069817ffd8ad4034e00b8fc1b96d5.zip
Restore minimal normal texture support (for minimap shading)
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index e3c40130f..fbdbc4f5f 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -425,6 +425,7 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
CachedPixelShaderSetting<float, 3> m_camera_offset_pixel;
CachedPixelShaderSetting<float, 3> m_camera_offset_vertex;
CachedPixelShaderSetting<SamplerLayer_t> m_base_texture;
+ CachedPixelShaderSetting<SamplerLayer_t> m_normal_texture;
Client *m_client;
public:
@@ -458,6 +459,7 @@ public:
m_camera_offset_pixel("cameraOffset"),
m_camera_offset_vertex("cameraOffset"),
m_base_texture("baseTexture"),
+ m_normal_texture("normalTexture"),
m_client(client)
{
g_settings->registerChangedCallback("enable_fog", settingsCallback, this);
@@ -545,8 +547,9 @@ public:
m_camera_offset_pixel.set(camera_offset_array, services);
m_camera_offset_vertex.set(camera_offset_array, services);
- SamplerLayer_t base_tex = 0;
+ SamplerLayer_t base_tex = 0, normal_tex = 1;
m_base_texture.set(&base_tex, services);
+ m_normal_texture.set(&normal_tex, services);
}
};