1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-23 04:45:24 +02:00

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.
This commit is contained in:
x2048
2021-08-12 20:07:09 +02:00
committed by GitHub
parent 0709946c75
commit 442e48b84f
7 changed files with 66 additions and 67 deletions

View File

@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_extrabloated.h"
#include <IMaterialRendererServices.h>
#include <IShaderConstantSetCallBack.h>
#include "client/shader.h"
class shadowScreenQuad
{
@@ -38,8 +39,16 @@ private:
class shadowScreenQuadCB : public video::IShaderConstantSetCallBack
{
public:
shadowScreenQuadCB(){};
shadowScreenQuadCB() :
m_sm_client_map_setting("ShadowMapClientMap"),
m_sm_client_map_trans_setting("ShadowMapClientMapTraslucent"),
m_sm_dynamic_sampler_setting("ShadowMapSamplerdynamic")
{}
virtual void OnSetConstants(video::IMaterialRendererServices *services,
s32 userData);
private:
CachedPixelShaderSetting<s32> m_sm_client_map_setting;
CachedPixelShaderSetting<s32> m_sm_client_map_trans_setting;
CachedPixelShaderSetting<s32> m_sm_dynamic_sampler_setting;
};