1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-16 09:55:22 +02:00

Adjust shadowmap distortion to use entire SM texture (#12166)

This commit is contained in:
x2048
2022-04-07 22:13:50 +02:00
committed by GitHub
parent 0b5b2b2633
commit 48f7c5603e
12 changed files with 159 additions and 115 deletions

View File

@@ -33,7 +33,8 @@ public:
m_color_map_sampler_setting("ColorMapSampler"),
m_perspective_bias0("xyPerspectiveBias0"),
m_perspective_bias1("xyPerspectiveBias1"),
m_perspective_zbias("zPerspectiveBias")
m_perspective_zbias("zPerspectiveBias"),
m_cam_pos_setting("CameraPos")
{}
void OnSetMaterial(const video::SMaterial &material) override {}
@@ -43,6 +44,7 @@ public:
f32 MaxFar{2048.0f}, MapRes{1024.0f};
f32 PerspectiveBiasXY {0.9f}, PerspectiveBiasZ {0.5f};
v3f CameraPos;
private:
CachedVertexShaderSetting<f32, 16> m_light_mvp_setting;
@@ -52,4 +54,5 @@ private:
CachedVertexShaderSetting<f32> m_perspective_bias0;
CachedVertexShaderSetting<f32> m_perspective_bias1;
CachedVertexShaderSetting<f32> m_perspective_zbias;
CachedVertexShaderSetting<f32, 4> m_cam_pos_setting;
};