CloudyDay
 All Classes Functions Variables Enumerations
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
osgCloudyDay::PostProcess Class Reference

#include <PostProcess.h>

Inheritance diagram for osgCloudyDay::PostProcess:
osgCloudyDay::HUD

List of all members.

Public Types

enum  HDR_Mapping { HDRM_Linear, HDRM_Reinhard, HDRM_ReinhardModified, HDRM_Uncharted }

Public Member Functions

 PostProcess (int hdr_mapping, bool use_avglum, bool use_bloom, bool use_star)
 ~PostProcess (void)
virtual void SetupUniform (osg::ref_ptr< osg::StateSet > states)
virtual void SetupTextures (osg::ref_ptr< osg::StateSet > states)
virtual void CreateCamera ()
void AddLUD (std::string path)
- Public Member Functions inherited from osgCloudyDay::HUD
 HUD (osg::ref_ptr< osg::Texture > debug_tex)
 HUD (void)
 ~HUD (void)
void CreateGeometry ()
void SetSceneTexture (osg::ref_ptr< osg::Texture2D > tex)
void SetGodrayTexture (osg::ref_ptr< osg::Texture2D > tex)
void SetCloudTexture (osg::ref_ptr< osg::Texture2D > tex)
osg::ref_ptr< osg::Camera > GetCamera ()

Protected Member Functions

const std::string GetGLSLFragmentShader ()
const std::string GetGLSLVertexShader ()
const std::string GetGLSLAssignLUD ()
const std::string GetGLSLUniformLUD ()
const std::string GetGLSLFragmentUncharted ()
const std::string GetGLSLFragmentVignetteFunc ()
const std::string GetGLSLFragmentMainFunc ()
const std::string GetHDRMapping ()
const std::string GetGlare ()
const std::string GetVignette ()
const std::string GetSRGB ()
const std::string GetGLSLFragmentHeader ()

Protected Attributes

int m_HDRMapping
bool m_use_AVGLuminance
bool m_use_vignette
osg::ref_ptr< osg::Texture2D > m_postprocess
osg::ref_ptr< osg::Texture3D > tex3dlud
std::vector< osg::ref_ptr
< osg::Texture3D > > 
m_lods
int num_lods
bool m_bloom
bool m_star
- Protected Attributes inherited from osgCloudyDay::HUD
osg::ref_ptr< osg::Texture2D > m_scenetex
osg::ref_ptr< osg::Texture2D > m_goodraytex
osg::ref_ptr< osg::Texture2D > m_cloudtex
osg::ref_ptr< osg::Program > sh_blur_linear
osg::ref_ptr< osg::Uniform > uniform_blur_texsize
osg::ref_ptr< osg::Uniform > uniform_avg_texsize
osg::ref_ptr< osg::Program > sh_lum
osg::ref_ptr< osg::Camera > cam_hud
osg::ref_ptr< osg::StateSet > nodessP
osg::ref_ptr< osg::Program > planeProg
osg::ref_ptr< osg::Geode > plane
int renderorder
osg::ref_ptr< osg::Texture > m_debug_tex

Additional Inherited Members

- Static Public Member Functions inherited from osgCloudyDay::HUD
static void Initialize ()
- Static Protected Attributes inherited from osgCloudyDay::HUD
static osg::ref_ptr
< osg::Texture2D > 
fbo_lum0_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_lum1_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_lum2_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_lum3_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_lum4_texture = 0
static osg::FrameBufferObject * fbo_Lum0 = 0
static osg::FrameBufferObject * fbo_Lum1 = 0
static osg::FrameBufferObject * fbo_Lum2 = 0
static osg::FrameBufferObject * fbo_Lum3 = 0
static osg::FrameBufferObject * fbo_Lum4 = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurV1_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurV2_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurV3_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurV4_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurH1_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurH2_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurH3_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_blurH4_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_star1_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_star2_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_star3_texture = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_star4_texture = 0
static osg::FrameBufferObject * fbo_V1_blur = 0
static osg::FrameBufferObject * fbo_H1_blur = 0
static osg::FrameBufferObject * fbo_V2_blur = 0
static osg::FrameBufferObject * fbo_H2_blur = 0
static osg::FrameBufferObject * fbo_V3_blur = 0
static osg::FrameBufferObject * fbo_H3_blur = 0
static osg::FrameBufferObject * fbo_V4_blur = 0
static osg::FrameBufferObject * fbo_H4_blur = 0
static osg::ref_ptr
< osg::Texture2D > 
fbo_glare_texture

Detailed Description

Postprocess class: This class add the bloom effect, the star effet, performs the final hdr tone mapping, and the LUD mapping. Addionally, a vignette effect is availible


Member Enumeration Documentation

Enumeration, which defines the hdr mapping technique. HDRM_Linear: linear mapping HDRM_Reinhard: Reinhard HDR mapping HDRM_ReinhardModified: Modified Reinhard HDR mapping (recommended) HDRM_Uncharted: Uncharted HDR mapping


Constructor & Destructor Documentation

osgCloudyDay::PostProcess::PostProcess ( int  hdr_mapping,
bool  use_avglum,
bool  use_bloom,
bool  use_star 
)

Constructor

Parameters:
hdr_mappingHDR mapping technique (see enumeration)
use_avglumShould average luminance calculated
use_bloomShould the bloom effect be caluculated
use_starShould the star effect be calculated
osgCloudyDay::PostProcess::~PostProcess ( void  )

Deconstructor


Member Function Documentation

void osgCloudyDay::PostProcess::AddLUD ( std::string  path)

Method to add an addidional lud

Parameters:
pathpath to the LUD.
void osgCloudyDay::PostProcess::CreateCamera ( )
virtual

Method to create the camera

Reimplemented from osgCloudyDay::HUD.

void osgCloudyDay::PostProcess::SetupTextures ( osg::ref_ptr< osg::StateSet >  states)
virtual

Method to set the textures of the geode

Parameters:
statesStates of the geode

Reimplemented from osgCloudyDay::HUD.

void osgCloudyDay::PostProcess::SetupUniform ( osg::ref_ptr< osg::StateSet >  states)
virtual

Method to set the uniforms of the geode

Parameters:
statesStates of the geode

Reimplemented from osgCloudyDay::HUD.


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