mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00: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:
parent
0709946c75
commit
442e48b84f
7 changed files with 66 additions and 67 deletions
|
@ -21,14 +21,28 @@ 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 ShadowDepthShaderCB : public video::IShaderConstantSetCallBack
|
||||
{
|
||||
public:
|
||||
ShadowDepthShaderCB() :
|
||||
m_light_mvp_setting("LightMVP"),
|
||||
m_map_resolution_setting("MapResolution"),
|
||||
m_max_far_setting("MaxFar"),
|
||||
m_color_map_sampler_setting("ColorMapSampler")
|
||||
{}
|
||||
|
||||
void OnSetMaterial(const video::SMaterial &material) override {}
|
||||
|
||||
void OnSetConstants(video::IMaterialRendererServices *services,
|
||||
s32 userData) override;
|
||||
|
||||
f32 MaxFar{2048.0f}, MapRes{1024.0f};
|
||||
|
||||
private:
|
||||
CachedVertexShaderSetting<f32, 16> m_light_mvp_setting;
|
||||
CachedVertexShaderSetting<f32> m_map_resolution_setting;
|
||||
CachedVertexShaderSetting<f32> m_max_far_setting;
|
||||
CachedPixelShaderSetting<s32> m_color_map_sampler_setting;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue