mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
This commit is contained in:
parent
46f42e15c4
commit
c47313db65
35 changed files with 2624 additions and 38 deletions
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include <IMeshManipulator.h>
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include "client/client.h"
|
||||
#include "client/renderingengine.h"
|
||||
#include "client/sound.h"
|
||||
#include "client/tile.h"
|
||||
#include "util/basic_macros.h"
|
||||
|
@ -555,6 +556,9 @@ void GenericCAO::removeFromScene(bool permanent)
|
|||
clearParentAttachment();
|
||||
}
|
||||
|
||||
if (auto shadow = RenderingEngine::get_shadow_renderer())
|
||||
shadow->removeNodeFromShadowList(getSceneNode());
|
||||
|
||||
if (m_meshnode) {
|
||||
m_meshnode->remove();
|
||||
m_meshnode->drop();
|
||||
|
@ -803,10 +807,13 @@ void GenericCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
|
|||
if (m_reset_textures_timer < 0)
|
||||
updateTextures(m_current_texture_modifier);
|
||||
|
||||
scene::ISceneNode *node = getSceneNode();
|
||||
if (scene::ISceneNode *node = getSceneNode()) {
|
||||
if (m_matrixnode)
|
||||
node->setParent(m_matrixnode);
|
||||
|
||||
if (node && m_matrixnode)
|
||||
node->setParent(m_matrixnode);
|
||||
if (auto shadow = RenderingEngine::get_shadow_renderer())
|
||||
shadow->addNodeToShadowList(node);
|
||||
}
|
||||
|
||||
updateNametag();
|
||||
updateMarker();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue