载入中...
搜索中...
未找到
Outline.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <string>
6
7namespace eve::graphics {
8
9class Canvas;
10class Graphics;
11class Shader;
12class Texture;
13
34public:
36 explicit Outline(Graphics *gfx);
39
40 Outline(const Outline &) = delete;
41 Outline &operator=(const Outline &) = delete;
42
44 void setColor(float r, float g, float b);
46 float getColorR() const;
48 float getColorG() const;
50 float getColorB() const;
51
53 void setWidth(float width);
55 float getWidth() const;
56
58 void setDepthThreshold(float threshold);
60 float getDepthThreshold() const;
61
63 void setDepthSensitivity(float sensitivity);
65 float getDepthSensitivity() const;
66
68 void setNormalThreshold(float threshold);
70 float getNormalThreshold() const;
71
73 void setSoftness(float softness);
75 float getSoftness() const;
76
78 void setClip(float nearZ, float farZ);
79
81 bool hasParam(const std::string &name) const;
83 void setFloat(const std::string &name, float value);
85 float getFloat(const std::string &name) const;
86
93 bool apply(Graphics *gfx, Texture *hwDepth, Texture *worldNormal);
95 bool applyTo(Graphics *gfx, Texture *hwDepth, Texture *worldNormal, Canvas *dest);
96
98 Shader *getShader() const { return shader_; }
99
100private:
101 void uploadCommon(Graphics *gfx, Texture *hwDepth);
102
103 Graphics *gfx_ = nullptr;
104 Shader *shader_ = nullptr;
105 float nearZ_ = 0.1f;
106 float farZ_ = 100.f;
107 float colorR_ = 0.05f;
108 float colorG_ = 0.04f;
109 float colorB_ = 0.07f;
110 float width_ = 1.f;
111 float depthThreshold_ = 0.3f;
112 float depthSensitivity_ = 0.f;
113 float normalThreshold_ = 0.35f;
114 float softness_ = 0.15f;
115};
116
117} // namespace eve::graphics
double value
#define EVENGINE_API_BACKENDS
Definition Export.h:108
tensor::Graph g
Definition GpuGraph.cpp:7
double r
std::uint32_t width
std::string name
MeleePoint3 b
Definition MeleeHit.cpp:41
Canvas public API.
Definition Canvas.h:17
Screen-space model outline (t3ssel8r-style), computed from the GBuffer hardware depth + world-normal ...
Definition Outline.h:33
Outline(const Outline &)=delete
Shader * getShader() const
Returns the shader.
Definition Outline.h:98
Outline & operator=(const Outline &)=delete
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