载入中...
搜索中...
未找到
DepthPyramid.h
浏览该文件的文档.
1#pragma once
2
3#include <array>
4
5namespace eve::graphics {
6
7class Canvas;
8class Graphics;
9class Shader;
10class Texture;
11
14public:
16 explicit DepthPyramid(Graphics *gfx);
17
26 Texture *build(Texture *depth, int maxLevels = 8);
27
29 int getLevelCount() const { return levelCount_; }
31 int getSourceWidth() const { return sourceWidth_; }
33 int getSourceHeight() const { return sourceHeight_; }
34
35private:
36 static constexpr int kMaxLevels = 8;
37 void ensureTargets(int width, int height, int maxLevels);
38
39 Graphics *gfx_ = nullptr;
40 Shader *downsample_ = nullptr;
41 std::array<Canvas *, kMaxLevels> levels_{};
42 Canvas *atlas_ = nullptr;
43 int sourceWidth_ = 0;
44 int sourceHeight_ = 0;
45 int levelCount_ = 0;
46};
47
48} // namespace eve::graphics
std::uint32_t height
std::uint32_t width
std::uint32_t depth
Cross-backend min/max hardware-depth pyramid packed into one texture atlas.
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.
Texture * build(Texture *depth, int maxLevels=8)
Build the min/max hierarchy from a hardware depth texture.
Custom GPU program.
Definition Shader.h:39
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:18
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25