Skip to content

Commit

Permalink
Restore flags texture to fix interlaced stereo mode (minetest#12560)
Browse files Browse the repository at this point in the history
  • Loading branch information
x2048 committed Jul 19, 2022
1 parent b270a46 commit 70c54ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/client/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -455,6 +456,7 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
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);
Expand Down Expand Up @@ -524,9 +526,12 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
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);
}
};

Expand Down

0 comments on commit 70c54ab

Please sign in to comment.