One stylized post-process pass bound to a style id (built-in or custom label). Draws a full-quad of the source texture through a style fragment shader. 更多...
#include <StylePass.h>
Public 成员函数 | |
| StylePass (const std::string &style, graphics::Shader *shader) | |
| ~StylePass ()=default | |
| StylePass (const StylePass &)=delete | |
| StylePass & | operator= (const StylePass &)=delete |
| std::string | getStyle () const |
| graphics::Shader * | getShader () const |
| bool | hasParam (const std::string &name) const |
| void | setFloat (const std::string &name, float value) |
| float | getFloat (const std::string &name) const |
| void | setTime (float seconds) |
| Advance time-driven knobs (watercolor warp / ink jitter). | |
| float | getTime () const |
| void | apply (graphics::Graphics *gfx, graphics::Texture *source) |
| Apply style into the currently bound canvas / screen. Automatically uploads texel size + screen size uniforms. | |
| void | applyCanvas (graphics::Graphics *gfx, graphics::Canvas *source) |
| void | applyTo (graphics::Graphics *gfx, graphics::Texture *source, graphics::Canvas *dest) |
| Apply into an explicit destination canvas (restores previous canvas bind). Preferred hook for chains / tooling that manage ping-pong targets. | |
| void | applyCanvasTo (graphics::Graphics *gfx, graphics::Canvas *source, graphics::Canvas *dest) |
详细描述
One stylized post-process pass bound to a style id (built-in or custom label). Draws a full-quad of the source texture through a style fragment shader.
Parameters use string names (engine convention — no enums). Future GBuffer-aware styles may read extra textures via Graphics bindings; this class stays the single entry for "run one NPR post step".
在文件 StylePass.h 第 22 行定义.
构造及析构函数说明
◆ StylePass() [1/2]
| eve::stylize::StylePass::StylePass | ( | const std::string & | style, |
| graphics::Shader * | shader | ||
| ) |
在文件 StylePass.cpp 第 13 行定义.
◆ ~StylePass()
|
default |
◆ StylePass() [2/2]
|
delete |
成员函数说明
◆ apply()
| void eve::stylize::StylePass::apply | ( | graphics::Graphics * | gfx, |
| graphics::Texture * | source | ||
| ) |
Apply style into the currently bound canvas / screen. Automatically uploads texel size + screen size uniforms.
在文件 StylePass.cpp 第 53 行定义.
引用了 eve::graphics::Graphics::drawTexturedRectShader(), eve::graphics::Graphics::getCanvas(), eve::graphics::Graphics::getHeight(), eve::graphics::Texture::getHeight(), eve::graphics::Canvas::getHeight(), eve::graphics::Graphics::getWidth(), eve::graphics::Texture::getWidth(), eve::graphics::Canvas::getWidth(), h, hasParam(), setFloat() , 以及 w.
被这些函数引用 applyCanvas() , 以及 applyTo().
◆ applyCanvas()
| void eve::stylize::StylePass::applyCanvas | ( | graphics::Graphics * | gfx, |
| graphics::Canvas * | source | ||
| ) |
在文件 StylePass.cpp 第 78 行定义.
引用了 apply() , 以及 eve::graphics::Canvas::getTexture().
◆ applyCanvasTo()
| void eve::stylize::StylePass::applyCanvasTo | ( | graphics::Graphics * | gfx, |
| graphics::Canvas * | source, | ||
| graphics::Canvas * | dest | ||
| ) |
在文件 StylePass.cpp 第 95 行定义.
引用了 applyTo() , 以及 eve::graphics::Canvas::getTexture().
◆ applyTo()
| void eve::stylize::StylePass::applyTo | ( | graphics::Graphics * | gfx, |
| graphics::Texture * | source, | ||
| graphics::Canvas * | dest | ||
| ) |
Apply into an explicit destination canvas (restores previous canvas bind). Preferred hook for chains / tooling that manage ping-pong targets.
在文件 StylePass.cpp 第 85 行定义.
引用了 apply(), eve::graphics::Graphics::getCanvas() , 以及 eve::graphics::Graphics::setCanvas().
被这些函数引用 applyCanvasTo().
◆ getFloat()
| float eve::stylize::StylePass::getFloat | ( | const std::string & | name | ) | const |
在文件 StylePass.cpp 第 27 行定义.
引用了 eve::graphics::Shader::getFromVar(), name , 以及 v.
被这些函数引用 getTime().
◆ getShader()
|
inline |
在文件 StylePass.h 第 31 行定义.
◆ getStyle()
|
inline |
在文件 StylePass.h 第 30 行定义.
◆ getTime()
| float eve::stylize::StylePass::getTime | ( | ) | const |
在文件 StylePass.cpp 第 39 行定义.
引用了 getFloat() , 以及 hasParam().
◆ hasParam()
| bool eve::stylize::StylePass::hasParam | ( | const std::string & | name | ) | const |
在文件 StylePass.cpp 第 18 行定义.
引用了 eve::graphics::Shader::hasUniform() , 以及 name.
◆ operator=()
◆ setFloat()
| void eve::stylize::StylePass::setFloat | ( | const std::string & | name, |
| float | value | ||
| ) |
在文件 StylePass.cpp 第 22 行定义.
引用了 name, eve::graphics::Shader::sendFloat() , 以及 value.
◆ setTime()
| void eve::stylize::StylePass::setTime | ( | float | seconds | ) |
Advance time-driven knobs (watercolor warp / ink jitter).
在文件 StylePass.cpp 第 35 行定义.
引用了 hasParam() , 以及 setFloat().
该类的文档由以下文件生成:
- src/modules/stylize/StylePass.h
- src/modules/stylize/StylePass.cpp