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

38 lines
999 B
C++
Raw Normal View History

2017-11-08 01:44:49 +00:00
#ifndef COMPONENTS_SCENEUTIL_SHADOW_H
#define COMPONENTS_SCENEUTIL_SHADOW_H
#include <osgShadow/ViewDependentShadowMap>
#include <components/shader/shadermanager.hpp>
2017-11-08 01:44:49 +00:00
namespace SceneUtil
{
class MWShadow : public osgShadow::ViewDependentShadowMap
{
public:
2017-11-07 20:34:48 +00:00
static const int numberOfShadowMapsPerLight = 3;
static const bool enableShadows = true;
2017-11-07 00:32:04 +00:00
static const bool debugHud = true;
MWShadow();
2017-11-07 16:34:51 +00:00
const static int baseShadowTextureUnit = 8 - numberOfShadowMapsPerLight;
virtual void cull(osgUtil::CullVisitor& cv);
virtual Shader::ShaderManager::DefineMap getShadowDefines();
virtual Shader::ShaderManager::DefineMap getShadowsDisabledDefines();
protected:
const int debugTextureUnit;
2017-11-07 00:32:04 +00:00
std::vector<osg::ref_ptr<osg::Camera>> debugCameras;
osg::ref_ptr<osg::Program> debugProgram;
2017-11-07 00:32:04 +00:00
std::vector<osg::ref_ptr<osg::Node>> debugGeometry;
};
}
2017-11-08 01:44:49 +00:00
#endif //COMPONENTS_SCENEUTIL_SHADOW_H