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

Port shadow shaders to work with OpenGL3

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
PtiLuky
2025-10-13 11:04:07 +02:00
committed by sfan5
parent 5e23e478b1
commit d834c45d1c
13 changed files with 128 additions and 264 deletions

View File

@@ -4,13 +4,12 @@
#pragma once
#include <IMaterialRendererServices.h>
#include <IShaderConstantSetCallBack.h>
#include "client/shader.h"
class shadowScreenQuad
class ShadowScreenQuad
{
public:
shadowScreenQuad();
ShadowScreenQuad();
void render(video::IVideoDriver *driver);
video::SMaterial &getMaterial() { return Material; }
@@ -20,11 +19,11 @@ private:
video::SMaterial Material;
};
class shadowScreenQuadCB : public video::IShaderConstantSetCallBack
class ShadowScreenQuadUniformSetter : public IShaderUniformSetterRC
{
public:
virtual void OnSetConstants(video::IMaterialRendererServices *services,
s32 userData);
virtual void onSetUniforms(video::IMaterialRendererServices *services) override;
private:
CachedPixelShaderSetting<s32> m_sm_client_map_setting{"ShadowMapClientMap"};
CachedPixelShaderSetting<s32>