Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 186 vs 221 for /trunk/Source Code/Rendering/PostFX/Headers/PostFX.h

Diff revisions: vs.
  @@ -1,5 +1,5 @@
1 1 /*
2 - Copyright (c) 2013 DIVIDE-Studio
2 + Copyright (c) 2014 DIVIDE-Studio
3 3 Copyright (c) 2009 Ionut Cava
4 4
5 5 This file is part of DIVIDE Framework.
  @@ -25,8 +25,6 @@
25 25
26 26 #include "core.h"
27 27
28 - #define FBO_BLOOM_SAMPLES 1
29 -
30 28 class GFXDevice;
31 29 class Quad3D;
32 30 class Camera;
  @@ -39,13 +37,30 @@
39 37
40 38 DEFINE_SINGLETON( PostFX )
41 39
40 + private:
41 + ~PostFX();
42 + PostFX();
43 + void createOperators();
44 +
42 45 public:
43 - FrameBufferObject* _screenFBO;
44 - FrameBufferObject* _depthFBO;
45 46
46 - /// Anaglyph (a second "screen" fbo, for the other "eye")
47 - FrameBufferObject* _anaglyphFBO;
47 + void displaySceneWithoutAnaglyph();
48 + void displaySceneWithAnaglyph();
49 +
50 + void init(const vec2<U16>& resolution);
51 + void idle();
52 + void reshapeFBO(I32 newwidth , I32 newheight);
53 +
54 + inline void toggleDepthPreview(const bool state) {_depthPreview = state;}
48 55
56 + private:
57 + bool _enableBloom;
58 + bool _enableDOF;
59 + bool _enableNoise;
60 + bool _enableSSAO;
61 + bool _enableFXAA;
62 + bool _underwater;
63 + bool _depthPreview;
49 64 /// Bloom
50 65 FrameBufferObject* _bloomFBO;
51 66 PreRenderOperator* _bloomOP;
  @@ -67,38 +82,12 @@
67 82
68 83 F32 _randomNoiseCoefficient, _randomFlashCoefficient;
69 84 D32 _timer, _tickInterval;
70 - F32 _eyeOffset;
71 85
72 86 Quad3D* _renderQuad;
73 87 ShaderProgram* _anaglyphShader;
74 88 ShaderProgram* _postProcessingShader;
75 89 Texture2D* _underwaterTexture;
76 90 GFXDevice& _gfx;
77 - ///Update the current camera at every render loop
78 - Camera* _currentCamera;
79 -
80 - private:
81 - void displaySceneWithoutAnaglyph(bool deferred);
82 - void displaySceneWithAnaglyph(bool deferred);
83 - void createOperators();
84 - ~PostFX();
85 - PostFX();
86 -
87 - bool _enablePostProcessing;
88 - bool _enableAnaglyph;
89 - bool _enableBloom;
90 - bool _enableDOF;
91 - bool _enableNoise;
92 - bool _enableSSAO;
93 - bool _enableFXAA;
94 - bool _enableHDR;
95 - bool _underwater;
96 -
97 - public:
98 - void init(const vec2<U16>& resolution);
99 - void idle();
100 - void render();
101 - void reshapeFBO(I32 newwidth , I32 newheight);
102 91
103 92 END_SINGLETON
104 93