Classic image-space anti-aliasing. 更多...
#include <AntiAliasing.h>
Public 成员函数 | |
| AntiAliasing (Graphics *gfx) | |
| ~AntiAliasing () | |
| AntiAliasing (const AntiAliasing &)=delete | |
| AntiAliasing & | operator= (const AntiAliasing &)=delete |
| void | setQuality (const std::string &quality) |
| "low" | "medium" | "high" (unknown → medium). | |
| std::string | getQuality () const |
| void | setMode (const std::string &mode) |
| "fxaa" | "smaa" | "ssaa" | "nfaa" (unknown → fxaa). | |
| std::string | getMode () const |
| bool | hasParam (const std::string &name) const |
| void | setFloat (const std::string &name, float value) |
| float | getFloat (const std::string &name) const |
| float | suggestScale () const |
| Suggested supersample scale for the active quality when using "ssaa" (2 for low/medium, 4 for high). Callers create the source Canvas at destSize * suggestScale(). | |
| int | resolutionFor (int destSize) const |
| void | apply (Graphics *gfx, Texture *source) |
Apply current mode to source, writing into the currently bound canvas / screen. Uploads texelW/texelH from the source size. | |
| void | applyTo (Graphics *gfx, Texture *source, Canvas *dest) |
| void | applyCanvas (Graphics *gfx, Canvas *source) |
| void | applyCanvasTo (Graphics *gfx, Canvas *source, Canvas *dest) |
| void | prepareSource (Texture *source) |
Upload texel uniforms from source without drawing (3D scene-color resolve). | |
| Shader * | getFxaaShader () const |
| Shader * | getSmaaShader () const |
| Shader * | getSsaaShader () const |
| Shader * | getNfaaShader () const |
| Shader * | getShader () const |
详细描述
Classic image-space anti-aliasing.
Modes:
- "fxaa" — FXAA 3.11-style luminance edge search + subpixel blend
- "smaa" — SMAA-inspired single-pass morphological AA (fits 1×MainTex post path)
- "ssaa" — supersample resolve (box / tent / Gaussian); render into a larger Canvas first
- "nfaa" — Normal Filter AA (blur along luma-gradient tangent)
Quality presets ("low" | "medium" | "high") tune thresholds / search / kernel radius. Workflow: render scene → Canvas → aa.apply / aa.applyTo → screen or next post.
在文件 AntiAliasing.h 第 24 行定义.
构造及析构函数说明
◆ AntiAliasing() [1/2]
|
explicit |
在文件 AntiAliasing.cpp 第 105 行定义.
◆ ~AntiAliasing()
|
default |
◆ AntiAliasing() [2/2]
|
delete |
成员函数说明
◆ apply()
Apply current mode to source, writing into the currently bound canvas / screen. Uploads texelW/texelH from the source size.
在文件 AntiAliasing.cpp 第 255 行定义.
被这些函数引用 applyCanvas() , 以及 applyTo().
◆ applyCanvas()
在文件 AntiAliasing.cpp 第 268 行定义.
引用了 apply() , 以及 eve::graphics::Canvas::getTexture().
◆ applyCanvasTo()
在文件 AntiAliasing.cpp 第 275 行定义.
引用了 applyTo() , 以及 eve::graphics::Canvas::getTexture().
◆ applyTo()
在文件 AntiAliasing.cpp 第 259 行定义.
引用了 apply(), eve::graphics::Graphics::getCanvas() , 以及 eve::graphics::Graphics::setCanvas().
被这些函数引用 applyCanvasTo().
◆ getFloat()
| float eve::graphics::AntiAliasing::getFloat | ( | const std::string & | name | ) | const |
在文件 AntiAliasing.cpp 第 203 行定义.
引用了 eve::graphics::Shader::getFromVar(), name , 以及 v.
◆ getFxaaShader()
|
inline |
在文件 AntiAliasing.h 第 67 行定义.
◆ getMode()
|
inline |
在文件 AntiAliasing.h 第 38 行定义.
◆ getNfaaShader()
|
inline |
在文件 AntiAliasing.h 第 70 行定义.
◆ getQuality()
|
inline |
在文件 AntiAliasing.h 第 34 行定义.
◆ getShader()
| Shader * eve::graphics::AntiAliasing::getShader | ( | ) | const |
在文件 AntiAliasing.cpp 第 190 行定义.
被这些函数引用 eve::graphics::Graphics::prepareSceneColorResolveShader().
◆ getSmaaShader()
|
inline |
在文件 AntiAliasing.h 第 68 行定义.
◆ getSsaaShader()
|
inline |
在文件 AntiAliasing.h 第 69 行定义.
◆ hasParam()
| bool eve::graphics::AntiAliasing::hasParam | ( | const std::string & | name | ) | const |
在文件 AntiAliasing.cpp 第 192 行定义.
引用了 eve::graphics::Shader::hasUniform() , 以及 name.
◆ operator=()
|
delete |
◆ prepareSource()
| void eve::graphics::AntiAliasing::prepareSource | ( | Texture * | source | ) |
Upload texel uniforms from source without drawing (3D scene-color resolve).
在文件 AntiAliasing.cpp 第 253 行定义.
被这些函数引用 eve::graphics::Graphics::prepareSceneColorResolveShader().
◆ resolutionFor()
| int eve::graphics::AntiAliasing::resolutionFor | ( | int | destSize | ) | const |
Source pixel count helper: floor(dest * suggestScale()), at least 1.
在文件 AntiAliasing.cpp 第 218 行定义.
引用了 s , 以及 suggestScale().
◆ setFloat()
| void eve::graphics::AntiAliasing::setFloat | ( | const std::string & | name, |
| float | value | ||
| ) |
在文件 AntiAliasing.cpp 第 197 行定义.
引用了 name, eve::graphics::Shader::sendFloat() , 以及 value.
被这些函数引用 eve::graphics::Graphics::prepareSceneColorResolveShader().
◆ setMode()
| void eve::graphics::AntiAliasing::setMode | ( | const std::string & | mode | ) |
"fxaa" | "smaa" | "ssaa" | "nfaa" (unknown → fxaa).
在文件 AntiAliasing.cpp 第 176 行定义.
被这些函数引用 eve::graphics::Graphics::prepareSceneColorResolveShader().
◆ setQuality()
| void eve::graphics::AntiAliasing::setQuality | ( | const std::string & | quality | ) |
"low" | "medium" | "high" (unknown → medium).
在文件 AntiAliasing.cpp 第 168 行定义.
被这些函数引用 eve::graphics::Graphics::prepareSceneColorResolveShader().
◆ suggestScale()
| float eve::graphics::AntiAliasing::suggestScale | ( | ) | const |
Suggested supersample scale for the active quality when using "ssaa" (2 for low/medium, 4 for high). Callers create the source Canvas at destSize * suggestScale().
在文件 AntiAliasing.cpp 第 212 行定义.
被这些函数引用 resolutionFor().
该类的文档由以下文件生成:
- src/modules/graphics/AntiAliasing.h
- src/modules/graphics/AntiAliasing.cpp