1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 17:19:56 +00:00
openmw-tes3mp/components/sceneutil/shadow.hpp

38 lines
1,010 B
C++
Raw Normal View History

2017-11-08 01:44:49 +00:00
#ifndef COMPONENTS_SCENEUTIL_SHADOW_H
#define COMPONENTS_SCENEUTIL_SHADOW_H
2017-12-27 02:32:17 +00:00
#include <osgShadow/ShadowSettings>
#include <components/terrain/quadtreeworld.hpp>
#include <components/shader/shadermanager.hpp>
2018-02-26 22:27:09 +00:00
#include "mwshadowtechnique.hpp"
2017-11-08 01:44:49 +00:00
namespace SceneUtil
{
2018-02-26 22:27:09 +00:00
class ShadowManager
{
public:
2017-12-27 02:32:17 +00:00
static void disableShadowsForStateSet(osg::ref_ptr<osg::StateSet> stateSet);
2018-02-26 22:27:09 +00:00
ShadowManager(osg::ref_ptr<osg::Group> sceneRoot, osg::ref_ptr<osg::Group> rootNode);
2018-02-26 22:27:09 +00:00
virtual void setupShadowSettings(int castsShadowMask);
virtual Shader::ShaderManager::DefineMap getShadowDefines();
virtual Shader::ShaderManager::DefineMap getShadowsDisabledDefines();
protected:
2017-12-27 02:32:17 +00:00
const int numberOfShadowMapsPerLight;
const bool enableShadows;
const int baseShadowTextureUnit;
2018-02-26 22:27:09 +00:00
osg::ref_ptr<osgShadow::ShadowedScene> mShadowedScene;
osg::ref_ptr<MWShadowTechnique> mShadowTechnique;
};
}
2017-11-08 01:44:49 +00:00
#endif //COMPONENTS_SCENEUTIL_SHADOW_H