"L. Spiro Engine"
|
00001 00016 #ifndef __LSG_POSTPROCESSVERTBLUR_H__ 00017 #define __LSG_POSTPROCESSVERTBLUR_H__ 00018 00019 #include "../LSGGraphicsLib.h" 00020 #include "../RenderTarget/LSGColorRenderTarget.h" 00021 #include "../ShaderLanguage/LSGShader.h" 00022 #include "CriticalSection/LSHCriticalSection.h" 00023 00024 namespace lsg { 00025 00032 class CPostProcessVertBlur { 00033 public : 00034 // == Various constructors. 00035 LSE_CALLCTOR CPostProcessVertBlur(); 00036 LSE_CALLCTOR ~CPostProcessVertBlur(); 00037 00038 00039 // == Functions. 00046 LSBOOL LSE_CALL GetBlurV( CColorRenderTarget &_crtSrc, LSBOOL _bDownSample = true ); 00047 00053 LSE_INLINE CColorRenderTarget & LSE_CALL GetBlurTarget(); 00054 00055 00056 protected : 00057 // == Members. 00061 CColorRenderTarget m_crtBlur; 00062 00066 static CShader * m_psBlur; 00067 00071 static CCriticalSection m_csCrit; 00072 00076 static LSUINT32 m_ui32RefCount; 00077 00081 static CShaderBase::LSG_HANDLE m_hOffsets; 00082 00086 static CShaderBase::LSG_HANDLE m_hWeights; 00087 00088 00089 // == Functions. 00098 LSBOOL LSE_CALL Init( LSUINT32 _ui32Width, LSUINT32 _ui32Height, LSBOOL _bFourthSize ); 00099 00108 static LSFLOAT LSE_CALL ComputeGaussian( LSFLOAT _fX, LSFLOAT _fMean, LSFLOAT _fStdDev ); 00109 }; 00110 00111 00112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00113 // DEFINITIONS 00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00115 // == Functions. 00121 LSE_INLINE CColorRenderTarget & LSE_CALL CPostProcessVertBlur::GetBlurTarget() { 00122 return m_crtBlur; 00123 } 00124 00125 } // namespace lsg 00126 00127 #endif // __LSG_POSTPROCESSVERTBLUR_H__