25 #ifndef WGEPOSTPROCESSINGNODE_H
26 #define WGEPOSTPROCESSINGNODE_H
33 #include "../../common/WPropertyVariable.h"
34 #include "../../common/WItemSelection.h"
35 #include "../../common/WSharedAssociativeContainer.h"
37 #include "../offscreen/WGEOffscreenRenderNode.h"
38 #include "../offscreen/WGEOffscreenRenderPass.h"
39 #include "../offscreen/WGEOffscreenFinalPass.h"
40 #include "../callbacks/WGESwitchCallback.h"
41 #include "../callbacks/WGENodeMaskCallback.h"
42 #include "../WGEGroupNode.h"
43 #include "../WGECamera.h"
45 #include "WGEPostprocessor.h"
60 typedef osg::ref_ptr< WGEPostprocessingNode >
RefPtr;
65 typedef osg::ref_ptr< const WGEPostprocessingNode >
ConstRefPtr;
79 WGEPostprocessingNode( osg::ref_ptr< WGECamera > reference,
size_t width = 2048,
size_t height = 2048,
bool noHud =
false );
113 void remove( osg::ref_ptr< osg::Node > node );
135 osg::ref_ptr< osg::Node >,
This class enables you to add arbitrary nodes that get post-processed in screen space.
WGEPostprocessor::SPtr getCurrentPostprocessor() const
The post processor currently in use.
WPropDouble m_depthShadeU
Upper depth threshold -> how bright to get.
WSharedAssociativeContainer< std::map< osg::ref_ptr< osg::Node >, std::pair< WGEShader::RefPtr, WGEShaderPreprocessor::SPtr > > > NodeShaderAssociation
This type is used to actually store the association between a node and its associated shader and cust...
osg::ref_ptr< const WGEPostprocessingNode > ConstRefPtr
Convenience typedef for an osg::ref_ptr; const.
WPropGroup m_depthGroup
Group these depth-shading props.
virtual ~WGEPostprocessingNode()
Destructor.
WPropBool m_shadeByDepth
Activate depth based darkening.
WPropBool m_showHud
Activate to show the texture HUDs.
WPropDouble m_depthShadeL
Lower depth shade threshold -> how dark to get.
WPropSelection m_activePostprocessor
The property containing the currently active method or a combination.
WPropDouble m_depthThresholdU
Upper depth threshold -> higher depth is foreground.
void postprocessorSelected()
Callback for changes in m_activePostprocessor.
WGEPostprocessingNode(osg::ref_ptr< WGECamera > reference, size_t width=2048, size_t height=2048, bool noHud=false)
Create a new post-processing node.
osg::ref_ptr< WGEGroupNode > m_childs
The group of child nodes to post-process.
WPropDouble m_depthThresholdL
Lower depth threshold -> lower depth is background.
void insert(osg::ref_ptr< osg::Node > node, WGEShader::RefPtr shader=NULL)
Inserts a node to the post-processor and injects the needed code to the specified shader.
NodeShaderAssociation m_nodeShaderAssociation
List of nodes and their corresponding shader and preprocessor.
WPropGroup m_properties
All the properties of the post-processor.
void clear()
Removes all associated nodes.
WGEPostprocessor::ProcessorList m_postprocs
The postprocessors.
void remove(osg::ref_ptr< osg::Node > node)
Removes the node from the post-processing.
WPropGroup getProperties() const
Returns the set of properties controlling the post-processing node.
WPropBool m_active
If true, post-processing is enabled.
osg::ref_ptr< WGEPostprocessingNode > RefPtr
Convenience typedef for an osg::ref_ptr.
std::shared_ptr< WGEPostprocessor > SPtr
Convenience typedef for an osg::ref_ptr< WGEPostprocessor >.
std::vector< WGEPostprocessor::SPtr > ProcessorList
Type used for returning lists of postprocessor prototypes.
std::shared_ptr< WGEShaderPreprocessor > SPtr
Shared pointer for this class.
osg::ref_ptr< WGEShader > RefPtr
Convenience typedef for an osg::ref_ptr.
This class provides a common interface for thread-safe access to associative containers (set,...