Go to the documentation of this file.
18 #ifndef _GAZEBO_RTSHADERSYSTEM_HH_
19 #define _GAZEBO_RTSHADERSYSTEM_HH_
25 #include "gazebo/gazebo_config.h"
35 class RTShaderSystemPrivate;
61 SSLM_NormalMapLightingObjectSpace
78 public:
void AddScene(
ScenePtr _scene);
82 public:
void RemoveScene(
ScenePtr _scene);
86 public:
void RemoveScene(
const std::string &_scene);
89 public:
void UpdateShaders();
94 public:
static void AttachViewport(Ogre::Viewport *_viewport,
100 public:
static void DetachViewport(Ogre::Viewport *_viewport,
105 public:
void SetPerPixelLighting(
bool _set);
109 public:
void GenerateShaders(
const VisualPtr &_vis);
113 public:
void ApplyShadows(
ScenePtr _scene);
117 public:
void RemoveShadows(
ScenePtr _scene);
121 public: Ogre::PSSMShadowCameraSetup *GetPSSMShadowCameraSetup()
const;
124 public:
void Update();
130 public:
bool SetShadowTextureSize(
const unsigned int _size);
134 public:
unsigned int ShadowTextureSize()
const;
139 public:
void SetShadowClipDist(
const double _near,
const double _far);
143 public:
double ShadowNearClip()
const;
147 public:
double ShadowFarClip()
const;
152 public:
void SetShadowSplitLambda(
const double _lambda);
156 public:
double ShadowSplitLambda()
const;
160 public:
void SetShadowSplitPadding(
const double _padding);
164 public:
double ShadowSplitPadding()
const;
170 private:
bool GetPaths(std::string &_coreLibsPath,
171 std::string &_cachePath);
175 private:
void UpdateShaders(
VisualPtr _vis);
178 private:
void ReapplyShadows();
185 private: RTShaderSystemPrivate *dataPtr;
void SetPerPixelLighting(bool _set)
Set the lighting model to per pixel or per vertex.
Per-Pixel lighting: best look.
Definition: RTShaderSystem.hh:55
void UpdateShaders()
Queue a call to update the shaders.
Forward declarations for the common classes.
Definition: Animation.hh:26
Singleton template class.
Definition: SingletonT.hh:33
void Init()
Init the run time shader system.
unsigned int ShadowTextureSize() const
Get the shadow texture size.
static void AttachViewport(Ogre::Viewport *_viewport, ScenePtr _scene)
Set a viewport to use shaders.
Per-Vertex lighting: best performance.
Definition: RTShaderSystem.hh:53
LightingModel
The type of lighting.
Definition: RTShaderSystem.hh:50
void ApplyShadows(ScenePtr _scene)
Apply shadows to a scene.
void GenerateShaders(const VisualPtr &_vis)
Generate shaders for an entity.
void SetShadowClipDist(const double _near, const double _far)
Set the shadow clip distances.
double ShadowSplitPadding() const
Get the PSSM split point overlap.
double ShadowFarClip() const
Get the shadow far clip distance.
Implements Ogre's Run-Time Shader system.
Definition: RTShaderSystem.hh:45
Normal Map lighting: lighting calculations have been stored in a light map (texture) using object spa...
Definition: RTShaderSystem.hh:61
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:82
double ShadowNearClip() const
Get the shadow near clip distance.
double ShadowSplitLambda() const
Get the PSSM split point lambda value.
void Fini()
Finalize the shader system.
static void DetachViewport(Ogre::Viewport *_viewport, ScenePtr _scene)
Set a viewport to not use shaders.
void SetShadowSplitPadding(const double _padding)
Set the overlap between PSSM shadow maps.
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
void Update()
Update the RT shaders. This should not be called frequently.
void RemoveScene(ScenePtr _scene)
Remove a scene.
bool SetShadowTextureSize(const unsigned int _size)
Set the shadow texture size.
void SetShadowSplitLambda(const double _lambda)
Set the PSSM lambda value for determining how linear or logarithmic choice of split points will be.
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
void RemoveShadows(ScenePtr _scene)
Remove shadows from a scene.
Ogre::PSSMShadowCameraSetup * GetPSSMShadowCameraSetup() const
Get the Ogre PSSM Shadows camera setup.
void AddScene(ScenePtr _scene)
Add a scene manager.
Normal Map lighting: lighting calculations have been stored in a light map (texture) using tangent sp...
Definition: RTShaderSystem.hh:58