OpenWalnut  1.4.0
Public Member Functions | Static Public Member Functions | Public Attributes
WGEPostprocessor::PostprocessorInput Class Reference

This class encapsulates a G-Buffer. More...

#include <WGEPostprocessor.h>

List of all members.

Public Member Functions

 PostprocessorInput (std::vector< osg::ref_ptr< osg::Texture2D > > from)
 Constructs an instance from a given list of textures.
 PostprocessorInput (osg::ref_ptr< osg::Texture2D > color, osg::ref_ptr< osg::Texture2D > normal, osg::ref_ptr< osg::Texture2D > parameter, osg::ref_ptr< osg::Texture2D > tangent, osg::ref_ptr< osg::Texture2D > depth)
 Construct GBuffer with an explicit list of textures.
 PostprocessorInput ()
 Constructor creates empty GBuffer.
size_t bind (osg::ref_ptr< WGEOffscreenRenderPass > to) const
 Attaches these textures to the specified renderpass.

Static Public Member Functions

static PostprocessorInput attach (osg::ref_ptr< WGEOffscreenRenderPass > from)
 Attaches the needed textures to the specified render pass and returns the G-Buffer.

Public Attributes

osg::ref_ptr< osg::Texture2D > m_colorTexture
 Color in RGBA.
osg::ref_ptr< osg::Texture2D > m_normalTexture
 Normal in RGB.
osg::ref_ptr< osg::Texture2D > m_parameterTexture
 Some not yet defined parameter texture, LUMINANCE only.
osg::ref_ptr< osg::Texture2D > m_tangentTexture
 Tangent in RGB.
osg::ref_ptr< osg::Texture2D > m_depthTexture
 Depth.

Detailed Description

This class encapsulates a G-Buffer.

Basically, this is a collection of per-pixel geometry information.

Definition at line 57 of file WGEPostprocessor.h.


Constructor & Destructor Documentation

WGEPostprocessor::PostprocessorInput::PostprocessorInput ( std::vector< osg::ref_ptr< osg::Texture2D > >  from) [explicit]

Constructs an instance from a given list of textures.

The order in the list define color, normal, parameter, tangent, depth. There are no restrictions to the input list. If textures are missing, the corresponding textures in the GBuffer are missing.

Parameters:
fromsource list

Definition at line 90 of file WGEPostprocessor.cpp.

References WGEPostprocessor::m_depthTexture.

WGEPostprocessor::PostprocessorInput::PostprocessorInput ( osg::ref_ptr< osg::Texture2D >  color,
osg::ref_ptr< osg::Texture2D >  normal,
osg::ref_ptr< osg::Texture2D >  parameter,
osg::ref_ptr< osg::Texture2D >  tangent,
osg::ref_ptr< osg::Texture2D >  depth 
)

Construct GBuffer with an explicit list of textures.

Parameters:
colorcolor texture
normalnormal texture
parameterparameter texture
tangenttangent texture
depthdepth texture

Definition at line 114 of file WGEPostprocessor.cpp.

Constructor creates empty GBuffer.

All textures are un-initialized.

Definition at line 85 of file WGEPostprocessor.cpp.


Member Function Documentation

Attaches the needed textures to the specified render pass and returns the G-Buffer.

Parameters:
fromthe renderpass to attach this to
Returns:
the buffer.

Definition at line 127 of file WGEPostprocessor.cpp.

References m_colorTexture, m_depthTexture, m_normalTexture, m_parameterTexture, and m_tangentTexture.

Referenced by WGEPostprocessingNode::WGEPostprocessingNode().

Attaches these textures to the specified renderpass.

Parameters:
toattach to this
Returns:
the ID of the NEXT free texture unit you can use

Definition at line 139 of file WGEPostprocessor.cpp.

References WGEPostprocessor::m_depthTexture.

Referenced by WGEPostprocessorCelShading::WGEPostprocessorCelShading(), WGEPostprocessorEdgeEnhance::WGEPostprocessorEdgeEnhance(), WGEPostprocessorLineAO::WGEPostprocessorLineAO(), and WGEPostprocessorSSAO::WGEPostprocessorSSAO().


Member Data Documentation

Color in RGBA.

Definition at line 109 of file WGEPostprocessor.h.

Referenced by attach(), WGEPostprocessorGauss::create(), and WGEPostprocessorMergeOp::create().

Normal in RGB.

Definition at line 114 of file WGEPostprocessor.h.

Referenced by attach(), and WGEPostprocessorLineAO::WGEPostprocessorLineAO().

Some not yet defined parameter texture, LUMINANCE only.

Definition at line 119 of file WGEPostprocessor.h.

Referenced by attach().

Tangent in RGB.

Definition at line 124 of file WGEPostprocessor.h.

Referenced by attach(), and WGEPostprocessorLineAO::WGEPostprocessorLineAO().


The documentation for this class was generated from the following files: