VR-Forces 5.0.2 Developer's Guide
 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

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 ()
 
virtual void reloadShaders ()
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 
virtual void setSize (int width, int height)
 
virtual void setOcclusionTexture (osg::Texture *inputTex)
 
virtual void setBaseTexture (osg::Texture *inputTex)
 
virtual void setVisible (bool visible)
 
virtual bool visible () const
 
virtual void setParameters (const DtCrepuscularRaysParameters &params)
 
- 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
 
virtual void beginTexturedQuad () const
 
virtual void endTexturedQuad () const
 
virtual std::string preprocessorDefinesString (void) const
 
virtual DtGlProgramcreateProgram (const std::string &path, const std::string &prefixName, const std::string &preprocessor="") const
 

Protected Member Functions

 DtVolumetricDrawable (DtDe &de)
 
virtual void initRenderTextures () const
 
virtual void downSample4xPass (osg::State *state) const
 
virtual void volumetricRaysPass (osg::State *state) const
 
virtual void compositeRaysPass (osg::State *state) const
 
virtual void createComputeProgramIfNecessary (VOLUMETRIC_PASS pass, const std::string &path, const std::string &name) const
 
virtual void createProgramIfNecessary (VOLUMETRIC_PASS pass, const std::string &path, const std::string &prefixName) const
 
virtual void initializeUniformLocations (VOLUMETRIC_PASS pass) const
 
virtual void zeroOutUniformLocations () const
 
virtual void deleteShaders () const
 
- Protected Member Functions inherited from makVrv::DtPostProcessorDrawable
void setupGeometry () const
 

Protected Attributes

friend DtVolumetricDrawableCreator
 
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
 
- Protected Attributes inherited from makVrv::DtPostProcessorDrawable
DtDemyDe
 
unsigned int myMutableVbo
 

Private Member Functions

 DtVolumetricDrawable ()
 
 DtVolumetricDrawable (const DtVolumetricDrawable &)
 
DtVolumetricDrawableoperator= (const DtVolumetricDrawable &)
 

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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)