Implements Ogre's Run-Time Shader system.
More...
#include <rendering/rendering.hh>
Inherits SingletonT< RTShaderSystem >.
Implements Ogre's Run-Time Shader system.
This class allows Gazebo to generate per-pixel shaders for every material at run-time.
◆ LightingModel
The type of lighting.
Enumerator |
---|
SSLM_PerVertexLighting | Per-Vertex lighting: best performance.
|
SSLM_PerPixelLighting | Per-Pixel lighting: best look.
|
SSLM_NormalMapLightingTangentSpace | Normal Map lighting: lighting calculations have been stored in a light map (texture) using tangent space.
|
SSLM_NormalMapLightingObjectSpace | Normal Map lighting: lighting calculations have been stored in a light map (texture) using object space.
|
◆ AddScene()
Add a scene manager.
- Parameters
-
[in] | _scene | The scene to process |
◆ ApplyShadows()
Apply shadows to a scene.
- Parameters
-
[in] | _scene | The scene to receive shadows. |
◆ AttachViewport()
static void AttachViewport |
( |
Ogre::Viewport * |
_viewport, |
|
|
ScenePtr |
_scene |
|
) |
| |
|
static |
Set a viewport to use shaders.
- Parameters
-
[in] | _viewport | The viewport to add. |
[in] | _scene | The scene that the viewport uses. |
◆ DetachViewport()
static void DetachViewport |
( |
Ogre::Viewport * |
_viewport, |
|
|
ScenePtr |
_scene |
|
) |
| |
|
static |
Set a viewport to not use shaders.
- Parameters
-
[in] | _viewport | The viewport to remove. |
[in] | _scene | The scene that the viewport uses. |
◆ Fini()
Finalize the shader system.
◆ GenerateShaders()
void GenerateShaders |
( |
const VisualPtr & |
_vis | ) |
|
Generate shaders for an entity.
- Parameters
-
[in] | _vis | The visual to generate shaders for. |
◆ GetPSSMShadowCameraSetup()
Ogre::PSSMShadowCameraSetup* GetPSSMShadowCameraSetup |
( |
| ) |
const |
Get the Ogre PSSM Shadows camera setup.
- Returns
- The Ogre PSSM Shadows camera setup.
◆ Init()
Init the run time shader system.
◆ Instance()
Get an instance of the singleton.
◆ RemoveScene() [1/2]
Remove a scene.
- Parameters
-
◆ RemoveScene() [2/2]
void RemoveScene |
( |
const std::string & |
_scene | ) |
|
Remove a scene.
- Parameters
-
[in] | Name | of the scene to remove. |
◆ RemoveShadows()
Remove shadows from a scene.
- Parameters
-
[in] | _scene | The scene to remove shadows from. |
◆ SetPerPixelLighting()
void SetPerPixelLighting |
( |
bool |
_set | ) |
|
Set the lighting model to per pixel or per vertex.
- Parameters
-
[in] | _set | True means to use per-pixel shaders. |
◆ SetShadowClipDist()
void SetShadowClipDist |
( |
const double |
_near, |
|
|
const double |
_far |
|
) |
| |
Set the shadow clip distances.
- Parameters
-
[in] | _near | Near clip distance. |
[in] | _far | Far clip distance. |
◆ SetShadowSplitLambda()
void SetShadowSplitLambda |
( |
const double |
_lambda | ) |
|
Set the PSSM lambda value for determining how linear or logarithmic choice of split points will be.
- Parameters
-
[in] | _lambda | PSSM split point lambda. |
◆ SetShadowSplitPadding()
void SetShadowSplitPadding |
( |
const double |
_padding | ) |
|
Set the overlap between PSSM shadow maps.
- Parameters
-
[in] | _padding | PSSM split point overlap. |
◆ SetShadowTextureSize()
bool SetShadowTextureSize |
( |
const unsigned int |
_size | ) |
|
Set the shadow texture size.
- Parameters
-
[in] | _size | Size of shadow texture to set to. This must be a power of 2. The default size is 1024. |
- Returns
- True if size is set successfully, false otherwise.
◆ ShadowFarClip()
double ShadowFarClip |
( |
| ) |
const |
Get the shadow far clip distance.
- Returns
- Far clip distance.
◆ ShadowNearClip()
double ShadowNearClip |
( |
| ) |
const |
Get the shadow near clip distance.
- Returns
- Near clip distance.
◆ ShadowSplitLambda()
double ShadowSplitLambda |
( |
| ) |
const |
Get the PSSM split point lambda value.
- Returns
- PSSM split point lambda.
◆ ShadowSplitPadding()
double ShadowSplitPadding |
( |
| ) |
const |
Get the PSSM split point overlap.
- Returns
- PSSM split point overlap.
◆ ShadowTextureSize()
unsigned int ShadowTextureSize |
( |
| ) |
const |
Get the shadow texture size.
- Returns
- Size of the shadow texture. The default size is 1024.
◆ Update()
Update the RT shaders. This should not be called frequently.
◆ UpdateShaders()
Queue a call to update the shaders.
The documentation for this class was generated from the following file: