![]() |
VR-Forces 4.8 Class Documentation
|
This class provides the OSG-specific implementation of a post processor. More...

Public Member Functions | |
| DtPostProcessor (const std::string &postProcessType, bool handles2D) | |
| CTOR. More... | |
| virtual | ~DtPostProcessor () |
| DTOR. More... | |
| virtual void | setFragmentShaderSource (const char *source) |
| Sets fragment shader source for this post-processor. More... | |
| virtual void | setVertexShaderSource (const char *source) |
| Sets vertex shader source for this post-processor. More... | |
| virtual void | setFragmentShaderFile (const std::string &fileName) |
| Sets fragment shader file for this post-processor. More... | |
| virtual void | setVertexShaderFile (const std::string &fileName) |
| Sets vertex shader file for this post-processor. More... | |
| virtual void | setInputTexture (const DtChannel *channel, osg::Texture *texture) |
| Sets the image that is postprocessed; this may be the 3D scene rendered to a texture, or the output texture of a chained post processor. More... | |
| virtual bool | update (DtChannel *channel)=0 |
| Called once per frame, per channel. More... | |
| virtual osg::Texture * | outputTexture () |
| Gets the output texture of this post processor, for use in chaining processors together. More... | |
| virtual void | setIsFinalEffect (const DtChannel *channel, bool final) |
| Called by the DtPostProcessManager to indicate if this is the last post processor in the chain, and should render to the framebuffer. More... | |
| virtual osg::Camera * | cameraForChannel (const DtChannel *channel) |
| Gets the Camera node associated with this effect and channel. More... | |
| virtual void | releaseGLObjects () |
| virtual bool | hasEffect (const std::string &effect) |
| Does this post processor support this effect? More... | |
| virtual bool | effectEnabled (const std::string &effect) |
| Is this effect (post processor sub-component) enabled? More... | |
| virtual bool | anyEffectEnabled () |
| Are any effects enabled? More... | |
| virtual std::list< std::string > | supportedEffects () |
| Get a list of supported effects for this post processor. More... | |
| virtual bool | handles2D () const |
| Retrieves whether this post processor should be used in 2D orthographic views, as specified in its constructor. More... | |
| virtual const std::string & | type () const |
| Gets the type of the post processor. More... | |
| virtual bool | postProcessorEnabled () const |
| Is this post processor enabled? More... | |
| virtual bool | enableEffect (const std::string &effect) |
| Enable a particular post processing technique For example, "wateroncamera" has techniques "rainsplash", "oceanspray", and "wavesplash". More... | |
| virtual bool | disableEffect (const std::string &effect) |
| virtual void | enablePostProcessor () |
| Enable or disable the post processor. More... | |
| virtual void | disablePostProcessor () |
Protected Types | |
| typedef boost::unordered_map < std::string, bool > | EffectMap |
| typedef std::map< const DtChannel *, osg::ref_ptr < osg::Camera > > | CameraMap |
| typedef osg::ref_ptr < DtPostProcessorCullVistorCallback > | CallbackRefPtr |
| typedef std::map< const DtChannel *, CallbackRefPtr > | CallbackMap |
Protected Member Functions | |
| virtual bool | effectItrEnabled (EffectMap::iterator &effect) |
| virtual void | initialize () |
| virtual void | addEffect (std::string effect) |
| When constructing a post processor, add the names of the sub-components (effects) that can be enabled and disabled. More... | |
| virtual void | setEnablePostProcessor (bool enabled) |
| Set the post processor enabled state (true = enabled) More... | |
Protected Attributes | |
| osg::ref_ptr< osg::Texture > | myOutputTexture |
| osg::ref_ptr< osg::Texture > | myInputTexture |
| osg::ref_ptr< osg::Program > | myProgram |
| osg::ref_ptr< osg::Shader > | myFragmentShader |
| osg::ref_ptr< osg::Shader > | myVertexShader |
| osg::ref_ptr< osg::Geode > | myQuad |
| CameraMap | myCameraMap |
| bool | myHandles2DFlag |
| bool | myEnabledFlag |
| std::string | myType |
| EffectMap | myEffects |
| CallbackMap | myCullCallbackMap |
Friends | |
| class | DtPostProcessManager |
This class provides the OSG-specific implementation of a post processor.
A post processor has a type (ex. "wateronscreen") and a list of effects which are components that can be turned on or off (ex. "oceanspray", "rainsplash"). A post processor should register at least one effect. The post processor order is created in the DtPostProcessorFactory On channel creation, the DtPostProcessManagerInterface will create an instance of each post processor added to the factory's post processor list.
|
protected |
|
protected |
|
protected |
|
protected |
| makVrv::DtPostProcessor::DtPostProcessor | ( | const std::string & | postProcessType, |
| bool | handles2D | ||
| ) |
CTOR.
| handles2D | Whether this post processor should be used in 2D orthographic views. |
|
virtual |
DTOR.
|
virtual |
Sets fragment shader source for this post-processor.
The following uniforms will be automatically set for you: sampler2D inputImage; float aspectRatio; // (width over height) float fovy; // Vertical field of view (radians)
|
virtual |
Sets vertex shader source for this post-processor.
The following uniforms will be automatically set for you: sampler2D inputImage; float aspectRatio; // (width over height) float fovy; // Vertical field of view (radians)
|
virtual |
Sets fragment shader file for this post-processor.
The following uniforms will be automatically set for you: sampler2D inputImage; float aspectRatio; // (width over height) float fovy; // Vertical field of view (radians)
|
virtual |
Sets vertex shader file for this post-processor.
The following uniforms will be automatically set for you: sampler2D inputImage; float aspectRatio; // (width over height) float fovy; // Vertical field of view (radians)
|
virtual |
Sets the image that is postprocessed; this may be the 3D scene rendered to a texture, or the output texture of a chained post processor.
Managed by the DtPostProcessManager, you shouldn't need to call this yourself.
Reimplemented in makVrv::DtHdrPostProcessor.
Called once per frame, per channel.
Implemented in makVrv::DtSenSimPostProcessor, makVrv::DtWaterOnScreen, makVrv::DtHdrPostProcessor, makVrv::DtDepthOfField, makVrv::DtVirtualRealityPostProcessor, makVrv::DtVideoStreamPostProcessor, makVrv::DtVolumetricLighting, and makVrv::DtReverseDepthBuffer.
|
virtual |
Gets the output texture of this post processor, for use in chaining processors together.
It may be null if this is the last post processor, rendering directly to the frame buffer.
Reimplemented in makVrv::DtVolumetricLighting.
|
virtual |
Called by the DtPostProcessManager to indicate if this is the last post processor in the chain, and should render to the framebuffer.
|
virtual |
Gets the Camera node associated with this effect and channel.
Use their statesets to set shader uniforms for your effect.
|
virtual |
|
virtual |
Does this post processor support this effect?
|
virtual |
Is this effect (post processor sub-component) enabled?
|
virtual |
Are any effects enabled?
|
virtual |
Enable a particular post processing technique For example, "wateroncamera" has techniques "rainsplash", "oceanspray", and "wavesplash".
|
virtual |
|
virtual |
Get a list of supported effects for this post processor.
|
virtual |
Retrieves whether this post processor should be used in 2D orthographic views, as specified in its constructor.
|
virtual |
Gets the type of the post processor.
|
virtual |
Enable or disable the post processor.
|
virtual |
|
virtual |
Is this post processor enabled?
Reimplemented in makVrv::DtHdrPostProcessor, and makVrv::DtVolumetricLighting.
|
protectedvirtual |
Reimplemented in makVrv::DtHdrPostProcessor, and makVrv::DtVolumetricLighting.
|
protectedvirtual |
Reimplemented in makVrv::DtWaterOnScreen.
|
protectedvirtual |
When constructing a post processor, add the names of the sub-components (effects) that can be enabled and disabled.
|
protectedvirtual |
Set the post processor enabled state (true = enabled)
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |