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) | |
| Style pass. | |
| ~StylePass ()=default | |
| Style pass. | |
| StylePass (const StylePass &)=delete | |
| StylePass & | operator= (const StylePass &)=delete |
| std::string | getStyle () const |
| Returns the style. | |
| graphics::Shader * | getShader () const |
| Returns the shader. | |
| std::string | getStage () const |
| Returns the stage. | |
| int | getPriority () const |
| Returns the priority. | |
| void | setPriority (int priority) |
| Sets the priority. | |
| bool | requiresInput (const std::string &input) const |
| Requires input. | |
| bool | hasParam (const std::string &name) const |
| True when param. | |
| void | setFloat (const std::string &name, float value) |
| Sets the float. | |
| float | getFloat (const std::string &name) const |
| Returns the float. | |
| void | setTime (float seconds) |
| Advance time-driven knobs (watercolor warp / ink jitter). | |
| float | getTime () const |
| Returns the time. | |
| 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) |
| Applies canvas. | |
| 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) |
| Applies canvas to. | |
详细描述
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 第 26 行定义.
构造及析构函数说明
◆ StylePass() [1/2]
| eve::stylize::StylePass::StylePass | ( | const std::string & | style, |
| graphics::Shader * | shader | ||
| ) |
◆ ~StylePass()
|
default |
Style pass.
◆ 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 第 71 行定义.
引用了 eve::graphics::Graphics::drawTexturedRectShader(), eve::graphics::Graphics::getCanvas(), eve::graphics::Graphics::getHeight(), eve::graphics::Canvas::getHeight(), eve::graphics::Graphics::getWidth(), eve::graphics::Canvas::getWidth(), h, hasParam(), setFloat(), source , 以及 w.
被这些函数引用 applyCanvas() , 以及 applyTo().
◆ applyCanvas()
| void eve::stylize::StylePass::applyCanvas | ( | graphics::Graphics * | gfx, |
| graphics::Canvas * | source | ||
| ) |
◆ applyCanvasTo()
| void eve::stylize::StylePass::applyCanvasTo | ( | graphics::Graphics * | gfx, |
| graphics::Canvas * | source, | ||
| graphics::Canvas * | dest | ||
| ) |
◆ 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 第 103 行定义.
引用了 apply(), eve::graphics::Graphics::getCanvas(), eve::graphics::Graphics::setCanvas() , 以及 source.
被这些函数引用 applyCanvasTo().
◆ getFloat()
| float eve::stylize::StylePass::getFloat | ( | const std::string & | name | ) | const |
Returns the float.
在文件 StylePass.cpp 第 45 行定义.
引用了 eve::graphics::Shader::getFromVar(), name , 以及 v.
被这些函数引用 getTime().
◆ getPriority()
|
inline |
Returns the priority.
在文件 StylePass.h 第 43 行定义.
◆ getShader()
|
inline |
Returns the shader.
在文件 StylePass.h 第 39 行定义.
◆ getStage()
| std::string eve::stylize::StylePass::getStage | ( | ) | const |
Returns the stage.
在文件 StylePass.cpp 第 25 行定义.
引用了 eve::graphics::postEffectStageName() , 以及 eve::graphics::PostEffectDesc::stage.
◆ getStyle()
|
inline |
Returns the style.
在文件 StylePass.h 第 37 行定义.
◆ getTime()
| float eve::stylize::StylePass::getTime | ( | ) | const |
◆ hasParam()
| bool eve::stylize::StylePass::hasParam | ( | const std::string & | name | ) | const |
◆ operator=()
◆ requiresInput()
| bool eve::stylize::StylePass::requiresInput | ( | const std::string & | input | ) | const |
◆ setFloat()
| void eve::stylize::StylePass::setFloat | ( | const std::string & | name, |
| float | value | ||
| ) |
Sets the float.
在文件 StylePass.cpp 第 40 行定义.
引用了 name, eve::graphics::Shader::sendFloat() , 以及 value.
◆ setPriority()
|
inline |
◆ setTime()
| void eve::stylize::StylePass::setTime | ( | float | seconds | ) |
Advance time-driven knobs (watercolor warp / ink jitter).
在文件 StylePass.cpp 第 53 行定义.
引用了 hasParam() , 以及 setFloat().
该类的文档由以下文件生成:
- src/modules/stylize/StylePass.h
- src/modules/stylize/StylePass.cpp