mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Tune shadow perspective distortion (#12146)
* Pass perspective distortion parameters as uniforms * Set all perspective bias parameters via ShadowRenderer * Recalibrate perspective distortion and shadow range to render less shadow geometry with the same quality and observed shadow distance
This commit is contained in:
parent
06d197cdd0
commit
31578303a4
12 changed files with 117 additions and 59 deletions
|
@ -33,4 +33,10 @@ void ShadowDepthShaderCB::OnSetConstants(
|
|||
m_max_far_setting.set(&MaxFar, services);
|
||||
s32 TextureId = 0;
|
||||
m_color_map_sampler_setting.set(&TextureId, services);
|
||||
f32 bias0 = PerspectiveBiasXY;
|
||||
m_perspective_bias0.set(&bias0, services);
|
||||
f32 bias1 = 1.0f - bias0 + 1e-5f;
|
||||
m_perspective_bias1.set(&bias1, services);
|
||||
f32 zbias = PerspectiveBiasZ;
|
||||
m_perspective_zbias.set(&zbias, services);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue