![]() |
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 () |
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 | updateUniforms () |
| virtual DtShaderEffectPerChannelData & | getOrCreatePerChannelData (osg::Camera *camera, bool createShaderEffects) |
| virtual void | flushInvalidChannels () |
| virtual void | initializeChannelEffects () |
| virtual DtTextureAddressOp * | createTextureAddressOp () |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | myConnections |
| DtOsgRenderer & | myOsgRenderer |
| PerChannelDataMap | myPerChannelDataMap |
| CoordinateSystemNodeRef | myCoordSystemNode |
| DtOsgWeatherEffectsObject * | myWeatherEffectsObject |
| DtTextureAddressOp * | myTextureAddressOp = nullptr |
| float | myWindSpeed |
| float | myWindDirection |
|
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.
|
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 |
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
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |