VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtVolumetricDrawable Class Reference

class used to render crepuscular rays during the post processor camera draw More...

Inheritance diagram for makVrv::DtVolumetricDrawable:
Inheritance graph
[legend]

Public Types

enum  VOLUMETRIC_PASS { DOWNSAMPLE4X = 0, VOLUMETRIC_RAYS, FINAL_PASS, PASSES_SIZE }
 

Public Member Functions

virtual ~DtVolumetricDrawable ()
 destructor More...
 
virtual void reloadShaders ()
 Trigger shader reload by marking them as dirty using myShadersDirtyFlag. More...
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 overridden More...
 
virtual void setSize (int width, int height)
 overridden currently unneeded because the postprocessor drawable is always deleted/recreated because of channel creation/destruction virtual void releaseGLObjects(osg::State* state = 0) const; //! More...
 
virtual void setOcclusionTexture (osg::Texture *inputTex)
 setter for the input texture from the previous post processor or main rendering More...
 
virtual void setBaseTexture (osg::Texture *inputTex)
 setter for the base texture More...
 
virtual void setVisible (bool visible)
 set/get visibility More...
 
virtual bool visible () const
 
virtual void setParameters (const DtCrepuscularRaysParameters &params)
 communicate the parameters for the crepuscular rays More...
 
- Public Member Functions inherited from makVrv::DtPostProcessorDrawable
 DtPostProcessorDrawable (DtDe &de)
 
 DtPostProcessorDrawable (const DtPostProcessorDrawable &orig, const osg::CopyOp &op)
 
virtual ~DtPostProcessorDrawable ()
 
virtual void drawTexturedQuad (bool drawOnly=false) const
 prevent assignment More...
 
virtual void beginTexturedQuad () const
 vert pointes gl states etc More...
 
virtual void endTexturedQuad () const
 disable modes stup in begin More...
 
virtual std::string preprocessorDefinesString (void) const
 preprocessor string taking into account the current options (multiview, etc) More...
 
virtual DtGlProgramcreateProgram (const std::string &path, const std::string &prefixName, const std::string &preprocessor="") const
 create a program based on the name (name_ps.glsl and name_vs.glsl files are used) More...
 

Protected Member Functions

 DtVolumetricDrawable (DtDe &de)
 constructor. private. only creator can create More...
 
virtual void initRenderTextures () const
 initializes all the render textures if they have not been initialized yet More...
 
virtual void downSample4xPass (osg::State *state) const
 down sample 4x pass More...
 
virtual void volumetricRaysPass (osg::State *state) const
 volumetric rays pass More...
 
virtual void compositeRaysPass (osg::State *state) const
 final compositing pass More...
 
virtual void createComputeProgramIfNecessary (VOLUMETRIC_PASS pass, const std::string &path, const std::string &name) const
 helper function to create compute program More...
 
virtual void createProgramIfNecessary (VOLUMETRIC_PASS pass, const std::string &path, const std::string &prefixName) const
 create the drawing program if not created already More...
 
virtual void initializeUniformLocations (VOLUMETRIC_PASS pass) const
 initialize locations for the various uniforms More...
 
virtual void zeroOutUniformLocations () const
 brief initialize locations of the various uniforms to an unknown/invalid value More...
 
virtual void deleteShaders () const
 Delete the shaders. More...
 
- Protected Member Functions inherited from makVrv::DtPostProcessorDrawable
void setupGeometry () const
 brief setup the vertex buffer object used in draw quad More...
 

Protected Attributes

friend DtVolumetricDrawableCreator
 friended, to access constructor above More...
 
int myChannelWidth
 
int myChannelHeight
 
osg::ref_ptr< osg::Texture > myOcclusionTex
 
osg::ref_ptr< osg::Texture > myBaseTex
 
DtGlTexturemyMutableDownSampledOcclusionTexture
 
DtGlTexturemyMutableVolumetricRaysBuffer
 
bool myVisible
 
std::array< DtGlProgram
*, PASSES_SIZE
myMutablePrograms
 
DtCrepuscularRaysParameters myParameters
 
int myMutableSlLightPositionOnScreenLoc
 
int myMutableSlParametersLoc
 
int myMutableSlLightColorLoc
 
int myMutableSlOutputScaleLoc
 
int myMutableBaseStrengthLoc
 
int myMutableBaseTextureLoc
 
int myMutableVolumetricTextureLoc
 
bool myMutableShadersDirtyFlag
 This is set to true upon reloadShaders() and will trigger a recreation in drawImplementation() More...
 
- Protected Attributes inherited from makVrv::DtPostProcessorDrawable
DtDemyDe
 
unsigned int myMutableVbo
 

Private Member Functions

 DtVolumetricDrawable ()
 private default constructor. not allowed. More...
 
 DtVolumetricDrawable (const DtVolumetricDrawable &)
 prevent copy-construction More...
 
DtVolumetricDrawableoperator= (const DtVolumetricDrawable &)
 prevent assignment More...
 

Detailed Description

class used to render crepuscular rays during the post processor camera draw

Member Enumeration Documentation

Enumerator
DOWNSAMPLE4X 
VOLUMETRIC_RAYS 
FINAL_PASS 
PASSES_SIZE 

Constructor & Destructor Documentation

virtual makVrv::DtVolumetricDrawable::~DtVolumetricDrawable ( )
virtual

destructor

