28#ifndef HPL_RENDERER_POST_EFFECTS_H
29#define HPL_RENDERER_POST_EFFECTS_H
31#include "common/list.h"
32#include "hpl1/engine/graphics/GraphicsTypes.h"
33#include "hpl1/engine/math/MathTypes.h"
34#include "hpl1/std/set.h"
38#define kFilterProgramNum (1)
40class iLowLevelGraphics;
41class LowLevelResources;
45class cGpuProgramManager;
49enum ePostEffectFilter {
50 ePostEffectFilter_Offset,
51 ePostEffectFilter_LastEnum
54enum ePostEffectProgram {
55 ePostEffectProgram_Offset,
56 ePostEffectProgram_LastEnum
82 void SetImageTrailActive(
bool abX) {
83 if (!mImageTrailData.mbActive && abX)
84 mImageTrailData.mbFirstPass =
true;
85 mImageTrailData.mbActive = abX;
87 bool GetImageTrailActive() {
return mImageTrailData.mbActive; }
94 iTexture *GetScreenBuffer(
int alNum) {
return mpScreenBuffer[alNum]; }
96 void SetActive(
bool abX) { mbActive = abX; }
97 bool GetActive() {
return mbActive; }
99 void SetBloomActive(
bool abX);
100 bool GetBloomActive() {
return mbBloomActive; }
102 void SetBloomSpread(
float afX) { mfBloomSpread = afX; }
103 float GetBloomSpread() {
return mfBloomSpread; }
105 void SetMotionBlurActive(
bool abX);
106 bool GetMotionBlurActive() {
return mbMotionBlurActive; }
108 void SetMotionBlurAmount(
float afX) { mfMotionBlurAmount = afX; }
109 float GetMotionBlurAmount() {
return mfMotionBlurAmount; }
111 void SetDepthOfFieldActive(
bool abX) { mbDofActive = abX; }
112 void SetDepthOfFieldMaxBlur(
float afX) { mfDofMaxBlur = afX; }
113 void SetDepthOfFieldFocalPlane(
float afX) { mfDofFocalPlane = afX; }
114 void SetDepthOfFieldNearPlane(
float afX) { mfDofNearPlane = afX; }
115 void SetDepthOfFieldFarPlane(
float afX) { mfDofFarPlane = afX; }
117 bool GetDepthOfFieldActive() {
return mbDofActive; }
118 float GetDepthOfFieldMaxBlur() {
return mfDofMaxBlur; }
119 float GetDepthOfFieldFocalPlane() {
return mfDofFocalPlane; }
120 float GetDepthOfFieldNearPlane() {
return mfDofNearPlane; }
121 float GetDepthOfFieldFarPlane() {
return mfDofFarPlane; }
123 iTexture *GetFreeScreenTexture() {
return mpScreenBuffer[mImageTrailData.mlCurrentBuffer == 0 ? 1 : 0]; }
125 void RenderBlurTexture(iTexture *apDestination, iTexture *apSource,
float afBlurAmount);
128 void RenderImageTrail();
132 void RenderMotionBlur();
134 void RenderDepthOfField();
136 iLowLevelGraphics *mpLowLevelGraphics;
137 LowLevelResources *mpLowLevelResources;
138 cResources *mpResources;
139 cGpuProgramManager *mpGpuManager;
140 cRenderer3D *mpRenderer3D;
142 cRenderList *mpRenderList;
144 cVector2f mvScreenSize;
146 iTexture *mpScreenBuffer[2];
148 cImageTrailEffect mImageTrailData;
150 iGpuProgram *_blur2DProgram;
151 iGpuProgram *_blurRectProgram;
154 iGpuProgram *_bloomProgram;
156 iTexture *mpBloomBlurTexture;
158 iGpuProgram *_motionBlurProgram;
160 iGpuProgram *_depthOfFieldProgram;
161 iTexture *mpDofBlurTexture;
163 tVertexVec mvTexRectVtx;
168 bool mbMotionBlurActive;
169 float mfMotionBlurAmount;
170 bool mbMotionBlurFirstTime;
174 float mfDofFocalPlane;
175 float mfDofNearPlane;
Definition: RendererPostEffects.h:59
Definition: RenderList.h:145
Definition: Renderer3D.h:139
Definition: RendererPostEffects.h:71
void SetImageTrailAmount(float afAmount)
Definition: RendererPostEffects.h:92
Definition: Resources.h:160
Definition: LowLevelGraphics.h:200