@@ -2524,7 +2524,7 @@ namespace Ogre {
2524
2524
void destroyQuery (SceneQuery* query);
2525
2525
// / @}
2526
2526
2527
- // / @name Shadow Setup
2527
+ // / @name Generic Shadows Config
2528
2528
// / @{
2529
2529
/* * Sets the general shadow technique to be used in this scene.
2530
2530
@@ -2563,11 +2563,6 @@ namespace Ogre {
2563
2563
/* * Gets the current shadow technique. */
2564
2564
ShadowTechnique getShadowTechnique (void ) const { return mShadowTechnique ; }
2565
2565
2566
- /* * Enables / disables the rendering of debug information for shadows. */
2567
- void setShowDebugShadows (bool debug) { mStencilShadowRenderer .mDebugShadows = debug; }
2568
- /* * Are debug shadows shown? */
2569
- bool getShowDebugShadows (void ) const { return mStencilShadowRenderer .mDebugShadows ; }
2570
-
2571
2566
/* * Set the colour used to modulate areas in shadow.
2572
2567
This is only applicable for shadow techniques which involve
2573
2568
darkening the area in shadow, as opposed to masking out the light.
@@ -2597,30 +2592,34 @@ namespace Ogre {
2597
2592
/* * Gets the distance a shadow volume is extruded for a directional light.
2598
2593
*/
2599
2594
Real getShadowDirectionalLightExtrusionDistance (void ) const ;
2600
- /* * Sets the default maximum distance away from the camera that shadows
2601
- will be visible. You have to call this function before you create lights
2602
- or the default distance of zero will be used.
2603
2595
2604
- Shadow techniques can be expensive, therefore it is a good idea
2605
- to limit them to being rendered close to the camera if possible,
2606
- and to skip the expense of rendering shadows for distance objects.
2607
- This method allows you to set the distance at which shadows will no
2608
- longer be rendered.
2609
- @note
2610
- Each shadow technique can interpret this subtely differently.
2611
- For example, one technique may use this to eliminate casters,
2612
- another might use it to attenuate the shadows themselves.
2613
- You should tweak this value to suit your chosen shadow technique
2614
- and scene setup.
2615
- */
2616
- void setShadowFarDistance (Real distance);
2617
- /* * Gets the default maximum distance away from the camera that shadows
2618
- will be visible.
2619
- */
2620
- Real getShadowFarDistance (void ) const
2621
- { return mTextureShadowRenderer .mDefaultShadowFarDist ; }
2622
- Real getShadowFarDistanceSquared (void ) const
2623
- { return mTextureShadowRenderer .mDefaultShadowFarDistSquared ; }
2596
+ /* * Is there a stencil shadow based shadowing technique in use? */
2597
+ bool isShadowTechniqueStencilBased (void ) const
2598
+ { return (mShadowTechnique & SHADOWDETAILTYPE_STENCIL) != 0 ; }
2599
+ /* * Is there a texture shadow based shadowing technique in use? */
2600
+ bool isShadowTechniqueTextureBased (void ) const
2601
+ { return (mShadowTechnique & SHADOWDETAILTYPE_TEXTURE) != 0 ; }
2602
+ /* * Is there a modulative shadowing technique in use? */
2603
+ bool isShadowTechniqueModulative (void ) const
2604
+ { return (mShadowTechnique & SHADOWDETAILTYPE_MODULATIVE) != 0 ; }
2605
+ /* * Is there an additive shadowing technique in use? */
2606
+ bool isShadowTechniqueAdditive (void ) const
2607
+ { return (mShadowTechnique & SHADOWDETAILTYPE_ADDITIVE) != 0 ; }
2608
+ /* * Is the shadow technique integrated into primary materials? */
2609
+ bool isShadowTechniqueIntegrated (void ) const
2610
+ { return (mShadowTechnique & SHADOWDETAILTYPE_INTEGRATED) != 0 ; }
2611
+ /* * Is there any shadowing technique in use? */
2612
+ bool isShadowTechniqueInUse (void ) const
2613
+ { return mShadowTechnique != SHADOWTYPE_NONE; }
2614
+ // / @}
2615
+
2616
+ // / @name Stencil Shadows Config
2617
+ // / @{
2618
+
2619
+ /* * Enables / disables the rendering of debug information for shadows. */
2620
+ void setShowDebugShadows (bool debug) { mStencilShadowRenderer .mDebugShadows = debug; }
2621
+ /* * Are debug shadows shown? */
2622
+ bool getShowDebugShadows (void ) const { return mStencilShadowRenderer .mDebugShadows ; }
2624
2623
2625
2624
/* * Sets the maximum size of the index buffer used to render shadow
2626
2625
primitives.
@@ -2650,11 +2649,6 @@ namespace Ogre {
2650
2649
void setShadowIndexBufferSize (size_t size);
2651
2650
// / Get the size of the shadow index buffer
2652
2651
size_t getShadowIndexBufferSize (void ) const { return mStencilShadowRenderer .mShadowIndexBufferSize ; }
2653
- /* * Get the shadow camera setup in use for all lights which don't have
2654
- their own shadow camera setup.
2655
- @see ShadowCameraSetup
2656
- */
2657
- const ShadowCameraSetupPtr& getShadowCameraSetup () const ;
2658
2652
2659
2653
/* * Sets whether we should use an infinite camera far plane
2660
2654
when rendering stencil shadows.
@@ -2695,24 +2689,6 @@ namespace Ogre {
2695
2689
void setShadowUseInfiniteFarPlane (bool enable) {
2696
2690
mStencilShadowRenderer .mShadowUseInfiniteFarPlane = enable; }
2697
2691
2698
- /* * Is there a stencil shadow based shadowing technique in use? */
2699
- bool isShadowTechniqueStencilBased (void ) const
2700
- { return (mShadowTechnique & SHADOWDETAILTYPE_STENCIL) != 0 ; }
2701
- /* * Is there a texture shadow based shadowing technique in use? */
2702
- bool isShadowTechniqueTextureBased (void ) const
2703
- { return (mShadowTechnique & SHADOWDETAILTYPE_TEXTURE) != 0 ; }
2704
- /* * Is there a modulative shadowing technique in use? */
2705
- bool isShadowTechniqueModulative (void ) const
2706
- { return (mShadowTechnique & SHADOWDETAILTYPE_MODULATIVE) != 0 ; }
2707
- /* * Is there an additive shadowing technique in use? */
2708
- bool isShadowTechniqueAdditive (void ) const
2709
- { return (mShadowTechnique & SHADOWDETAILTYPE_ADDITIVE) != 0 ; }
2710
- /* * Is the shadow technique integrated into primary materials? */
2711
- bool isShadowTechniqueIntegrated (void ) const
2712
- { return (mShadowTechnique & SHADOWDETAILTYPE_INTEGRATED) != 0 ; }
2713
- /* * Is there any shadowing technique in use? */
2714
- bool isShadowTechniqueInUse (void ) const
2715
- { return mShadowTechnique != SHADOWTYPE_NONE; }
2716
2692
/* * Sets whether when using a built-in additive shadow mode, user clip
2717
2693
planes should be used to restrict light rendering.
2718
2694
*/
@@ -2723,9 +2699,34 @@ namespace Ogre {
2723
2699
bool getShadowUseLightClipPlanes () const { return mStencilShadowRenderer .mShadowAdditiveLightClip ; }
2724
2700
// / @}
2725
2701
2726
- // / @name Shadow Texture Config
2702
+ // / @name Texture Shadows Config
2727
2703
// / @{
2728
2704
2705
+ /* * Sets the default maximum distance away from the camera that shadows
2706
+ will be visible. You have to call this function before you create lights
2707
+ or the default distance of zero will be used.
2708
+
2709
+ Shadow techniques can be expensive, therefore it is a good idea
2710
+ to limit them to being rendered close to the camera if possible,
2711
+ and to skip the expense of rendering shadows for distance objects.
2712
+ This method allows you to set the distance at which shadows will no
2713
+ longer be rendered.
2714
+ @note
2715
+ Each shadow technique can interpret this subtely differently.
2716
+ For example, one technique may use this to eliminate casters,
2717
+ another might use it to attenuate the shadows themselves.
2718
+ You should tweak this value to suit your chosen shadow technique
2719
+ and scene setup.
2720
+ */
2721
+ void setShadowFarDistance (Real distance);
2722
+ /* * Gets the default maximum distance away from the camera that shadows
2723
+ will be visible.
2724
+ */
2725
+ Real getShadowFarDistance (void ) const
2726
+ { return mTextureShadowRenderer .mDefaultShadowFarDist ; }
2727
+ Real getShadowFarDistanceSquared (void ) const
2728
+ { return mTextureShadowRenderer .mDefaultShadowFarDistSquared ; }
2729
+
2729
2730
// / Method for preparing shadow textures ready for use in a regular render
2730
2731
// / Do not call manually unless before frame start or rendering is paused
2731
2732
// / If lightList is not supplied, will render all lights in frustum
@@ -2967,6 +2968,12 @@ namespace Ogre {
2967
2968
@see ShadowCameraSetup
2968
2969
*/
2969
2970
void setShadowCameraSetup (const ShadowCameraSetupPtr& shadowSetup);
2971
+
2972
+ /* * Get the shadow camera setup in use for all lights which don't have
2973
+ their own shadow camera setup.
2974
+ @see ShadowCameraSetup
2975
+ */
2976
+ const ShadowCameraSetupPtr& getShadowCameraSetup () const ;
2970
2977
// / @}
2971
2978
2972
2979
/* * Sets the active compositor chain of the current scene being rendered.
0 commit comments