makVrv::DtVolumetricDrawable::DtVolumetricDrawable ( DtDe de)
protected

constructor. private. only creator can create

makVrv::DtVolumetricDrawable::DtVolumetricDrawable ( )
private

private default constructor. not allowed.

makVrv::DtVolumetricDrawable::DtVolumetricDrawable ( const DtVolumetricDrawable )
private

prevent copy-construction

Member Function Documentation

DtVolumetricDrawable& makVrv::DtVolumetricDrawable::operator= ( const DtVolumetricDrawable )
private

prevent assignment

virtual void makVrv::DtVolumetricDrawable::reloadShaders ( )
virtual

Trigger shader reload by marking them as dirty using myShadersDirtyFlag.

virtual void makVrv::DtVolumetricDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

overridden

virtual void makVrv::DtVolumetricDrawable::setSize ( int  width,
int  height 
)
virtual

overridden currently unneeded because the postprocessor drawable is always deleted/recreated because of channel creation/destruction virtual void releaseGLObjects(osg::State* state = 0) const; //!

overridden currently unneeded because the postprocessor drawable is always deleted/recreated because of channel creation/destruction set the 'viewport' size

virtual void makVrv::DtVolumetricDrawable::setOcclusionTexture ( osg::Texture *  inputTex)
virtual

setter for the input texture from the previous post processor or main rendering

virtual void makVrv::DtVolumetricDrawable::setBaseTexture ( osg::Texture *  inputTex)
virtual

setter for the base texture

virtual void makVrv::DtVolumetricDrawable::setVisible ( bool  visible)
inlinevirtual

set/get visibility

virtual bool makVrv::DtVolumetricDrawable::visible ( ) const
inlinevirtual
virtual void makVrv::DtVolumetricDrawable::setParameters ( const DtCrepuscularRaysParameters params)
virtual

communicate the parameters for the crepuscular rays

virtual void makVrv::DtVolumetricDrawable::initRenderTextures ( ) const
protectedvirtual

initializes all the render textures if they have not been initialized yet

virtual void makVrv::DtVolumetricDrawable::downSample4xPass ( osg::State *  state) const
protectedvirtual

down sample 4x pass

virtual void makVrv::DtVolumetricDrawable::volumetricRaysPass ( osg::State *  state) const
protectedvirtual

volumetric rays pass

virtual void makVrv::DtVolumetricDrawable::compositeRaysPass ( osg::State *  state) const
protectedvirtual

final compositing pass

virtual void makVrv::DtVolumetricDrawable::createComputeProgramIfNecessary ( VOLUMETRIC_PASS  pass,
const std::string &  path,
const std::string &  name 
) const
protectedvirtual

helper function to create compute program

virtual void makVrv::DtVolumetricDrawable::createProgramIfNecessary ( VOLUMETRIC_PASS  pass,
const std::string &  path,
const std::string &  prefixName 
) const
protectedvirtual

create the drawing program if not created already

virtual void makVrv::DtVolumetricDrawable::initializeUniformLocations ( VOLUMETRIC_PASS  pass) const
protectedvirtual

initialize locations for the various uniforms

virtual void makVrv::DtVolumetricDrawable::zeroOutUniformLocations ( ) const
protectedvirtual

brief initialize locations of the various uniforms to an unknown/invalid value

virtual void makVrv::DtVolumetricDrawable::deleteShaders ( ) const
protectedvirtual

Delete the shaders.

Member Data Documentation

friend makVrv::DtVolumetricDrawable::DtVolumetricDrawableCreator
protected

friended, to access constructor above

int makVrv::DtVolumetricDrawable::myChannelWidth
protected
int makVrv::DtVolumetricDrawable::myChannelHeight
protected
osg::ref_ptr<osg::Texture> makVrv::DtVolumetricDrawable::myOcclusionTex
protected
osg::ref_ptr<osg::Texture> makVrv::DtVolumetricDrawable::myBaseTex
protected
DtGlTexture* makVrv::DtVolumetricDrawable::myMutableDownSampledOcclusionTexture
mutableprotected
DtGlTexture* makVrv::DtVolumetricDrawable::myMutableVolumetricRaysBuffer
mutableprotected
bool makVrv::DtVolumetricDrawable::myVisible
protected
std::array<DtGlProgram*, PASSES_SIZE> makVrv::DtVolumetricDrawable::myMutablePrograms
mutableprotected
DtCrepuscularRaysParameters makVrv::DtVolumetricDrawable::myParameters
protected
int makVrv::DtVolumetricDrawable::myMutableSlLightPositionOnScreenLoc
mutableprotected
int makVrv::DtVolumetricDrawable::myMutableSlParametersLoc
mutableprotected
int makVrv::DtVolumetricDrawable::myMutableSlLightColorLoc
mutableprotected
int makVrv::DtVolumetricDrawable::myMutableSlOutputScaleLoc
mutableprotected
int makVrv::DtVolumetricDrawable::myMutableBaseStrengthLoc
mutableprotected
int makVrv::DtVolumetricDrawable::myMutableBaseTextureLoc
mutableprotected
int makVrv::DtVolumetricDrawable::myMutableVolumetricTextureLoc
mutableprotected
bool makVrv::DtVolumetricDrawable::myMutableShadersDirtyFlag
mutableprotected

This is set to true upon reloadShaders() and will trigger a recreation in drawImplementation()


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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)