![]() |
VR-Forces Development_Version Class Documentation
|
The DtOsgShadowTechnique class implements a robust shadow mapping system. More...

Classes | |
| struct | CascadeImportanceData |
| struct | CloudShadowPreDrawCallback |
| struct | CsmSplitData |
| struct | PerChannelData |
| struct | PostDrawFBOCallback |
| struct | PostDrawSDSMCallback |
| struct | PreDrawFBOCallback |
| struct | SdsmDrawCallback |
Public Member Functions | |
| DtOsgShadowTechnique (DtDe &de) | |
| CTOR. | |
| DtOsgShadowTechnique (const DtOsgShadowTechnique &es, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| DTOR. | |
| virtual osg::Object * | cloneType () const |
| Creates a new object of Type DtOsgShadowTechnique. | |
| virtual osg::Object * | clone (const osg::CopyOp ©op) const |
| Creates a new copy of DtOsgShadowTechnique object. | |
| virtual bool | isSameKindAs (const osg::Object *obj) const |
| Returns true if object is of the DtOsgShadowTechnique class. Otherwise, returns false. | |
| virtual const char * | libraryName () const |
| Returns the namespace string. | |
| virtual const char * | className () const |
| Returns the class name string. | |
| virtual void | init () |
| Overrides the osgShadow::ShadowTechnique::init method. | |
| virtual void | update (osg::NodeVisitor &nv) |
| Overrides the osgShadow::ShadowTechnique::update method. | |
| virtual void | cull (osgUtil::CullVisitor &cv) |
| Overrides the osgShadow::ShadowTechnique::cull method. | |
| virtual void | cleanSceneGraph () |
| Overrides the osgShadow::ShadowTechnique::cleanSceneGraph method. | |
| void | setChannelShadowState (DtOsgChannel *osgChannel, bool enable) |
| Set the shadow mode for channels. | |
| bool | getChannelShadowSettings (DtOsgChannel *osgChannel, DtShadowSettingsObject **shadowSettingObject, bool *isPlanView) |
| Gets the shadow settings for this channel. | |
| bool | getChannelCloudShadowMap (DtOsgChannel *osgChannel, unsigned int *textureIndex, osg::Matrix *textureViewProjMatrix) |
| Gets the cloud shadow map for this channel. | |
| bool | getCameraCloudShadowMap (osg::Camera *camera, unsigned int *textureIndex, osg::Matrix *textureViewProjMatrix) |
| Gets the cloud shadow map for this camera. | |
| void | setGlobalLight (osg::LightSource *light) |
| Sets global light source. | |
| const osg::LightSource * | getGlobalLight () const |
| Gets global light source. | |
Static Public Member Functions | |
| static const std::string & | shadowCameraPrefixString (void) |
| static const std::string & | shadowSDSMCameraPrefixString (void) |
Protected Types | |
| typedef std::map< const osg::Camera *, osg::ref_ptr < PerChannelData > > | PerChannelDataMap |
Protected Member Functions | |
| virtual void | reInitialize (unsigned int quality) |
| Re-initialize perChannelData using the specified quality setting. | |
| virtual bool | configureShadowTraversalNodeMask (bool traverseEntities, bool traverseProps, bool traverseTerrain) |
| virtual std::string | generateVertexShader (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized vertex shader given the shadow settings. | |
| virtual std::string | generateFragmentShader (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment shader given the shadow settings. | |
| virtual std::string | generateCloudShadowVertexShader (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an cloud shadow vertex shader given the shadow settings. | |
| virtual std::string | generateCloudShadowFragmentShader (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment shader given the shadow settings. | |
| unsigned int | getFilterCount (DtShadowSettingsObject *shadowSettingObject) |
| Gets the number of taps for percentage closer filtering(PCF) | |
| virtual | ~DtOsgShadowTechnique () |
| DTOR. | |
Protected Attributes | |
| PerChannelDataMap | myPerChannelDataMap |
| osg::ref_ptr< osg::LightSource > | myGlobalLight |
| unsigned int | myTextureUnitOffset |
| DtDe & | myDe |
Static Protected Attributes | |
| static const std::string | myShadowCameraPrefixString |
| static const std::string | mySDSMShadowCameraPrefixString |
Private Member Functions | |
| std::string | generatePoissonDiscArray (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment poisson disc array given the shadow settings. | |
| std::string | generateHelperFunctions (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment helper functions given the shadow settings. | |
| std::string | generateFragmentComputeShadowFunction (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment compute shadow function given the shadow settings. | |
| std::string | generateFragmentUniformAndVariables (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment uniforms and variables given the shadow settings. | |
| std::string | generateFragmentMain (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment main given the shadow settings. | |
| std::string | generateFragmentVisualizeCascadeMain (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Generates an optimized fragment visualize cascade main given the shadow settings. | |
| bool | getCameraSettings (osg::Camera *viewCamera, PerChannelData **perChannelData, DtShadowSettingsObject **shadowSettingObject, bool *isPlanView) |
| Gets camera shadow settings. | |
| void | initPerChannelData (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Initializes per channel data. | |
| void | installVirtualProgramAndSharedStateSet (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Initializes the virtual program and shared stateset for perChannelData. | |
| void | packTextureAtlas (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Computes the total width and height for perChannelData. | |
| void | installSDSM (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Install SDSM. | |
| void | traverseSDSMCameras (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject, osgUtil::CullVisitor &cv, double cameraMagnification) |
| Traverses SDSM Cameras. | |
| void | installCloudShadows (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Initializes per channel cloud shadows. | |
| void | updateCloudShadows (osg::Camera *camera) |
| Updates per camera cloud shadows. | |
| void | updateCloudShadows (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject, const osg::Matrix &inverseViewMatrix) |
| Updates per channel cloud shadows. | |
| void | updateCascadeImportance (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject) |
| Updates Cascade Importance. | |
| osg::Program * | getProgramFromFile (const std::string &szVertexShader, const std::string &szFragmentShader) |
| Creates a Program with a vertex and fragment shader. | |
| void | installPreFilter (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject, osg::Camera *depthCamera, osg::Camera *xBlurCamera, osg::Camera *yBlurCamera, osg::Texture2D *texture, osg::StateSet *stateSet, unsigned int textureUnit) |
| Installs PreFilter for texture 2d. | |
| void | installPreFilter (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject, osg::Camera *depthCamera, osg::Camera *xBlurCamera, osg::Camera *yBlurCamera, unsigned int textureLayer, osg::Texture2DArray *texture2DArray, osg::Texture2DArray *preFilterTexture2DArray1, osg::Texture2DArray *preFilterTexture2DArray2) |
| Installs PreFilter for texture 2d Array. | |
| osg::Texture2D * | createTexture2D (int width, int height, GLenum internalFormat, GLenum sourceFormat, GLenum sourceType, bool shadowComparisonMode, osg::Texture2D::FilterMode minFilter=osg::Texture2D::NEAREST, osg::Texture2D::FilterMode magFilter=osg::Texture2D::NEAREST) |
| Creates 2d texture. | |
| osg::Texture2DArray * | createTexture2DArray (int width, int height, int depth, GLenum internalFormat, GLenum sourceFormat, GLenum sourceType, bool shadowComparisonMode, osg::Texture2DArray::FilterMode minFilter=osg::Texture2DArray::NEAREST, osg::Texture2DArray::FilterMode magFilter=osg::Texture2DArray::NEAREST) |
| Creates 2d texture array. | |
| osg::Camera * | createCamera (int width, int height, GLbitfield clearMask) |
| Creates a simple camera. | |
| osg::Geode * | createFullScreenQuad (const osg::Vec2 &size, const osg::Vec2 &uvStart, const osg::Vec2 &uvStop) |
| Creates a full screen quad. | |
| osg::Camera * | createHudCamera (int width, int height, GLbitfield clearMask) |
| Creates a hud camera with a full screen quad. | |
| double | computeUniformSplit (double nearDistance, double farDistance, unsigned int splitIndex, unsigned int numSplits) |
| Compute uniform split distance for specified cascade. | |
| double | computeLogarithmicSplit (double nearDistance, double farDistance, unsigned int splitIndex, unsigned int numSplits) |
| Compute logarithm split distance for specified cascade. | |
| void | constructSplitLightCamera (PerChannelData *perChannelData, DtShadowSettingsObject *shadowSettingObject, CsmSplitData &csmSplit, const osg::Vec3 &lightDirection, const osg::Matrix &cameraViewMatrix, const osg::Matrix &cameraProjectionMatrix, double cameraMagnification) |
| Compute logarithm split distance for specified cascade. | |
| void | setDirty (bool dirty) |
| Sets dirty for shadow technisue to true or false. | |
The DtOsgShadowTechnique class implements a robust shadow mapping system.
|
protected |
| makVrv::DtOsgShadowTechnique::DtOsgShadowTechnique | ( | DtDe & | de | ) |
CTOR.
| makVrv::DtOsgShadowTechnique::DtOsgShadowTechnique | ( | const DtOsgShadowTechnique & | es, |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
DTOR.
|
inlineprotectedvirtual |
DTOR.
|
inlinevirtual |
Creates a new object of Type DtOsgShadowTechnique.
|
inlinevirtual |
Creates a new copy of DtOsgShadowTechnique object.
|
inlinevirtual |
Returns true if object is of the DtOsgShadowTechnique class. Otherwise, returns false.
|
inlinevirtual |
Returns the namespace string.
|
inlinevirtual |
Returns the class name string.
|
virtual |
Overrides the osgShadow::ShadowTechnique::init method.
|
virtual |
Overrides the osgShadow::ShadowTechnique::update method.
|
virtual |
Overrides the osgShadow::ShadowTechnique::cull method.
|
virtual |
Overrides the osgShadow::ShadowTechnique::cleanSceneGraph method.
| void makVrv::DtOsgShadowTechnique::setChannelShadowState | ( | DtOsgChannel * | osgChannel, |
| bool | enable | ||
| ) |
Set the shadow mode for channels.
| bool makVrv::DtOsgShadowTechnique::getChannelShadowSettings | ( | DtOsgChannel * | osgChannel, |
| DtShadowSettingsObject ** | shadowSettingObject, | ||
| bool * | isPlanView | ||
| ) |
Gets the shadow settings for this channel.
| bool makVrv::DtOsgShadowTechnique::getChannelCloudShadowMap | ( | DtOsgChannel * | osgChannel, |
| unsigned int * | textureIndex, | ||
| osg::Matrix * | textureViewProjMatrix | ||
| ) |
Gets the cloud shadow map for this channel.
| bool makVrv::DtOsgShadowTechnique::getCameraCloudShadowMap | ( | osg::Camera * | camera, |
| unsigned int * | textureIndex, | ||
| osg::Matrix * | textureViewProjMatrix | ||
| ) |
Gets the cloud shadow map for this camera.
|
inline |
Sets global light source.
|
inline |
Gets global light source.
|
static |
|
static |
|
protectedvirtual |
Re-initialize perChannelData using the specified quality setting.
|
protectedvirtual |
|
protectedvirtual |
Generates an optimized vertex shader given the shadow settings.
|
protectedvirtual |
Generates an optimized fragment shader given the shadow settings.
|
protectedvirtual |
Generates an cloud shadow vertex shader given the shadow settings.
|
protectedvirtual |
Generates an optimized fragment shader given the shadow settings.
|
protected |
Gets the number of taps for percentage closer filtering(PCF)
|
private |
Generates an optimized fragment poisson disc array given the shadow settings.
|
private |
Generates an optimized fragment helper functions given the shadow settings.
|
private |
Generates an optimized fragment compute shadow function given the shadow settings.
|
private |
Generates an optimized fragment uniforms and variables given the shadow settings.
|
private |
Generates an optimized fragment main given the shadow settings.
|
private |
Generates an optimized fragment visualize cascade main given the shadow settings.
|
private |
Gets camera shadow settings.
|
private |
Initializes per channel data.
|
private |
Initializes the virtual program and shared stateset for perChannelData.
|
private |
Computes the total width and height for perChannelData.
|
private |
Install SDSM.
|
private |
Traverses SDSM Cameras.
|
private |
Initializes per channel cloud shadows.
|
private |
Updates per camera cloud shadows.
|
private |
Updates per channel cloud shadows.
|
private |
Updates Cascade Importance.
|
private |
Creates a Program with a vertex and fragment shader.
|
private |
Installs PreFilter for texture 2d.
|
private |
Installs PreFilter for texture 2d Array.
|
private |
Creates 2d texture.
|
private |
Creates 2d texture array.
|
private |
Creates a simple camera.
|
private |
Creates a full screen quad.
|
private |
Creates a hud camera with a full screen quad.
|
private |
Compute uniform split distance for specified cascade.
|
private |
Compute logarithm split distance for specified cascade.
|
private |
Compute logarithm split distance for specified cascade.
|
inlineprivate |
Sets dirty for shadow technisue to true or false.
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |