diff options
author | x2048 <codeforsmile@gmail.com> | 2022-07-19 20:26:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 20:26:57 +0200 |
commit | 70c54abc2a09d2299f6a7de327d4aecbbad625a5 (patch) | |
tree | 7d4556d83577762b7e79a8b5fc0eaceab4058a9d | |
parent | b270a46e533eaec289a65440f63eb227f0872286 (diff) | |
download | minetest-70c54abc2a09d2299f6a7de327d4aecbbad625a5.tar.gz minetest-70c54abc2a09d2299f6a7de327d4aecbbad625a5.tar.bz2 minetest-70c54abc2a09d2299f6a7de327d4aecbbad625a5.zip |
Restore flags texture to fix interlaced stereo mode (#12560)
-rw-r--r-- | src/client/game.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index e838b337a..caa83ce13 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -421,6 +421,7 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter CachedPixelShaderSetting<float, 3> m_camera_offset_vertex; CachedPixelShaderSetting<SamplerLayer_t> m_base_texture; CachedPixelShaderSetting<SamplerLayer_t> m_normal_texture; + CachedPixelShaderSetting<SamplerLayer_t> m_texture_flags; Client *m_client; public: @@ -455,6 +456,7 @@ public: m_camera_offset_vertex("cameraOffset"), m_base_texture("baseTexture"), m_normal_texture("normalTexture"), + m_texture_flags("textureFlags"), m_client(client) { g_settings->registerChangedCallback("enable_fog", settingsCallback, this); @@ -524,9 +526,12 @@ public: m_camera_offset_pixel.set(camera_offset_array, services); m_camera_offset_vertex.set(camera_offset_array, services); - SamplerLayer_t base_tex = 0, normal_tex = 1; + SamplerLayer_t base_tex = 0, + normal_tex = 1, + flags_tex = 2; m_base_texture.set(&base_tex, services); m_normal_texture.set(&normal_tex, services); + m_texture_flags.set(&flags_tex, services); } }; |