mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +00:00
Enable groundcover lighting for non FFP
This commit is contained in:
parent
08b5681284
commit
142c6d2993
2 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
#include <osg/VertexAttribDivisor>
|
#include <osg/VertexAttribDivisor>
|
||||||
|
|
||||||
#include <components/esm/esmreader.hpp>
|
#include <components/esm/esmreader.hpp>
|
||||||
|
#include <components/sceneutil/lightmanager.hpp>
|
||||||
|
|
||||||
#include "apps/openmw/mwworld/esmstore.hpp"
|
#include "apps/openmw/mwworld/esmstore.hpp"
|
||||||
#include "apps/openmw/mwbase/environment.hpp"
|
#include "apps/openmw/mwbase/environment.hpp"
|
||||||
|
@ -271,6 +272,8 @@ namespace MWRender
|
||||||
group->getOrCreateStateSet()->setAttributeAndModes(alpha.get(), osg::StateAttribute::ON);
|
group->getOrCreateStateSet()->setAttributeAndModes(alpha.get(), osg::StateAttribute::ON);
|
||||||
group->getBound();
|
group->getBound();
|
||||||
group->setNodeMask(Mask_Groundcover);
|
group->setNodeMask(Mask_Groundcover);
|
||||||
|
if (mSceneManager->getLightingMethod() != SceneUtil::LightingMethod::FFP)
|
||||||
|
group->setCullCallback(new SceneUtil::LightListCallback);
|
||||||
mSceneManager->recreateShaders(group, "groundcover", false, true);
|
mSceneManager->recreateShaders(group, "groundcover", false, true);
|
||||||
|
|
||||||
return group;
|
return group;
|
||||||
|
|
|
@ -160,6 +160,7 @@ Sets the internal handling of light sources.
|
||||||
'legacy' is restricted to a maximum of 8 lights per object and guarantees fixed function pipeline compatible lighting.
|
'legacy' is restricted to a maximum of 8 lights per object and guarantees fixed function pipeline compatible lighting.
|
||||||
|
|
||||||
'default' removes the light limit via :ref:`max lights` and follows a new attenuation formula which can drastically reduce light popping and seams.
|
'default' removes the light limit via :ref:`max lights` and follows a new attenuation formula which can drastically reduce light popping and seams.
|
||||||
|
This mode also enables vertex lighting on groundcover, which is otherwise completely disabled with 'legacy'.
|
||||||
It is recommended to use this mode with older hardware, as the technique ensures a range of compatibility equal to that of 'legacy'.
|
It is recommended to use this mode with older hardware, as the technique ensures a range of compatibility equal to that of 'legacy'.
|
||||||
|
|
||||||
'experimental' carries all of the benefits that 'legacy' has, but uses a modern approach that allows for a higher 'max lights' count with little to no performance penalties on modern hardware.
|
'experimental' carries all of the benefits that 'legacy' has, but uses a modern approach that allows for a higher 'max lights' count with little to no performance penalties on modern hardware.
|
||||||
|
|
Loading…
Reference in a new issue