summaryrefslogtreecommitdiff
path: root/src/client/shadows/shadowsScreenQuad.cpp
diff options
context:
space:
mode:
authorx2048 <codeforsmile@gmail.com>2021-08-12 20:07:09 +0200
committerGitHub <noreply@github.com>2021-08-12 20:07:09 +0200
commit442e48b84fea511badf108cedc2a6b43d79fd852 (patch)
treed4ba62bd7398f4e1f820dd19425344588a1fe9db /src/client/shadows/shadowsScreenQuad.cpp
parent0709946c75ae6f2257d368714185bed7bee538ba (diff)
downloadminetest-442e48b84fea511badf108cedc2a6b43d79fd852.tar.gz
minetest-442e48b84fea511badf108cedc2a6b43d79fd852.tar.bz2
minetest-442e48b84fea511badf108cedc2a6b43d79fd852.zip
Move updating shadows outside of RenderingCore::drawAll. (#11491)
Fixes indirect rendering modes such as some 3D modes mentioned in #11437 and undersampled rendering. Does not fully fix anaglyph 3d mode.
Diffstat (limited to 'src/client/shadows/shadowsScreenQuad.cpp')
-rw-r--r--src/client/shadows/shadowsScreenQuad.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/client/shadows/shadowsScreenQuad.cpp b/src/client/shadows/shadowsScreenQuad.cpp
index c36ee0d60..5f6d38157 100644
--- a/src/client/shadows/shadowsScreenQuad.cpp
+++ b/src/client/shadows/shadowsScreenQuad.cpp
@@ -51,17 +51,11 @@ void shadowScreenQuadCB::OnSetConstants(
video::IMaterialRendererServices *services, s32 userData)
{
s32 TextureId = 0;
- services->setPixelShaderConstant(
- services->getPixelShaderConstantID("ShadowMapClientMap"),
- &TextureId, 1);
+ m_sm_client_map_setting.set(&TextureId, services);
TextureId = 1;
- services->setPixelShaderConstant(
- services->getPixelShaderConstantID("ShadowMapClientMapTraslucent"),
- &TextureId, 1);
+ m_sm_client_map_trans_setting.set(&TextureId, services);
TextureId = 2;
- services->setPixelShaderConstant(
- services->getPixelShaderConstantID("ShadowMapSamplerdynamic"),
- &TextureId, 1);
+ m_sm_dynamic_sampler_setting.set(&TextureId, services);
}