17 #ifndef OSGSHADOW_STANDARDSHADOWMAP
18 #define OSGSHADOW_STANDARDSHADOWMAP 1
20 #include <osgShadow/DebugShadowMap>
43 { _baseTextureUnit = unit; dirty(); }
46 {
return _baseTextureUnit; }
49 { _shadowTextureUnit = unit; dirty(); }
52 {
return _shadowTextureUnit; }
72 { updateTextureCoordIndices( _baseTextureCoordIndex, index );
73 _baseTextureCoordIndex = index; }
76 {
return _baseTextureCoordIndex; }
82 { updateTextureCoordIndices( _shadowTextureCoordIndex, index );
83 _shadowTextureCoordIndex = index; }
86 {
return _shadowTextureCoordIndex; }
89 { _textureSize = textureSize; dirty(); }
92 {
return _textureSize; }
98 {
return _light.get(); }
101 {
return _light.get(); }
104 {
return _shadowVertexShader.get(); }
107 {
return _shadowFragmentShader.get(); }
110 {
return _mainVertexShader.get(); }
113 {
return _mainFragmentShader.get(); }
116 { _shadowVertexShader = shader; }
119 { _shadowFragmentShader = shader; }
122 { _mainVertexShader = shader; }
125 { _mainFragmentShader = shader; }
131 virtual void updateTextureCoordIndices
132 (
unsigned int baseTexCoordIndex,
unsigned int shadowTexCoordIndex );
134 virtual void searchAndReplaceShaderSource
135 (
osg::Shader*, std::string fromString, std::string toString );
168 virtual void cull( );
170 virtual void aimShadowCastingCamera(
177 virtual void cullShadowReceivingScene( );
179 virtual void cullShadowCastingScene( );
181 virtual void addShadowReceivingTexGen( );
186 virtual void aimShadowCastingCamera(
const osg::Light *light,
unsigned int getShadowTextureUnit(void) const
osg::Shader * getMainVertexShader()
osg::Light * getLight(void)
osg::ref_ptr< osg::Shader > _shadowVertexShader
float _polygonOffsetUnits
osg::ref_ptr< osg::Shader > _mainFragmentShader
osg::ref_ptr< osg::Light > _light
unsigned int _baseTextureUnit
unsigned int _shadowTextureUnit
unsigned int getBaseTextureUnit(void) const
osg::ref_ptr< osg::Light > * _lightPtr
#define META_ViewDependentShadowTechniqueData(ShadowTechnique, TechniqueData)
void setShadowFragmentShader(osg::Shader *shader)
void setBaseTextureCoordIndex(unsigned int index)
osg::ref_ptr< osg::TexGen > _texgen
unsigned int _shadowTextureCoordIndex
void setMainFragmentShader(osg::Shader *shader)
unsigned int _baseTextureCoordIndex
#define META_Object(library, name)
unsigned int getBaseTextureCoordIndex(void) const
osg::ref_ptr< osg::Shader > _shadowFragmentShader
void setMainVertexShader(osg::Shader *shader)
osg::Shader * getShadowFragmentShader()
void setShadowVertexShader(osg::Shader *shader)
osg::Shader * getShadowVertexShader()
const osg::Vec2s & getTextureSize() const
void setTextureSize(const osg::Vec2s &textureSize)
unsigned int getShadowTextureCoordIndex(void) const
osg::Shader * getMainFragmentShader()
osg::ref_ptr< osg::StateSet > _stateset
void setBaseTextureUnit(unsigned int unit)
void setShadowTextureUnit(unsigned int unit)
const osg::Light * getLight(void) const
osg::ref_ptr< osg::Shader > _mainVertexShader
StandardShadowMap ThisClass
float _polygonOffsetFactor
unsigned int * _shadowTextureUnitPtr
void setShadowTextureCoordIndex(unsigned int index)
unsigned int * _baseTextureUnitPtr
void setLight(osg::Light *light)