My Project
Public Member Functions | List of all members
ParaEngine::CGlowEffect Class Reference

implementation of the full screen glow effect. More...

#include <GlowEffect.h>

Public Member Functions

HRESULT InvalidateDeviceObjects ()
 
HRESULT RestoreDeviceObjects ()
 
HRESULT Render (float fGlowThreshold=0.7f, float fGlowAmount=2.0f, bool bUseAlpha=false)
 apply the full screen glow effect to the current render target. More...
 
void SaveGlowTexturesToFile (const string &filename)
 this is just for debugging purposes. More...
 

Detailed Description

implementation of the full screen glow effect.

This is just a simple post-rendering universal effect to be applied after the main scene is rendered.The effect looks similar to the glow effect as in the game Tron 2.0. by default, it works on the current render target. One can call CGlowEffect::Render() at any time of the render pipeline.

Member Function Documentation

§ Render()

HRESULT CGlowEffect::Render ( float  fGlowThreshold = 0.7f,
float  fGlowAmount = 2.0f,
bool  bUseAlpha = false 
)

apply the full screen glow effect to the current render target.

Parameters
fDestBlendFactorthe destination blend factor. default value is one, where an addictive operation will be used for the back buffer and glow if this is 0, only the glow texture is rendered. Anything in the middle will reduce the destination color.
bUseAlphaif true the glow source's color will be multiplied by its alpha for each pixels. this allows pre-rendered scene to control exactly which portion of the scene is glowing on a per pixel basis. One may use the object to camera distance or glow texture alpha to generate the alpha in previous rendering stages. however, by default this is false. which the half sized version of the back buffer is used unmodified as the glow source.
Returns
S_OK if succeed

§ SaveGlowTexturesToFile()

void CGlowEffect::SaveGlowTexturesToFile ( const string &  filename)

this is just for debugging purposes.


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