Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
PostAAPreRenderOperator.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2018 DIVIDE-Studio
3 Copyright (c) 2009 Ionut Cava
4
5 This file is part of DIVIDE Framework.
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software
9 and associated documentation files (the "Software"), to deal in the Software
10 without restriction,
11 including without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sublicense,
13 and/or sell copies of the Software, and to permit persons to whom the
14 Software is furnished to do so,
15 subject to the following conditions:
16
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED,
22 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23 PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25 DAMAGES OR OTHER LIABILITY,
26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27 IN CONNECTION WITH THE SOFTWARE
28 OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 */
31
34
35#pragma once
36#ifndef DVD_POST_AA_PRE_RENDER_OPERATOR_H_
37#define DVD_POST_AA_PRE_RENDER_OPERATOR_H_
38
41
42namespace Divide {
43
45 public:
48
49 [[nodiscard]] bool execute(PlayerIndex idx, const CameraSnapshot& cameraSnapshot, const RenderTargetHandle& input, const RenderTargetHandle& output, GFX::CommandBuffer& bufferInOut) override;
50 void reshape(U16 width, U16 height) override;
51
52 PROPERTY_RW(U8, postAAQualityLevel, 2u);
53 PROPERTY_RW(bool, useSMAA, false);
54
55 [[nodiscard]] bool ready() const noexcept override;
56
57 private:
58 PROPERTY_INTERNAL(U8, currentPostAAQualityLevel, 2u);
59 PROPERTY_INTERNAL(bool, currentUseSMAA, false);
60
64
67
69
73};
74
75} // namespace Divide
76
77#endif //DVD_POST_AA_PRE_RENDER_OPERATOR_H_
#define PROPERTY_INTERNAL(...)
This will only set properties internal to the actual class.
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
Definition: GFXDevice.h:215
bool ready() const noexcept override
Handle< ShaderProgram > _fxaa
Pipeline * _smaaBlendPipeline
void reshape(U16 width, U16 height) override
Handle< Texture > _areaTexture
Pipeline * _smaaWeightPipeline
RenderTargetHandle _smaaWeights
Handle< Texture > _searchTexture
Handle< ShaderProgram > _smaaBlend
Pipeline * _fxaaPipeline
Handle< ShaderProgram > _smaaWeightComputation
~PostAAPreRenderOperator()
PROPERTY_RW(bool, useSMAA, false)
bool execute(PlayerIndex idx, const CameraSnapshot &cameraSnapshot, const RenderTargetHandle &input, const RenderTargetHandle &output, GFX::CommandBuffer &bufferInOut) override
This is tricky as we use our screen as both input and output.
PROPERTY_RW(U8, postAAQualityLevel, 2u)
An API-independent representation of a texture.
Definition: Texture.h:83
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
uint8_t U8
Project & parent
Definition: DefaultScene.h:41
uint16_t U16
constexpr Handle< T > INVALID_HANDLE