From 442e48b84fea511badf108cedc2a6b43d79fd852 Mon Sep 17 00:00:00 2001 From: x2048 Date: Thu, 12 Aug 2021 20:07:09 +0200 Subject: 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. --- src/client/shadows/shadowsshadercallbacks.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/client/shadows/shadowsshadercallbacks.cpp') diff --git a/src/client/shadows/shadowsshadercallbacks.cpp b/src/client/shadows/shadowsshadercallbacks.cpp index 2f5797084..65a63f49c 100644 --- a/src/client/shadows/shadowsshadercallbacks.cpp +++ b/src/client/shadows/shadowsshadercallbacks.cpp @@ -28,17 +28,9 @@ void ShadowDepthShaderCB::OnSetConstants( lightMVP *= driver->getTransform(video::ETS_VIEW); lightMVP *= driver->getTransform(video::ETS_WORLD); - services->setVertexShaderConstant( - services->getPixelShaderConstantID("LightMVP"), - lightMVP.pointer(), 16); - - services->setVertexShaderConstant( - services->getPixelShaderConstantID("MapResolution"), &MapRes, 1); - services->setVertexShaderConstant( - services->getPixelShaderConstantID("MaxFar"), &MaxFar, 1); - + m_light_mvp_setting.set(lightMVP.pointer(), services); + m_map_resolution_setting.set(&MapRes, services); + m_max_far_setting.set(&MaxFar, services); s32 TextureId = 0; - services->setPixelShaderConstant( - services->getPixelShaderConstantID("ColorMapSampler"), &TextureId, - 1); + m_color_map_sampler_setting.set(&TextureId, services); } -- cgit v1.2.3