12 #ifndef VTOSG_LIGHTSPACEPERSPECTIVESHADOWTECHNIQUEH
13 #define VTOSG_LIGHTSPACEPERSPECTIVESHADOWTECHNIQUEH
15 #include <osg/Version>
16 #if (OSG_VERSION_MAJOR==2 && OSG_VERSION_MINOR>6) || OSG_VERSION_MAJOR>2
18 #include <osgShadow/LightSpacePerspectiveShadowMap>
21 #define VTP_LISPSM_DRAW_BOUNDS
34 #if defined(VTP_LISPSM_DRAW_BOUNDS)
35 class CLightSpacePerspectiveShadowTechnique :
public osgShadow::LightSpacePerspectiveShadowMapDB
36 #elif defined(VTP_LISPSM_CULL_BOUNDS)
37 class CLightSpacePerspectiveShadowTechnique :
public osgShadow::LightSpacePerspectiveShadowMapCB
38 #elif defined(VTP_LISPSM_VIEW_BOUNDS)
39 class CLightSpacePerspectiveShadowTechnique :
public osgShadow::LightSpacePerspectiveShadowMapVB
44 typedef CLightSpacePerspectiveShadowTechnique ThisClass;
46 #if defined(VTP_LISPSM_DRAW_BOUNDS)
47 typedef osgShadow::LightSpacePerspectiveShadowMapDB BaseClass;
48 #elif defined(VTP_LISPSM_CULL_BOUNDS)
49 typedef osgShadow::LightSpacePerspectiveShadowMapCB BaseClass;
50 #elif defined(VTP_LISPSM_VIEW_BOUNDS)
51 typedef osgShadow::LightSpacePerspectiveShadowMapVB BaseClass;
54 CLightSpacePerspectiveShadowTechnique();
56 void InitJittering(osg::StateSet *pStateSet);
57 uint m_JitterTextureUnit;
58 void AddAdditionalTerrainTextureUnit(
const uint Unit,
const uint Mode);
59 void RemoveAdditionalTerrainTextureUnit(
const uint Unit);
60 void RemoveAllAdditionalTerrainTextureUnits();
63 std::string GenerateFragmentShaderSource();
65 struct ViewData:
public BaseClass::ViewData
67 virtual void init( ThisClass * st, osgUtil::CullVisitor * cv );
69 std::map<uint, uint> m_AdditionalTerrainTextureUnits;
74 META_ViewDependentShadowTechniqueData( ThisClass, ThisClass::ViewData )
79 #endif // VTOSG_LIGHTSPACEPERSPECTIVESHADOWTECHNIQUEH