1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Implement rendering pipeline and post-processing (#12465)

Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: lhofhansl <lhofhansl@yahoo.com>
This commit is contained in:
x2048 2022-09-06 08:25:18 +02:00 committed by GitHub
parent 464043b8ab
commit ff6dcfea82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 1476 additions and 565 deletions

View file

@ -627,14 +627,11 @@ void Camera::wield(const ItemStack &item)
void Camera::drawWieldedTool(irr::core::matrix4* translation)
{
// Clear Z buffer so that the wielded tool stays in front of world geometry
m_wieldmgr->getVideoDriver()->clearBuffers(video::ECBF_DEPTH);
// Draw the wielded node (in a separate scene manager)
scene::ICameraSceneNode* cam = m_wieldmgr->getActiveCamera();
cam->setAspectRatio(m_cameranode->getAspectRatio());
cam->setFOV(72.0*M_PI/180.0);
cam->setNearValue(10);
cam->setNearValue(40); // give wield tool smaller z-depth than the world in most cases.
cam->setFarValue(1000);
if (translation != NULL)
{