17#ifndef OSGSHADOW_STANDARDSHADOWMAP
18#define OSGSHADOW_STANDARDSHADOWMAP 1
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; }
141 (
unsigned int baseTexCoordIndex,
unsigned int shadowTexCoordIndex );
144 (
osg::Shader*, std::string fromString, std::string toString );
#define META_ViewDependentShadowTechniqueData(ShadowTechnique, TechniqueData)
Definition ViewDependentShadowTechnique:32
Definition DebugShadowMap:42
Definition StandardShadowMap:25
unsigned int _shadowTextureCoordIndex
Definition StandardShadowMap:158
osg::Shader * getShadowVertexShader()
Definition StandardShadowMap:103
osg::Shader * getShadowFragmentShader()
Definition StandardShadowMap:106
void setTextureSize(const osg::Vec2s &textureSize)
Definition StandardShadowMap:88
osg::ref_ptr< osg::Light > _light
Definition StandardShadowMap:151
void setLight(osg::Light *light)
Definition StandardShadowMap:94
void setBaseTextureUnit(unsigned int unit)
Definition StandardShadowMap:42
void setBaseTextureCoordIndex(unsigned int index)
Definition StandardShadowMap:71
unsigned int getBaseTextureUnit(void) const
Definition StandardShadowMap:45
unsigned int _baseTextureCoordIndex
Definition StandardShadowMap:157
virtual void resizeGLObjectBuffers(unsigned int maxSize)
virtual ~StandardShadowMap(void)
osg::Vec2s _textureSize
Definition StandardShadowMap:154
unsigned int getShadowTextureCoordIndex(void) const
Definition StandardShadowMap:85
const osg::Vec2s & getTextureSize() const
Definition StandardShadowMap:91
unsigned int _shadowTextureUnit
Definition StandardShadowMap:156
void setShadowTextureCoordIndex(unsigned int index)
Definition StandardShadowMap:81
META_Object(osgShadow, StandardShadowMap)
virtual void searchAndReplaceShaderSource(osg::Shader *, std::string fromString, std::string toString)
StandardShadowMap(const StandardShadowMap &ssm, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
void setMainVertexShader(osg::Shader *shader)
Definition StandardShadowMap:121
osg::Shader * getMainVertexShader()
Definition StandardShadowMap:109
unsigned int getShadowTextureUnit(void) const
Definition StandardShadowMap:51
void setMainFragmentShader(osg::Shader *shader)
Definition StandardShadowMap:124
void setShadowVertexShader(osg::Shader *shader)
Definition StandardShadowMap:115
osg::ref_ptr< osg::Shader > _mainFragmentShader
Definition StandardShadowMap:147
unsigned int _baseTextureUnit
Definition StandardShadowMap:155
osg::ref_ptr< osg::Shader > _mainVertexShader
Definition StandardShadowMap:146
float _polygonOffsetFactor
Definition StandardShadowMap:152
osg::ref_ptr< osg::Shader > _shadowVertexShader
Definition StandardShadowMap:148
DebugShadowMap BaseClass
Definition StandardShadowMap:30
virtual void updateTextureCoordIndices(unsigned int baseTexCoordIndex, unsigned int shadowTexCoordIndex)
StandardShadowMap ThisClass
Definition StandardShadowMap:28
void setShadowFragmentShader(osg::Shader *shader)
Definition StandardShadowMap:118
osg::Shader * getMainFragmentShader()
Definition StandardShadowMap:112
const osg::Light * getLight(void) const
Definition StandardShadowMap:100
virtual void releaseGLObjects(osg::State *=0) const
void setShadowTextureUnit(unsigned int unit)
Definition StandardShadowMap:48
float _polygonOffsetUnits
Definition StandardShadowMap:153
osg::Light * getLight(void)
Definition StandardShadowMap:97
osg::ref_ptr< osg::Shader > _shadowFragmentShader
Definition StandardShadowMap:149
unsigned int getBaseTextureCoordIndex(void) const
Definition StandardShadowMap:75
Definition CullVisitor:49
Definition BoundingSphere:35
@ SHALLOW_COPY
Definition CopyOp:47
Definition ConvexPolyhedron:33
#define OSGSHADOW_EXPORT
Definition osgShadow/Export:39
Definition DebugShadowMap:109
Definition StandardShadowMap:161
virtual void cullShadowCastingScene()
virtual void resizeGLObjectBuffers(unsigned int maxSize)
unsigned int * _shadowTextureUnitPtr
Definition StandardShadowMap:164
virtual void init(ThisClass *st, osgUtil::CullVisitor *cv)
virtual void addShadowReceivingTexGen()
osg::ref_ptr< osg::Light > * _lightPtr
Definition StandardShadowMap:162
osg::ref_ptr< osg::TexGen > _texgen
Definition StandardShadowMap:172
virtual void releaseGLObjects(osg::State *=0) const
virtual void aimShadowCastingCamera(const osg::BoundingSphere &bounds, const osg::Light *light, const osg::Vec4 &worldLightPos, const osg::Vec3 &worldLightDir, const osg::Vec3 &worldLightUp=osg::Vec3(0, 1, 0))
virtual void cullShadowReceivingScene()
virtual void aimShadowCastingCamera(const osg::Light *light, const osg::Vec4 &worldLightPos, const osg::Vec3 &worldLightDir, const osg::Vec3 &worldLightUp=osg::Vec3(0, 1, 0))
unsigned int * _baseTextureUnitPtr
Definition StandardShadowMap:163
virtual const osg::Light * selectLight(osg::Vec4 &viewLightPos, osg::Vec3 &viewLightDir)
osg::ref_ptr< osg::StateSet > _stateset
Definition StandardShadowMap:173