Navigation Menu

Skip to content

Commit

Permalink
Restore minimal normal texture support (for minimap shading)
Browse files Browse the repository at this point in the history
  • Loading branch information
numberZero committed Mar 21, 2021
1 parent 531e7ef commit 44ed05d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/game.cpp
Expand Up @@ -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:
Expand Down Expand Up @@ -459,6 +460,7 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
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);
Expand Down Expand Up @@ -546,8 +548,9 @@ 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;
SamplerLayer_t base_tex = 0, normal_tex = 1;
m_base_texture.set(&base_tex, services);
m_normal_texture.set(&normal_tex, services);
}
};

Expand Down

0 comments on commit 44ed05d

Please sign in to comment.