26 #ifndef OSGSHADOW_ParallelSplitShadowMap
27 #define OSGSHADOW_ParallelSplitShadowMap 1
30 #include <osg/Material>
32 #include <osg/ClipPlane>
34 #include <osgShadow/ShadowTechnique>
58 virtual void cleanSceneGraph();
76 inline void setMaxFarDistance(
double farDist) { _setMaxFarDistance = farDist; _isSetMaxFarDistance =
true; }
103 void setAmbientBias(
const osg::Vec2& ambientBias );
116 virtual std::string generateGLSL_FragmentShader_BaseTex(
bool debug,
unsigned int splitCount,
double textureRes,
bool filtered,
unsigned int nbrSplits,
unsigned int textureOffset);
187 unsigned int _textureUnitOffset;
189 unsigned int _number_of_splits;
191 bool _debug_color_in_GLSL;
194 bool _user_polgyonOffset_set;
196 unsigned int _resolution;
198 double _setMaxFarDistance;
199 bool _isSetMaxFarDistance;
201 double _split_min_near_dist;
203 double _move_vcam_behind_rcam_factor;
208 bool _GLSL_shadow_filtered;
void setSplitCalculationMode(SplitCalcMode scm=SPLIT_EXP)
osg::Vec3d _lightCameraSource
osg::ref_ptr< osg::Texture2D > _texture
unsigned int _textureUnit
double getMinNearDistanceForSplits() const
void setMoveVCamBehindRCamFactor(double distFactor)
osg::Vec3d _frustumSplitCenter
void setMaxFarDistance(double farDist)
osg::ref_ptr< osg::Camera > _camera
osg::ref_ptr< osg::StateSet > _stateset
void setTextureResolution(unsigned int resolution)
const osg::Light * getUserLight() const
const osg::Vec2f & getPolygonOffset() const
#define META_Object(library, name)
std::map< unsigned int, PSSMShadowSplitTexture > PSSMShadowSplitTextureMap
osg::Vec3d _lightDirection
SplitCalcMode getSplitCalculationMode() const
void setPolygonOffset(const osg::Vec2f &p)
PSSMShadowSplitTextureMap _PSSMShadowSplitTextureMap
const osg::Vec2 & getAmbientBias() const
osg::Vec3d _lightCameraTarget
void setUserLight(osg::Light *light)
osg::ref_ptr< osg::TexGen > _texgen
osg::Uniform * _farDistanceSplit
double getMaxFarDistance() const
osg::ref_ptr< osg::Texture2D > _debug_texture
virtual ~ParallelSplitShadowMap()
unsigned int _debug_textureUnit
osg::ref_ptr< osg::Camera > _debug_camera
void enableShadowGLSLFiltering(bool filtering=true)
void setMinNearDistanceForSplits(double nd)
osg::ref_ptr< osg::StateSet > _debug_stateset
unsigned int getTextureResolution() const
void setFragmentShaderGenerator(FragmentShaderGenerator *fsw)
double getMoveVCamBehindRCamFactor() const