OpenWalnut  1.3.1
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
WGEPostprocessor::PostprocessorInput Class Reference

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

#include <WGEPostprocessor.h>

Public Member Functions

 PostprocessorInput (std::vector< osg::ref_ptr< osg::Texture2D > > from)
 Constructs an instance from a given list of textures. More...
 
 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. More...
 
 PostprocessorInput ()
 Constructor creates empty GBuffer. More...
 
size_t bind (osg::ref_ptr< WGEOffscreenRenderPass > to) const
 Attaches these textures to the specified renderpass. More...
 

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. More...
 

Public Attributes

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

Detailed Description

This class encapsulates a G-Buffer.

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

Definition at line 58 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 83 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 106 of file WGEPostprocessor.cpp.

WGEPostprocessor::PostprocessorInput::PostprocessorInput ( )

Constructor creates empty GBuffer.

All textures are un-initialized.

Definition at line 78 of file WGEPostprocessor.cpp.

Member Function Documentation

WGEPostprocessor::PostprocessorInput WGEPostprocessor::PostprocessorInput::attach ( osg::ref_ptr< WGEOffscreenRenderPass from)
static

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 119 of file WGEPostprocessor.cpp.

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

Referenced by WGEPostprocessingNode::WGEPostprocessingNode().

size_t WGEPostprocessor::PostprocessorInput::bind ( osg::ref_ptr< WGEOffscreenRenderPass to) const

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 131 of file WGEPostprocessor.cpp.

References WGEPostprocessor::m_depthTexture.

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

Member Data Documentation

osg::ref_ptr< osg::Texture2D > WGEPostprocessor::PostprocessorInput::m_colorTexture

Color in RGBA.

Definition at line 110 of file WGEPostprocessor.h.

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

osg::ref_ptr< osg::Texture2D > WGEPostprocessor::PostprocessorInput::m_depthTexture

Depth.

Definition at line 130 of file WGEPostprocessor.h.

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

osg::ref_ptr< osg::Texture2D > WGEPostprocessor::PostprocessorInput::m_normalTexture

Normal in RGB.

Definition at line 115 of file WGEPostprocessor.h.

Referenced by attach().

osg::ref_ptr< osg::Texture2D > WGEPostprocessor::PostprocessorInput::m_parameterTexture

Some not yet defined parameter texture, LUMINANCE only.

Definition at line 120 of file WGEPostprocessor.h.

Referenced by attach().

osg::ref_ptr< osg::Texture2D > WGEPostprocessor::PostprocessorInput::m_tangentTexture

Tangent in RGB.

Definition at line 125 of file WGEPostprocessor.h.

Referenced by attach().


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