|
1 | 1 | #ifndef guard_screenSpaceEffects_h_xcfvh241448960sdrt |
2 | 2 | #define guard_screenSpaceEffects_h_xcfvh241448960sdrt |
3 | 3 |
|
4 | | -/* |
5 | | -
|
6 | | -#include <cage-engine/provisionalHandles.h> |
7 | 4 | #include <cage-engine/screenSpaceEffectsProperties.h> |
8 | 5 |
|
9 | 6 | namespace cage |
10 | 7 | { |
11 | | - class RenderQueue; |
12 | | - class AssetsManager; |
13 | | - class ProvisionalGraphics; |
| 8 | + class GraphicsEncoder; |
| 9 | + class Texture; |
14 | 10 |
|
15 | 11 | struct CAGE_ENGINE_API ScreenSpaceCommonConfig |
16 | 12 | { |
17 | | - RenderQueue *queue = nullptr; |
| 13 | + GraphicsEncoder *encoder = nullptr; |
18 | 14 | AssetsManager *assets = nullptr; |
19 | | - ProvisionalGraphics *provisionals = nullptr; |
20 | 15 | Vec2i resolution; |
21 | 16 | }; |
22 | 17 |
|
23 | 18 | struct CAGE_ENGINE_API ScreenSpaceAmbientOcclusionConfig : public ScreenSpaceCommonConfig, public ScreenSpaceAmbientOcclusion |
24 | 19 | { |
25 | 20 | Mat4 proj; |
26 | | - TextureHandle inDepth; |
27 | | - mutable TextureHandle outAo; |
| 21 | + Texture *inDepth = nullptr; |
| 22 | + Texture *outAo = nullptr; |
28 | 23 | uint32 frameIndex = 0; |
29 | 24 | }; |
30 | 25 |
|
31 | 26 | struct CAGE_ENGINE_API ScreenSpaceDepthOfFieldConfig : public ScreenSpaceCommonConfig, public ScreenSpaceDepthOfField |
32 | 27 | { |
33 | 28 | Mat4 proj; |
34 | | - TextureHandle inDepth; |
35 | | - TextureHandle inColor; |
36 | | - TextureHandle outColor; |
37 | | - }; |
38 | | -
|
39 | | - struct CAGE_ENGINE_API ScreenSpaceEyeAdaptationConfig : public ScreenSpaceCommonConfig, public ScreenSpaceEyeAdaptation |
40 | | - { |
41 | | - String cameraId; // for synchronizing data across frames |
42 | | - TextureHandle inColor; // used in both passes |
43 | | - TextureHandle outColor; // used in the apply pass only |
44 | | - Real elapsedTime = 1.0 / 60; |
| 29 | + Texture *inDepth = nullptr; |
| 30 | + Texture *inColor = nullptr; |
| 31 | + Texture *outColor = nullptr; |
45 | 32 | }; |
46 | 33 |
|
47 | 34 | struct CAGE_ENGINE_API ScreenSpaceBloomConfig : public ScreenSpaceCommonConfig, public ScreenSpaceBloom |
48 | 35 | { |
49 | | - TextureHandle inColor; |
50 | | - TextureHandle outColor; |
| 36 | + Texture *inColor = nullptr; |
| 37 | + Texture *outColor = nullptr; |
51 | 38 | }; |
52 | 39 |
|
53 | 40 | struct CAGE_ENGINE_API ScreenSpaceTonemapConfig : public ScreenSpaceCommonConfig |
54 | 41 | { |
55 | | - TextureHandle inColor; |
56 | | - TextureHandle outColor; |
| 42 | + Texture *inColor = nullptr; |
| 43 | + Texture *outColor = nullptr; |
57 | 44 | Real gamma = 2.2; |
58 | 45 | bool tonemapEnabled = true; |
59 | 46 | }; |
60 | 47 |
|
61 | 48 | struct CAGE_ENGINE_API ScreenSpaceFastApproximateAntiAliasingConfig : public ScreenSpaceCommonConfig |
62 | 49 | { |
63 | | - TextureHandle inColor; |
64 | | - TextureHandle outColor; |
| 50 | + Texture *inColor = nullptr; |
| 51 | + Texture *outColor = nullptr; |
65 | 52 | }; |
66 | 53 |
|
67 | 54 | struct CAGE_ENGINE_API ScreenSpaceSharpeningConfig : public ScreenSpaceCommonConfig, public ScreenSpaceSharpening |
68 | 55 | { |
69 | | - TextureHandle inColor; |
70 | | - TextureHandle outColor; |
| 56 | + Texture *inColor = nullptr; |
| 57 | + Texture *outColor = nullptr; |
71 | 58 | }; |
72 | 59 |
|
73 | 60 | CAGE_ENGINE_API void screenSpaceAmbientOcclusion(const ScreenSpaceAmbientOcclusionConfig &config); |
74 | 61 | CAGE_ENGINE_API void screenSpaceDepthOfField(const ScreenSpaceDepthOfFieldConfig &config); |
75 | | - CAGE_ENGINE_API void screenSpaceEyeAdaptationPrepare(const ScreenSpaceEyeAdaptationConfig &config); |
76 | 62 | CAGE_ENGINE_API void screenSpaceBloom(const ScreenSpaceBloomConfig &config); |
77 | | - CAGE_ENGINE_API void screenSpaceEyeAdaptationApply(const ScreenSpaceEyeAdaptationConfig &config); |
78 | 63 | CAGE_ENGINE_API void screenSpaceTonemap(const ScreenSpaceTonemapConfig &config); |
79 | 64 | CAGE_ENGINE_API void screenSpaceFastApproximateAntiAliasing(const ScreenSpaceFastApproximateAntiAliasingConfig &config); |
80 | 65 | CAGE_ENGINE_API void screenSpaceSharpening(const ScreenSpaceSharpeningConfig &config); |
81 | 66 | } |
82 | 67 |
|
83 | | -*/ |
84 | | - |
85 | 68 | #endif // guard_screenSpaceEffects_h_xcfvh241448960sdrt |
0 commit comments