HD-2D presentation look inspired by HD2DURP (DOF + bloom + pixel sampling). 更多...
#include <Hd2d.h>
Public 成员函数 | |
| Hd2dLook ()=default | |
| Hd 2 d look. | |
| void | setFocusDistance (float distance) |
| View-space focus plane distance (default 18). | |
| float | getFocusDistance () const |
| Returns the focus distance. | |
| void | setMaxBlur (float blurPx) |
| Max Gaussian blur radius in texels; 0 disables DOF (default 5). | |
| float | getMaxBlur () const |
| Returns the max blur. | |
| void | setFocusRange (float range) |
| Distance from focus where blur reaches the max (default 14). | |
| float | getFocusRange () const |
| Returns the focus range. | |
| void | setBloomIntensity (float intensity) |
| HDR bloom intensity (default 0.35). | |
| float | getBloomIntensity () const |
| Returns the bloom intensity. | |
| void | setBloomThreshold (float threshold) |
| HDR bloom threshold (default 1.2). | |
| float | getBloomThreshold () const |
| Returns the bloom threshold. | |
| void | apply (graphics::Camera3D *camera) const |
| Write DOF + bloom onto a Camera3D (render-thread). | |
| void | applyPixelSampler (graphics::Graphics *gfx, graphics::Texture *texture) const |
| Point-filter a texture for crisp pixel art (nearest / no mip). | |
静态 Public 成员函数 | |
| static Hd2dLook | miniature () |
| Strong miniature preset matching HD2DURP-style shallow DOF. | |
| static Hd2dLook | soft () |
| Mild look with light bloom and modest DOF. | |
详细描述
HD-2D presentation look inspired by HD2DURP (DOF + bloom + pixel sampling).
Applies camera post settings for the miniature look and nearest-neighbor filtering on sprite/terrain atlases. Depth-of-field needs Sprite3D masked cutout / DopFix depth writes so the focus plane can resolve.
构造及析构函数说明
◆ Hd2dLook()
|
default |
Hd 2 d look.
成员函数说明
◆ apply()
| void eve::hd2d::Hd2dLook::apply | ( | graphics::Camera3D * | camera | ) | const |
Write DOF + bloom onto a Camera3D (render-thread).
- 参数
-
camera Non-null active scene camera. @ownership camerais borrowed; Hd2dLook does not retain it. @lifetimecameramust remain valid only for this call.
在文件 Hd2dLook.cpp 第 43 行定义.
引用了 camera.
◆ applyPixelSampler()
| void eve::hd2d::Hd2dLook::applyPixelSampler | ( | graphics::Graphics * | gfx, |
| graphics::Texture * | texture | ||
| ) | const |
Point-filter a texture for crisp pixel art (nearest / no mip).
- 参数
-
gfx Active Graphics. texture Atlas or sprite sheet. @ownership gfxandtextureare borrowed; Hd2dLook does not retain them. @lifetime Both arguments must remain valid only for this call.
在文件 Hd2dLook.cpp 第 49 行定义.
◆ getBloomIntensity()
|
inline |
◆ getBloomThreshold()
|
inline |
◆ getFocusDistance()
|
inline |
◆ getFocusRange()
|
inline |
◆ getMaxBlur()
◆ miniature()
|
static |
Strong miniature preset matching HD2DURP-style shallow DOF.
在文件 Hd2dLook.cpp 第 55 行定义.
被这些函数引用 eve::hd2d::Hd2D::newMiniatureLook().
◆ setBloomIntensity()
| void eve::hd2d::Hd2dLook::setBloomIntensity | ( | float | intensity | ) |
HDR bloom intensity (default 0.35).
在文件 Hd2dLook.cpp 第 31 行定义.
◆ setBloomThreshold()
| void eve::hd2d::Hd2dLook::setBloomThreshold | ( | float | threshold | ) |
HDR bloom threshold (default 1.2).
在文件 Hd2dLook.cpp 第 37 行定义.
◆ setFocusDistance()
| void eve::hd2d::Hd2dLook::setFocusDistance | ( | float | distance | ) |
◆ setFocusRange()
| void eve::hd2d::Hd2dLook::setFocusRange | ( | float | range | ) |
◆ setMaxBlur()
| void eve::hd2d::Hd2dLook::setMaxBlur | ( | float | blurPx | ) |
Max Gaussian blur radius in texels; 0 disables DOF (default 5).
在文件 Hd2dLook.cpp 第 19 行定义.
◆ soft()
|
static |
Mild look with light bloom and modest DOF.
在文件 Hd2dLook.cpp 第 65 行定义.
该类的文档由以下文件生成:
- src/modules/hd2d/Hd2d.h
- src/modules/hd2d/Hd2dLook.cpp