mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Correct normal bias for entities
Remove use of magic constants. Apply cameraOffset Calculate distance projected on SM plane
This commit is contained in:
parent
25c1974e0d
commit
4801bdf45a
4 changed files with 14 additions and 15 deletions
|
@ -118,12 +118,8 @@ size_t ShadowRenderer::getDirectionalLightCount() const
|
|||
f32 ShadowRenderer::getMaxShadowFar() const
|
||||
{
|
||||
if (!m_light_list.empty()) {
|
||||
float wanted_range = m_client->getEnv().getClientMap().getWantedRange();
|
||||
|
||||
float zMax = m_light_list[0].getMaxFarValue() > wanted_range
|
||||
? wanted_range
|
||||
: m_light_list[0].getMaxFarValue();
|
||||
return zMax * MAP_BLOCKSIZE;
|
||||
float zMax = m_light_list[0].getMaxFarValue();
|
||||
return zMax;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue