![]() |
VR-Forces 4.6.1 Class Documentation
|
class used to render hdr during the post processor camera draw More...

Classes | |
| struct | DtHdrOptions |
| structure to hold all the HDR settings so they can more easily be passed to the drawable. More... | |
Public Types | |
| enum | HDR_PASS { DOWNSAMPLE = 0, DOWNSAMPLE4X, BLURH4, BLURV4, BLURH6, BLURV6, BLURH10, BLURV10, BLURH12, BLURV12, TONEMAPPING, EXTRACTHL, GAUSCOMP, STARSTREAK, GLARECOMP, STARCOMP, GHOSTIMAGE, CALCADAPTEDLUM, PROGSIZE } |
| enum | BUFFER_PYRAMID { LEVEL_0 = 0, LEVEL_1, LEVEL_2, LEVEL_3, LEVEL_4, LEVEL_5, LEVEL_TOTAL } |
Public Member Functions | |
| DtHdrDrawable (DtDe &de, DtHdrOptions options, osg::Texture *lensFlareTexture) | |
| contructor that passes in the options needed for setting up HDR | |
| DtHdrDrawable (const DtHdrDrawable &orig, const osg::CopyOp &op) | |
| Copy constructor needed because it is derived from osg::Drawable. | |
| virtual | ~DtHdrDrawable () |
| Destructor. | |
| virtual osg::Object * | clone (const osg::CopyOp ©op) const |
| required functions for derriving from osg::Drawable | |
| virtual osg::Object * | cloneType () const |
| virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
| virtual void | setInputTexture (osg::Texture2D *inputTex) |
| setter for the input texture from the previous post processor or main rendering | |
| virtual void | setEnabled (bool enabled) |
| setter/getter for whether or not this effect is enabled. | |
| virtual bool | enabled () |
| virtual DtHdrOptions & | options () |
| getter for the hdr options. returns a reference so modifications will effect this drawable. | |
| virtual void | setLumOverride (bool lumOverride) |
| setter for whether or not the luminance override should be turned on for this drawable the luminance override is used to render modes that have the sky turned of when HDR is turned on. | |
| virtual void | setHdrPassthrough (bool enable) |
| getter/setter for the whether the HDR post processor | |
| virtual bool | hdrPassthrough () |
| virtual void | cleanupGpuMemory () |
| cleanup the Gpu memory. this should be called in the render thread before throwing away a ref_ptr to the drawable. | |
Public Member Functions inherited from makVrv::DtPostProcessorDrawable | |
| DtPostProcessorDrawable () | |
| DtPostProcessorDrawable (const DtPostProcessorDrawable &orig, const osg::CopyOp &op) | |
| virtual void | drawTexturedQuad () const |
| render a simple quad using the current opengl state (setup shader/uniform/textures before calling) | |
Protected Member Functions | |
| virtual void | initRenderTextures () const |
| initializes all the render textures if they have not been initialized yet | |
| virtual void | downsample (DtGlRenderTexture *src, DtGlRenderTexture *dest, osg::State *state) const |
| downsample the the src render texture into the dest render texture (or upsample if the dest is larger) | |
| virtual void | downsample4x (DtGlRenderTexture *src, DtGlRenderTexture *dest, osg::State *state) const |
| same as downsample except it samples a 4x4 square in the src for each sample in the dest this helps reduce flickering for really bright objects like light points. | |
| virtual void | extractHL (DtGlRenderTexture *src, DtGlRenderTexture *dest, osg::State *state) const |
| extract the anything above the lumThreshold and put it in the dest render texture | |
| virtual void | runPass (HDR_PASS prog, DtGlRenderTexture *src, DtGlRenderTexture *dest, osg::State *state) const |
| run the specified prog on the src and put the result in dest. Used mostly for blur shaders. | |
| virtual void | blur (DtGlRenderTexture *src, DtGlRenderTexture *dest, DtGlRenderTexture *temp, int blurWidth, osg::State *state) const |
| runs a couple blur passes on the src and puts the result in dest using temp as the intermediate result. | |
| virtual void | getBufferPyramidSize (BUFFER_PYRAMID level, int *w, int *h) const |
| calculate the buffer size for a particular blur level | |
| virtual void | genStarStreak (int streak, float dir, float length, osg::State *state) const |
| run the star streak shaders for a particular streak direction and length | |
| virtual void | genGhostImage (const float *ghost_modulation1st, const float *ghost_modulation2nd, osg::State *state) const |
| run the shaders to generate the ghosting/lens flare effect | |
| virtual void | composeEffect (osg::State *state) const |
| compose the three HDR effects into a single render texture. | |
| virtual void | toneMappingPass (osg::State *state) const |
| run the final tone mapping pass that combines the effects texture with the main rendering and scales everything appropriately | |
| virtual void | calculateLuminance (osg::State *state) const |
| calculate the luminace scaling to use in the tone mapping | |
| virtual void | initBlurCode () |
| initialize the blur shaders | |
| virtual void | initShaders () |
| initialize the rest of the HDR shaders. | |
| virtual void | colorModulationRedShift (float *color, float r, float g, float b, int num) |
| virtual void | colorModulation (float *color, float r, float g, float b, int num) |
| virtual void | modulateColor () |
Static Protected Attributes | |
| static const int | theNumLumCapturePbos = 5 |
| static double | theLastHdrFrameTime |
Additional Inherited Members | |
Static Public Member Functions inherited from makVrv::DtPostProcessorDrawable | |
| static osg::Program * | createPostProcessorProgram (DtDe &myDe, const std::string &name) |
| create an osg program based on the name (name_ps.glsl and name_vs.glsl files are used) | |
class used to render hdr during the post processor camera draw
| makVrv::DtHdrDrawable::DtHdrDrawable | ( | DtDe & | de, |
| DtHdrOptions | options, | ||
| osg::Texture * | lensFlareTexture | ||
| ) |
contructor that passes in the options needed for setting up HDR
| makVrv::DtHdrDrawable::DtHdrDrawable | ( | const DtHdrDrawable & | orig, |
| const osg::CopyOp & | op | ||
| ) |
Copy constructor needed because it is derived from osg::Drawable.
|
virtual |
Destructor.
|
inlinevirtual |
required functions for derriving from osg::Drawable
|
inlinevirtual |
|
virtual |
|
virtual |
setter for the input texture from the previous post processor or main rendering
|
virtual |
setter/getter for whether or not this effect is enabled.
|
virtual |
|
virtual |
getter for the hdr options. returns a reference so modifications will effect this drawable.
|
virtual |
setter for whether or not the luminance override should be turned on for this drawable the luminance override is used to render modes that have the sky turned of when HDR is turned on.
|
virtual |
getter/setter for the whether the HDR post processor
|
virtual |
|
virtual |
cleanup the Gpu memory. this should be called in the render thread before throwing away a ref_ptr to the drawable.
|
protectedvirtual |
initializes all the render textures if they have not been initialized yet
|
protectedvirtual |
downsample the the src render texture into the dest render texture (or upsample if the dest is larger)
|
protectedvirtual |
same as downsample except it samples a 4x4 square in the src for each sample in the dest this helps reduce flickering for really bright objects like light points.
|
protectedvirtual |
extract the anything above the lumThreshold and put it in the dest render texture
|
protectedvirtual |
run the specified prog on the src and put the result in dest. Used mostly for blur shaders.
|
protectedvirtual |
runs a couple blur passes on the src and puts the result in dest using temp as the intermediate result.
|
protectedvirtual |
calculate the buffer size for a particular blur level
|
protectedvirtual |
run the star streak shaders for a particular streak direction and length
|
protectedvirtual |
run the shaders to generate the ghosting/lens flare effect
|
protectedvirtual |
compose the three HDR effects into a single render texture.
|
protectedvirtual |
run the final tone mapping pass that combines the effects texture with the main rendering and scales everything appropriately
|
protectedvirtual |
calculate the luminace scaling to use in the tone mapping
|
protectedvirtual |
initialize the blur shaders
|
protectedvirtual |
initialize the rest of the HDR shaders.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |