![]() |
VR-Forces 4.10 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) | |
| constructor that passes in the options needed for setting up HDR More... | |
| DtHdrDrawable (const DtHdrDrawable &orig, const osg::CopyOp &op) | |
| Copy constructor needed because it is derived from osg::Drawable. More... | |
| virtual | ~DtHdrDrawable () |
| Destructor. More... | |
| virtual osg::Object * | clone (const osg::CopyOp ©op) const |
| required functions for derriving from osg::Drawable More... | |
| virtual osg::Object * | cloneType () const |
| virtual void | drawImplementation (osg::RenderInfo &renderInfo) const |
| 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 | setInputTexture (osg::Texture *inputTex) |
| setter for the input texture from the previous post processor or main rendering More... | |
| virtual void | setEnabled (bool enabled) |
| setter/getter for whether or not this effect is enabled. More... | |
| virtual bool | enabled () |
| virtual DtHdrOptions & | options () |
| getter for the hdr options. returns a reference so modifications will effect this drawable. More... | |
| 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. More... | |
| virtual void | setHdrPassthrough (bool enable) |
| getter/setter for the whether the HDR post processor More... | |
| 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. More... | |
| virtual float | localHdrOutputScale () |
| hdr output sclae this drawable calulated or used last frame 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 DtGlProgram * | createProgram (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 | |
| virtual void | initRenderTextures () const |
| initializes all the render textures if they have not been initialized yet More... | |
| virtual void | downSample (DtGlTexture *src, DtGlTexture *dest, osg::State *state) const |
| downsample the the src texture into the dest texture (or upsample if the dest is larger) More... | |
| virtual void | downsample4x (DtGlTexture *src, DtGlTexture *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. More... | |
| virtual void | extractHL (DtGlTexture *src, DtGlTexture *dest, osg::State *state) const |
| extract the anything above the lumThreshold and put it in the dest render texture More... | |
| virtual void | runPass (HDR_PASS prog, DtGlTexture *src, DtGlTexture *dest, osg::State *state) const |
| run the specified prog on the src and put the result in dest. Used mostly for blur shaders. More... | |
| virtual void | blur (DtGlTexture *src, DtGlTexture *dest, DtGlTexture *temp, int blurWidth, osg::State *state) const |
| blur pass More... | |
| virtual void | getBufferPyramidSize (BUFFER_PYRAMID level, int *w, int *h) const |
| calculate the buffer size for a particular blur level More... | |
| virtual void | genStarStreak (int streak, float dir, float length) const |
| run the star streak shaders for a particular streak direction and length More... | |
| 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 More... | |
| virtual void | composeEffect (void) const |
| compose the three HDR effects into a single render texture. More... | |
| 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 More... | |
| virtual void | calculateLuminance (osg::State *state) const |
| calculate the luminace scaling to use in the tone mapping More... | |
| virtual float | adaptiveLuminance (osg::State *state) const |
| adaptive luminance (do the pass, read, etc) More... | |
| virtual bool | adaptiveLuminanceCompute (osg::State *state) const |
| compute adaptive luminance More... | |
| virtual float | adaptiveLuminanceRead (osg::State *state) const |
| read back the adaptive luminance More... | |
| virtual float | regularLuminance (osg::State *state) const |
| non-adaptive luminance More... | |
| virtual float | silverLiningLuminance (void) const |
| luminance per Silver Lining More... | |
| virtual void | initShaders () |
| initialize the rest of the HDR shaders. More... | |
| virtual void | computeColorModulationRedShift (float *color, float r, float g, float b, int num) |
| helper functions used for creating color constants More... | |
| virtual void | computeColorModulation (float *color, float r, float g, float b, int num) |
| virtual void | computeColorModulationCoefficients () |
| virtual void | createComputeProgramIfNecessary (HDR_PASS pass, const std::string &name) const |
| helper function to create compute program More... | |
| virtual void | createBlurProgramsIfNecessary () const |
| virtual std::string | preprocessorDefinesString (HDR_PASS pass) const |
| preprocessor string taking into account the current options. More... | |
| virtual unsigned int | inputTextureId (unsigned int &target, const DtGlTexture *src, osg::State *state) const |
| get the OpenGL texture id and target (2D for regular, 2D array if in VR) More... | |
| virtual void | streakPass0 (int streak, float dec, const float step[2], float stride) const |
| streak passes More... | |
| virtual void | streakPass1 (int streak, float dec, const float step[2], float stride) const |
| virtual void | streakPass2 (int streak, float dec, const float step[2], float stride) const |
| virtual void | ghostPass0 (const float *ghost_modulation1st) const |
| ghost image passes More... | |
| virtual void | ghostPass1 (const float *ghost_modulation2nd) const |
| virtual void | gaussianBlurComposePass (void) const |
| final passes More... | |
| virtual void | starStreakCompose (void) const |
| virtual void | finalGlarePass (void) const |
| virtual void | initializeUniformLocations (HDR_PASS pass) const |
| init uniform locations from the compiled shader More... | |
| virtual void | zeroOutUniformLocations () |
| set initial value of uniform locations to an invalid value More... | |
| virtual void | createToneMappingProgramIfNecessary (void) const |
| create the tone mapping program if not created already More... | |
| virtual void | slot_hdrResolutionScaleChanged (int val) |
| Trigger shader recompile if resolution scale has changed. More... | |
Protected Member Functions inherited from makVrv::DtPostProcessorDrawable | |
| void | setupGeometry () const |
| brief setup the vertex buffer object used in draw quad More... | |
Static Protected Attributes | |
| static double | theLastHdrFrameTime |
Private Member Functions | |
| DtHdrDrawable ()=delete | |
| private default constructor. not allowed. More... | |
| DtHdrDrawable (const DtHdrDrawable &)=delete | |
| prevent copy-construction More... | |
| DtHdrDrawable & | operator= (const DtHdrDrawable &)=delete |
| prevent assignment More... | |
class used to render hdr during the post processor camera draw
| makVrv::DtHdrDrawable::DtHdrDrawable | ( | DtDe & | de, |
| DtHdrOptions | options, | ||
| osg::Texture * | lensFlareTexture | ||
| ) |
constructor 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.
|
privatedelete |
private default constructor. not allowed.
|
privatedelete |
prevent copy-construction
|
privatedelete |
prevent assignment
|
inlinevirtual |
required functions for derriving from osg::Drawable
|
inlinevirtual |
|
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 overriden
|
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.
|
virtual |
hdr output sclae this drawable calulated or used last frame
|
protectedvirtual |
initializes all the render textures if they have not been initialized yet
|
protectedvirtual |
downsample the the src texture into the dest 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 |
blur pass
|
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 |
adaptive luminance (do the pass, read, etc)
|
protectedvirtual |
compute adaptive luminance
|
protectedvirtual |
read back the adaptive luminance
|
protectedvirtual |
non-adaptive luminance
|
protectedvirtual |
luminance per Silver Lining
|
protectedvirtual |
initialize the rest of the HDR shaders.
|
protectedvirtual |
helper functions used for creating color constants
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
helper function to create compute program
|
protectedvirtual |
|
protectedvirtual |
preprocessor string taking into account the current options.
NOTE: This is a different signature than base class function (but calls up to base class)
|
protectedvirtual |
get the OpenGL texture id and target (2D for regular, 2D array if in VR)
|
protectedvirtual |
streak passes
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
ghost image passes
|
protectedvirtual |
|
protectedvirtual |
final passes
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
init uniform locations from the compiled shader
|
protectedvirtual |
set initial value of uniform locations to an invalid value
|
protectedvirtual |
create the tone mapping program if not created already
|
protectedvirtual |
Trigger shader recompile if resolution scale has changed.
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
mutables needed since osg drawable draw implementations are const functions.
This allows us to keep track of a bit of state that is needed between frames Also these are protected instead of private because they may be needed by classes derived from this class Render textures need to be initialized in draw implementation so they need to be mutable...
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
need to keep track of the previous frame time in draw implementation so this needs to be mutable.
|
mutableprotected |
locations of various uniforms in the shaders
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |