diff options
author | Vitaliy <numzer0@yandex.ru> | 2021-03-22 01:22:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 23:22:22 +0100 |
commit | 44ed05ddf0c74f3ea26cfb4adbbaed4b6038361f (patch) | |
tree | 1b21d8a35697f0957da2d8eed90cb6cd37025243 | |
parent | 531e7ef8ebbb9c7e08bf9043d96a44558c7a6d7f (diff) | |
download | minetest-44ed05ddf0c74f3ea26cfb4adbbaed4b6038361f.tar.gz minetest-44ed05ddf0c74f3ea26cfb4adbbaed4b6038361f.tar.bz2 minetest-44ed05ddf0c74f3ea26cfb4adbbaed4b6038361f.zip |
Restore minimal normal texture support (for minimap shading)
-rw-r--r-- | src/client/game.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index 9cc359843..31c782c51 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -426,6 +426,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: @@ -459,6 +460,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); @@ -546,8 +548,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); } }; |