-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(anti-aliasing): add anti-aliasing by FXAA
- Loading branch information
1 parent
fba21ee
commit f6fe55c
Showing
8 changed files
with
255 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/// @file | ||
/// @brief Component @ref cubos::engine::FXAA. | ||
/// @ingroup render-tone-mapping-plugin | ||
|
||
#pragma once | ||
|
||
#include <cubos/core/reflection/reflect.hpp> | ||
|
||
#include <cubos/engine/api.hpp> | ||
|
||
namespace cubos::engine | ||
{ | ||
/// @brief Component which stores the FXAA configuration for a render target. | ||
/// @ingroup render-tone-mapping-plugin | ||
struct CUBOS_ENGINE_API FXAA | ||
{ | ||
CUBOS_REFLECT; | ||
|
||
/// @brief Edge threshold's min value. | ||
float edgeThresholdMin = 0.0312F; | ||
|
||
/// @brief Edge threshold's max value. | ||
float edgeThresholdMax = 0.125F; | ||
|
||
/// @brief Subpixel quality value. | ||
float subpixelQuality = 0.75F; | ||
|
||
/// @brief Edges exploration iteration value. | ||
int iterations = 12; | ||
}; | ||
} // namespace cubos::engine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <cubos/core/ecs/reflection.hpp> | ||
#include <cubos/core/reflection/external/primitives.hpp> | ||
|
||
#include <cubos/engine/render/tone_mapping/fxaa.hpp> | ||
|
||
CUBOS_REFLECT_IMPL(cubos::engine::FXAA) | ||
{ | ||
return core::ecs::TypeBuilder<FXAA>("cubos::engine::FXAA") | ||
.withField("edgeThresholdMin", &FXAA::edgeThresholdMin) | ||
.withField("edgeThresholdMax", &FXAA::edgeThresholdMax) | ||
.withField("subpixelQuality", &FXAA::subpixelQuality) | ||
.withField("iterations", &FXAA::iterations) | ||
.build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters