VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPerChannelData.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <osgEarth/VirtualProgram>
16 
17 #include <osg/Referenced>
18 #include <osg/Camera>
19 #include <osg/PolygonOffset>
20 #include <osg/Geode>
21 
22 namespace makVrv
23 {
24  class DtDe;
25  class DtOsgChannel;
26  class DtOsgDebugFrustum;
27 
29  {
30  float myImportance;
31  unsigned int myCascadeIndex;
32  };
33 
35  {
37 
40  unsigned int mySplitIndex;
41 
42  unsigned int myRefreshAge;
43  bool myRefresh;
44  };
45 
46  // per window info
47  static const int MAX_NUM_CASCADES = 6;
48 
49  struct DtPerChannelData : public osg::Referenced
50  {
53 
55  std::vector<DtCascadeImportanceData> myImportances;
56  std::vector<DtCsmSplitData> myCsmSplits;
58 
62 
63  // geometry shader data, unused
67 
68  // cloud shadow code
75  osg::Matrix myCloudShadowTexGenMatrix[2];
78 
79 
80  // atlas data
81  unsigned int myAtlasWidth;
82  unsigned int myAtlasHeight;
83  unsigned int myAtlasWidthNumSplits;
84  unsigned int myAtlasHeightNumSplits;
85 
93 
97 
98  // sdsm stuff
100  std::vector<osg::ref_ptr<osg::Camera> > mySDSMReduceCamera;
102 
106 
107  // SDSM
113 
114  std::vector<osg::ref_ptr<osg::Camera> > mySDSMPartitionReduceCamera;
116 
117  // debugging stuff
124 
131  osg::Matrix myGeometryShaderMatrix[MAX_NUM_CASCADES]; // unused
132 
133  // softshadow prototype
136 
137  //VSM camera array
138  std::vector<osg::ref_ptr<osg::Camera> > myDepthCameras;
139  std::vector<osg::ref_ptr<osg::Camera> > myXBlurCameras;
140  std::vector<osg::ref_ptr<osg::Camera> > myYBlurCameras;
141 
142  double mySDSMTime;
143  unsigned int myShadowMapSize;
144  unsigned int myPcfFilterCount;
146 
147  protected:
149  virtual ~DtPerChannelData();
150  void removeVisualizers();
151 
152  friend class DtOsgShadowTechnique;
153  };
154 
155 }
156 
157 
osg::ref_ptr< osg::Uniform > mySplitDistancesWorldUniform
Definition: DtPerChannelData.h:95
double myLastSimTime
Definition: DtPerChannelData.h:145
osg::ref_ptr< osg::Uniform > myMaximumDepthUniform
Definition: DtPerChannelData.h:112
float myLastFarDistance
Definition: DtPerChannelData.h:92
std::vector< osg::ref_ptr< osg::Camera > > mySDSMReduceCamera
Definition: DtPerChannelData.h:100
osg::ref_ptr< osg::Camera > myCloudShadowCamera
Definition: DtPerChannelData.h:76
std::vector< DtCsmSplitData > myCsmSplits
Definition: DtPerChannelData.h:56
osg::ref_ptr< osg::Uniform > myGeometryTransformMatrixUniform
Definition: DtPerChannelData.h:64
osg::ref_ptr< osg::Uniform > mySplitDistancesUniform
Definition: DtPerChannelData.h:94
osg::ref_ptr< osg::Camera > myOverlayDebugCloud1Camera
Definition: DtPerChannelData.h:122
double myLastCloudUpdateTime
Definition: DtPerChannelData.h:77
osg::ref_ptr< osg::Uniform > myShadowAmbientFactorUniform
Definition: DtPerChannelData.h:104
osg::ref_ptr< DtOsgDebugFrustum > myFrustum[MAX_NUM_CASCADES]
Definition: DtPerChannelData.h:126
Contains makVrv::DtSdsmDrawCallback class.
float myImportance
Definition: DtPerChannelData.h:30
osg::Matrix myGeometryShaderMatrix[MAX_NUM_CASCADES]
Definition: DtPerChannelData.h:131
osg::ref_ptr< osg::Camera > mySDSMPartitionCamera
Definition: DtPerChannelData.h:110
osg::ref_ptr< osg::Uniform > myInvNumSplitsInterpUniform
Definition: DtPerChannelData.h:105
osg::ref_ptr< osg::Camera > mySDSMCamera
Definition: DtPerChannelData.h:99
osg::Vec3d myLastCameraPosition
Definition: DtPerChannelData.h:89
bool myNotInitialized
Definition: DtPerChannelData.h:87
static const int MAX_NUM_CASCADES
Definition: DtPerChannelData.h:47
osg::ref_ptr< osg::Geode > myVisualizers
Definition: DtPerChannelData.h:119
osg::ref_ptr< osg::PolygonOffset > myPolygonOffset
Definition: DtPerChannelData.h:39
Contains the DtOsgTextureApplyAttribute class.
std::vector< DtCascadeImportanceData > myImportances
Definition: DtPerChannelData.h:55
osg::Matrix myLightViewMatrix[MAX_NUM_CASCADES]
Definition: DtPerChannelData.h:135
unsigned int myPcfFilterCount
Definition: DtPerChannelData.h:144
unsigned int myAtlasWidthNumSplits
Definition: DtPerChannelData.h:83
Definition: DtPerChannelData.h:34
osg::ref_ptr< osg::Uniform > myUseReverseZBuffer
Definition: DtPerChannelData.h:103
unsigned int myAtlasHeight
Definition: DtPerChannelData.h:82
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:77
makVrv::DtOsgChannel & myChannel
Definition: DtPerChannelData.h:88
bool myRefresh
Definition: DtPerChannelData.h:43
osg::ref_ptr< osg::Uniform > myLightViewMatrixUniform
Definition: DtPerChannelData.h:134
osg::Vec3d myLastLargeShadowMapCameraPosition
Definition: DtPerChannelData.h:90
Definition: DtPerChannelData.h:49
osg::ref_ptr< osg::Camera > myOverlayDebugCloud2Camera
Definition: DtPerChannelData.h:123
osg::ref_ptr< osg::Camera > mySDSMLinearizeDepthCamera
Definition: DtPerChannelData.h:108
osg::ref_ptr< osg::Uniform > myCloudShadowTexGenUniform
Definition: DtPerChannelData.h:72
std::vector< osg::ref_ptr< osg::Camera > > myXBlurCameras
Definition: DtPerChannelData.h:139
Definition: DtPerChannelData.h:28
osg::ref_ptr< osg::Uniform > myReceiveShadowsUniform
Definition: DtPerChannelData.h:61
double mySDSMTime
Definition: DtPerChannelData.h:142
int myCurrentCloudShadowMapTarget
Definition: DtPerChannelData.h:71
osg::ref_ptr< osgEarth::VirtualProgram > myVirtualProgram
Definition: DtPerChannelData.h:57
osg::ref_ptr< osg::Uniform > myFarNearSumDiffProdx2Uniform
Definition: DtPerChannelData.h:101
osg::ref_ptr< osg::Uniform > myCloudShadowLerpUniform
Definition: DtPerChannelData.h:73
The DtOsgShadowTechnique class implements a robust shadow mapping system.
Definition: DtOsgShadowTechnique.h:59
double myRefreshTimer
Definition: DtPerChannelData.h:69
osg::ref_ptr< osg::Uniform > myShadowTexGenUniform
Definition: DtPerChannelData.h:60
makVrv::DtDe & myDe
Definition: DtPerChannelData.h:54
osg::ref_ptr< DtOsgDebugFrustum > myCameraFrustum
Definition: DtPerChannelData.h:125
osg::ref_ptr< osg::Camera > myCamera
Definition: DtPerChannelData.h:36
unsigned int myShadowMapSize
Definition: DtPerChannelData.h:143
osg::ref_ptr< osg::Uniform > myInverseShadowMapSizeUniform
Definition: DtPerChannelData.h:66
virtual ~DtPerChannelData()
CTOR.
bool myForceCloudUpdate
Definition: DtPerChannelData.h:70
osg::Matrix myCloudShadowTexGenMatrix[2]
Definition: DtPerChannelData.h:75
unsigned int mySplitIndex
Definition: DtPerChannelData.h:40
osg::ref_ptr< osg::MatrixTransform > myTargets[MAX_NUM_CASCADES+1]
Definition: DtPerChannelData.h:127
osg::ref_ptr< osg::Geometry > myOrthoBox[MAX_NUM_CASCADES]
Definition: DtPerChannelData.h:129
osg::ref_ptr< osg::Camera > myOverlayDebugFarCamera
Definition: DtPerChannelData.h:121
osg::ref_ptr< SdsmDrawCallback > mySDSMDrawCallback
Definition: DtPerChannelData.h:115
osg::ref_ptr< osg::Camera > mySDSMCopyReduceDepthCamera
Definition: DtPerChannelData.h:109
osg::ref_ptr< osg::Uniform > myNumCascadesUniform
Definition: DtPerChannelData.h:65
double myCurrentSimTimeScale
Definition: DtPerChannelData.h:91
unsigned int myCascadeIndex
Definition: DtPerChannelData.h:31
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
unsigned int myRefreshAge
Definition: DtPerChannelData.h:42
unsigned int myAtlasWidth
Definition: DtPerChannelData.h:81
unsigned int myAtlasHeightNumSplits
Definition: DtPerChannelData.h:84
osg::ref_ptr< osg::StateSet > mySharedStateSet
Definition: DtPerChannelData.h:59
osg::ref_ptr< osg::Uniform > myAtlasTexOffsetAndScaleUniform
Definition: DtPerChannelData.h:38
osg::Matrix myTextureViewProjMatrix[MAX_NUM_CASCADES]
Definition: DtPerChannelData.h:130
osg::ref_ptr< osg::Group > myVisualizersGroup
Definition: DtPerChannelData.h:118
bool myJustInitialized
Definition: DtPerChannelData.h:86
std::vector< osg::ref_ptr< osg::Camera > > myYBlurCameras
Definition: DtPerChannelData.h:140
DtPerChannelData(makVrv::DtDe &de, makVrv::DtOsgChannel &channel)
CTOR.
osg::ref_ptr< osg::MatrixTransform > myOrigin
Definition: DtPerChannelData.h:128
osg::ref_ptr< TextureApplyAttribute > myCloudShadowTextures
Definition: DtPerChannelData.h:74
std::vector< osg::ref_ptr< osg::Camera > > mySDSMPartitionReduceCamera
Definition: DtPerChannelData.h:114
osg::ref_ptr< osg::Uniform > myMaximumViewDistanceUniform
Definition: DtPerChannelData.h:111
double mySplitFarDistances[MAX_NUM_CASCADES]
Definition: DtPerChannelData.h:96
std::vector< osg::ref_ptr< osg::Camera > > myDepthCameras
Definition: DtPerChannelData.h:138
osg::ref_ptr< osg::Camera > myOverlayDebugCamera
Definition: DtPerChannelData.h:120

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)