14 #include <osgEarth/VirtualProgram>
16 #include <osg/Referenced>
18 #include <osg/PolygonOffset>
27 class DtOsgDebugFrustum;
28 class DtShadowSettingsObject;
127 void resizeCascades(
unsigned int logicalSplitCount,
unsigned int cameraCount);
150 const osg::Vec3d& segmentMin,
const osg::Vec3d& segmentMax,
const osg::Vec3d& frustumMin,
151 const osg::Vec3d& frustumMax,
float zPadding);
osg::ref_ptr< osg::Camera > myOverlayDebugFarCamera
Definition: DtPerChannelData.h:223
makVrv::DtOsgChannel & myChannel
Definition: DtPerChannelData.h:207
Definition: DtPerChannelData.h:102
Definition: DtShadowSettingsObject.h:24
void resizeCascades(unsigned int logicalSplitCount, unsigned int cameraCount)
Resizes myCascades to logicalSplitCount entries, initializing mySplitIndex on each entry...
Holds all state for a single shadow cascade split.
Definition: DtPerChannelData.h:42
double myCurrentSimTimeScale
Definition: DtPerChannelData.h:210
double myLastSimTime
Definition: DtPerChannelData.h:230
bool myRefresh
When true, this cascade's shadow map will be re-rendered on the current frame. Set by the refresh sch...
Definition: DtPerChannelData.h:69
bool myJustInitialized
Definition: DtPerChannelData.h:205
float myLastFarDistance
Definition: DtPerChannelData.h:211
osg::ref_ptr< osgEarth::VirtualProgram > myVirtualProgram
Definition: DtPerChannelData.h:195
osg::ref_ptr< DtOsgDebugFrustum > myFrustum
Debug visualization of this cascade's light-space frustum, rendered as a wireframe in the scene when ...
Definition: DtPerChannelData.h:90
osg::ref_ptr< osg::Uniform > mySplitDistancesWorldUniform
Definition: DtPerChannelData.h:213
Contains the DtOsgTextureApplyAttribute class.
float myImportance
A normalized priority score [0, 1] used by the refresh scheduler to determine how urgently this casca...
Definition: DtPerChannelData.h:75
DtPerChannelData & operator=(const DtPerChannelData &rhs)=delete
not allowed
DtPerChannelData()=delete
not allowed
unsigned int myShadowMapSize
Definition: DtPerChannelData.h:228
osg::ref_ptr< osg::PolygonOffset > myPolygonOffset
Polygon offset applied during shadow map rendering for this split to reduce self-shadowing artifacts ...
Definition: DtPerChannelData.h:55
makVrv::DtDe & myDe
Definition: DtPerChannelData.h:169
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:58
osg::ref_ptr< osg::Uniform > myUseReverseZBuffer
Definition: DtPerChannelData.h:215
osg::ref_ptr< osg::Uniform > myInvNumSplitsInterpUniform
Definition: DtPerChannelData.h:217
unsigned int myCameraCount
Number of actual shadow cameras created and used for rendering.
Definition: DtPerChannelData.h:191
osg::ref_ptr< osg::Camera > myCamera
The OSG camera used to render this cascade's shadow map from the light's point of view...
Definition: DtPerChannelData.h:47
Definition: DtCurrentPassData.h:29
unsigned int myPcfFilterCount
Definition: DtPerChannelData.h:229
osg::Vec3d myLastCameraPosition
Definition: DtPerChannelData.h:208
osg::ref_ptr< osg::Uniform > myShadowAmbientFactorUniform
Definition: DtPerChannelData.h:216
void updateCascadeImportance(const DtShadowSettingsObject *shadowSettings)
Updates per-cascade importance scores and refresh flags for the current frame.
virtual ~DtPerChannelData()
DTOR.
osg::Vec3d myLastLargeShadowMapCameraPosition
Definition: DtPerChannelData.h:209
static const int theMaxNumberOfCascades
Definition: DtPerChannelData.h:167
void updateCascadeOrthoBoxVisualizer(int splitIndex, const osg::Matrix &lightViewMatrix, const osg::Vec3d &segmentMin, const osg::Vec3d &segmentMax, const osg::Vec3d &frustumMin, const osg::Vec3d &frustumMax, float zPadding)
Transforms the cascade's light-space bounding box back to world space and updates the debug ortho box...
osg::ref_ptr< osg::Geode > myVisualizers
Definition: DtPerChannelData.h:221
Implements cascaded shadow mapping (CSM) for the VRV rendering pipeline.
Definition: DtOsgShadowTechnique.h:87
unsigned int mySplitIndex
The logical index of this cascade within DtPerChannelData::myCascades (0 = nearest). Used to identify the split in shader uniforms and during selective refresh decisions.
Definition: DtPerChannelData.h:59
osg::ref_ptr< osg::MatrixTransform > myTarget
Scene graph node used to position this cascade's debug frustum visualization at the correct world-spa...
Definition: DtPerChannelData.h:94
osg::Matrix myTextureViewProjMatrix
The combined light-view and texture-projection matrix for this cascade. Transforms world-space positi...
Definition: DtPerChannelData.h:86
unsigned int myRefreshAge
Tracks how many frames have elapsed since this cascade was last refreshed. Used to implement the cach...
Definition: DtPerChannelData.h:64
osg::ref_ptr< osg::Uniform > myInverseShadowMapSizeUniform
Definition: DtPerChannelData.h:201
double myRefreshTimer
Definition: DtPerChannelData.h:203
osg::ref_ptr< osg::Camera > myOverlayDebugCamera
Definition: DtPerChannelData.h:222
bool myNotInitialized
Definition: DtPerChannelData.h:206
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
osg::ref_ptr< osg::Geometry > myOrthoBox
Geometry representing the orthographic bounding box of this cascade in light space. Used for debug visualization of the shadow camera's coverage area.
Definition: DtPerChannelData.h:98
osg::ref_ptr< osg::Uniform > myReceiveShadowsUniform
Definition: DtPerChannelData.h:199
double mySplitFarDistance
The far plane distance (in view space) for this cascade split. Defines the boundary between this spli...
Definition: DtPerChannelData.h:81
osg::ref_ptr< osg::MatrixTransform > myOrigin
Definition: DtPerChannelData.h:226
osg::ref_ptr< osg::StateSet > mySharedStateSet
Definition: DtPerChannelData.h:197
osg::ref_ptr< osg::Uniform > myAtlasTexOffsetAndScaleUniform
Uniform that provides the UV offset and scale needed to locate this cascade's shadow map tile within ...
Definition: DtPerChannelData.h:51
osg::ref_ptr< osg::Group > myVisualizersGroup
Definition: DtPerChannelData.h:220
osg::ref_ptr< osg::MatrixTransform > myFrustumCenterTarget
Definition: DtPerChannelData.h:193
osg::ref_ptr< osg::Uniform > myShadowTexGenUniform
Definition: DtPerChannelData.h:198
void initCascadeSplitVisualizers()
Creates and attaches the wireframe frustum and ortho box visualizers for each cascade split to the vi...
std::vector< DtCascadeData > myCascades
The logical cascade splits used for shadow rendering. Each entry represents one depth sub-frustum of ...
Definition: DtPerChannelData.h:182
osg::ref_ptr< DtOsgDebugFrustum > myCameraFrustum
Definition: DtPerChannelData.h:225