OpenWalnut  1.5.0dev
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>

+ Collaboration diagram for WGEPostprocessor::PostprocessorInput:

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 54 of file WGEPostprocessor.h.

Constructor & Destructor Documentation

◆ PostprocessorInput() [1/3]

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

References WGEPostprocessor::m_depthTexture.

◆ PostprocessorInput() [2/3]

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

◆ PostprocessorInput() [3/3]

WGEPostprocessor::PostprocessorInput::PostprocessorInput ( )

Constructor creates empty GBuffer.

All textures are un-initialized.

Definition at line 86 of file WGEPostprocessor.cpp.

Member Function Documentation

◆ attach()

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

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

Referenced by WGEPostprocessingNode::WGEPostprocessingNode().

+ Here is the caller graph for this function:

◆ bind()

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

References WGEPostprocessor::m_depthTexture.

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

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_colorTexture

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

Color in RGBA.

Definition at line 106 of file WGEPostprocessor.h.

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

◆ m_depthTexture

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

◆ m_normalTexture

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

◆ m_parameterTexture

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

Some not yet defined parameter texture, LUMINANCE only.

Definition at line 116 of file WGEPostprocessor.h.

Referenced by attach().

◆ m_tangentTexture

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

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