mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-25 13:45:23 +02:00
Rename IShaderConstantSetter
This commit is contained in:
@@ -107,7 +107,7 @@ void ShadowRenderer::disable()
|
||||
void ShadowRenderer::preInit(IWritableShaderSource *shsrc)
|
||||
{
|
||||
if (g_settings->getBool("enable_dynamic_shadows")) {
|
||||
shsrc->addShaderConstantSetterFactory(new ShadowConstantSetterFactory());
|
||||
shsrc->addShaderUniformSetterFactory(new ShadowUniformSetterFactory());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "client/shadows/shadowsshadercallbacks.h"
|
||||
#include "client/renderingengine.h"
|
||||
|
||||
void ShadowConstantSetter::onSetConstants(video::IMaterialRendererServices *services)
|
||||
void ShadowUniformSetter::onSetUniforms(video::IMaterialRendererServices *services)
|
||||
{
|
||||
auto *shadow = RenderingEngine::get_shadow_renderer();
|
||||
if (!shadow)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// Used by main game rendering
|
||||
|
||||
class ShadowConstantSetter : public IShaderConstantSetter
|
||||
class ShadowUniformSetter : public IShaderUniformSetter
|
||||
{
|
||||
CachedPixelShaderSetting<f32, 16> m_shadow_view_proj{"m_ShadowViewProj"};
|
||||
CachedPixelShaderSetting<f32, 3> m_light_direction{"v_LightDirection"};
|
||||
@@ -33,17 +33,17 @@ class ShadowConstantSetter : public IShaderConstantSetter
|
||||
CachedPixelShaderSetting<f32> m_perspective_zbias_pixel{"zPerspectiveBias"};
|
||||
|
||||
public:
|
||||
ShadowConstantSetter() = default;
|
||||
~ShadowConstantSetter() = default;
|
||||
ShadowUniformSetter() = default;
|
||||
~ShadowUniformSetter() = default;
|
||||
|
||||
virtual void onSetConstants(video::IMaterialRendererServices *services) override;
|
||||
virtual void onSetUniforms(video::IMaterialRendererServices *services) override;
|
||||
};
|
||||
|
||||
class ShadowConstantSetterFactory : public IShaderConstantSetterFactory
|
||||
class ShadowUniformSetterFactory : public IShaderUniformSetterFactory
|
||||
{
|
||||
public:
|
||||
virtual IShaderConstantSetter *create() {
|
||||
return new ShadowConstantSetter();
|
||||
virtual IShaderUniformSetter *create() {
|
||||
return new ShadowUniformSetter();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user