![]() |
VR-Forces Developer's Guide
|
DtShaderEffectManager injects custom shaders into the scenes, uses DtShaderEffect objects to add rendering effects to the ground. Currently has effects for rain and snow but more could be added for ice, sand, etc...

Classes | |
| struct | DtShaderEffectPerChannelData |
| class | DtTextureAddressOp |
Static Public Member Functions | |
| static DtShaderEffectManager & | instance (DtDe &de) |
| static const std::string & | theClassName () |
Public Attributes | |
| boost::signalslib::signal < void(bool enabled)> | signal_effectMapRainStateChanged |
| boost::signalslib::signal < void(bool enabled)> | signal_effectMapSnowStateChanged |
Protected Types | |
| typedef std::set < DtShaderEffect * > | ShaderEffectSet |
| typedef std::map < osg::observer_ptr < osg::Camera > , DtShaderEffectPerChannelData * > | PerChannelDataMap |
| typedef osg::ref_ptr < osg::CoordinateSystemNode > | CoordinateSystemNodeRef |
Protected Member Functions | |
| DtShaderEffectManager (DtDe &de) | |
| virtual void | updateImGui () |
| virtual void | updateStateAndUniforms () |
| virtual DtShaderEffectPerChannelData & | getOrCreatePerChannelData (osg::Camera *camera, bool createShaderEffects) |
| virtual void | flushInvalidChannels () |
| virtual void | initializeChannelEffects () |
| virtual DtTextureAddressOp * | createTextureAddressOp () |
| virtual void | updateEffectMapStates () |
|
protected |
|
protected |
|
protected |
|
virtual |
DTOR.
|
delete |
unimplemented private default constructor
|
delete |
Copy Constructor not implemented – Copy not allowed.
|
protected |
constructor
|
delete |
Assignment Operator not implemented – Copy not allowed.
|
virtual |
initializes or reinitializes the effects. Called by DtOsgRenderer at startup and whenever reload shaders is triggered reloads the shader changes if triggered from reload shaders but the texture is not reloaded off disk due to osgFileCache
|
virtual |
called by the arena per frame, per context to check if the texture has been assigned an address.
|
virtual |
called by DtOsgRenderer::update(), updates the per frame uniforms for the shader effects and sets up IMGui
|
virtual |
called by DtOsgChannel::update(), updates the per channel uniforms
|
virtual |
called by the DtOsgWeatherEffectsObject constructor to register itself when it is created.
|
virtual |
called when the signal_reloadShader is triggered. Marks the effect dirty so it can be recreated
|
virtual |
handle a wind speed changed signal
|
virtual |
handle a wind direction changed signal
|
virtual |
Use to get the local settings for the weather effects. Currently only has snow parameters in it.
|
virtual |
Use to get the local settings for the weather effects. Currently only has snow parameters in it.
|
virtual |
release the gl objects for this class
|
virtual |
are there any dirty effects for pass camera
|
virtual |
This is called to install shader effects to the given camera. Each shader effect will be initialized if enabled. Shader effects will generally modify the camera state set by adding virtual programs and required shader uniforms. This method is called explicitly by DtOsgChannel for the RTT camera.
|
virtual |
Used by effect maps to determine if the rain effect should be enabled or not.
|
virtual |
Used by effect maps to determine if the snow effect should be enabled or not.
|
static |
Get/create instance of sky object manager.
|
static |
Get the name this class is registered by.
|
protectedvirtual |
update the imgui widgets and readback any changes from them
|
protectedvirtual |
Allows effects to update the enabled/disabled state of the effects based on the current settings and weather conditions. update the uniforms that may need to be changed based on the imgui or regular gui inputs.
|
protectedvirtual |
gets or creates the data associated with a channel camera
| camera | The camera to create the data for |
| createShaderEffects | Shaders effects are created for the camera if true |
|
protectedvirtual |
check if the channel still is valid. If not then destroy the corrisponding shader effects
|
protectedvirtual |
Check if any of the effects are enabled and if they are dirty, then applies the effects to all known channel camera statesets.
|
protectedvirtual |
internal
|
protectedvirtual |
Check if the weather state has changed and signal the effect maps if so.
| boost::signalslib::signal<void(bool enabled)> makVrv::DtShaderEffectManager::signal_effectMapRainStateChanged |
Used by effect maps to determine a rain state change.
| boost::signalslib::signal<void(bool enabled)> makVrv::DtShaderEffectManager::signal_effectMapSnowStateChanged |
Used by effect maps to determine a snow state change.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |