Cross-backend min/max hardware-depth pyramid packed into one texture atlas. 更多...
#include <DepthPyramid.h>
Public 成员函数 | |
| DepthPyramid (Graphics *gfx) | |
| Create the depth reduction shader. | |
| Texture * | build (Texture *depth, int maxLevels=8) |
| Build the min/max hierarchy from a hardware depth texture. | |
| int | getLevelCount () const |
| Number of valid levels in the last build. | |
| int | getSourceWidth () const |
| Source depth width represented by level zero. | |
| int | getSourceHeight () const |
| Source depth height represented by level zero. | |
详细描述
Cross-backend min/max hardware-depth pyramid packed into one texture atlas.
在文件 DepthPyramid.h 第 13 行定义.
构造及析构函数说明
◆ DepthPyramid()
|
explicit |
Create the depth reduction shader.
在文件 DepthPyramid.cpp 第 26 行定义.
引用了 eve::graphics::Shader::declareFloat(), eve::graphics::Graphics::getBackendName(), eve::graphics::Shader::gpuHandle, eve::graphics::shaders::kDepthPyramidDownsample, eve::graphics::shaders::kPostCommon, eve::graphics::Graphics::newShaderFromSpv() , 以及 eve::graphics::Graphics::newShaderFromWgsl().
成员函数说明
◆ build()
Build the min/max hierarchy from a hardware depth texture.
- 参数
-
depth Hardware depth source, near=0 and far=1. maxLevels Maximum hierarchy levels to build for the active quality budget.
- 返回
- RG min/max depth atlas; level zero starts at x=0 and each lower level is packed directly to the right of its predecessor. @lifetime The returned texture is owned by this DepthPyramid until the next target resize.
在文件 DepthPyramid.cpp 第 75 行定义.
引用了 eve::graphics::Canvas::clear(), depth, eve::graphics::Graphics::drawTexturedRectShaderUV(), eve::graphics::Graphics::getCanvas(), eve::graphics::Canvas::getTexture(), input, level, offsetX, eve::Opaque, eve::graphics::Shader::sendFloat(), eve::graphics::Graphics::setCanvas(), source , 以及 target.
◆ getLevelCount()
|
inline |
Number of valid levels in the last build.
在文件 DepthPyramid.h 第 29 行定义.
◆ getSourceHeight()
|
inline |
Source depth height represented by level zero.
在文件 DepthPyramid.h 第 33 行定义.
◆ getSourceWidth()
|
inline |
Source depth width represented by level zero.
在文件 DepthPyramid.h 第 31 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/DepthPyramid.h
- src/modules/graphics/DepthPyramid.cpp