Stylized / NPR rendering module — stable public surface for future expansion. 更多...
#include <Stylize.h>
Public 成员函数 | |
| Module_REG (Stylize) | |
| Stylize ()=default | |
| ~Stylize () override=default | |
| int | getStyleCount () const |
| std::string | getStyleId (int index) const |
| bool | hasStyle (const std::string &style) const |
| bool | hasMeshStyle (const std::string &style) const |
| bool | supports (const std::string &style, const std::string &feature) const |
| Feature query. Known features: "post" — StylePass / newPostShader "mesh" — newMeshShader "cpu" — processImage "gbuffer" — reserved for depth/normal inputs (always false for now) | |
| int | getStyleParamCount (const std::string &style) const |
| Introspect built-in post param names (empty for unknown / custom-only ids). | |
| std::string | getStyleParamName (const std::string &style, int index) const |
| StylePass * | newPass (graphics::Graphics *gfx, const std::string &style) |
| Post-process StylePass (shader owned by Graphics). | |
| StylePass * | newPassFromShader (const std::string &styleId, graphics::Shader *shader) |
Wrap an already-created post Shader (custom SPIR-V / future registered styles). styleId is a label only; capability tables are not updated. Shader must already declare its float uniforms. | |
| StyleChain * | newChain () |
| graphics::Shader * | newPostShader (graphics::Graphics *gfx, const std::string &style) |
| Raw post Shader with defaults (owned by Graphics). | |
| graphics::Shader * | newMeshShader (graphics::Graphics *gfx, const std::string &style) |
| Mesh3D Shader for cartoon/ink (owned by Graphics). | |
| image::ImageData * | processImage (image::ImageData *src, const std::string &style) |
| CPU fallback stylization for ImageData (RGBA8). Caller owns returned ImageData*. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
详细描述
Stylized / NPR rendering module — stable public surface for future expansion.
Built-in style ids (string, no enums):
- "cartoon" — cel post (+ mesh)
- "watercolor" — paper / bleed post
- "ink" — ink-wash post (+ mesh)
- "pixel" — pixel-art post
Extension points (keep these stable):
- newPass / newPassFromShader — wrap built-in or custom SPIR-V post shaders
- newMeshShader — object-space variants (cartoon/ink today)
- StyleChain — multi-pass ping-pong (separable blur, outline+shade, …)
- supports(style, feature) — "post" | "mesh" | "cpu" | "gbuffer" ("gbuffer" reserved: depth/normal-aware outline; currently always false)
- getStyleParam* — introspect push-constant knobs for tooling / UI
Script: stylize <- eve.Stylize();
构造及析构函数说明
◆ Stylize()
|
default |
◆ ~Stylize()
|
overridedefault |
成员函数说明
◆ getStyleCount()
| int eve::stylize::Stylize::getStyleCount | ( | ) | const |
在文件 Stylize.cpp 第 17 行定义.
◆ getStyleId()
| std::string eve::stylize::Stylize::getStyleId | ( | int | index | ) | const |
在文件 Stylize.cpp 第 19 行定义.
◆ getStyleParamCount()
| int eve::stylize::Stylize::getStyleParamCount | ( | const std::string & | style | ) | const |
Introspect built-in post param names (empty for unknown / custom-only ids).
在文件 Stylize.cpp 第 31 行定义.
◆ getStyleParamName()
| std::string eve::stylize::Stylize::getStyleParamName | ( | const std::string & | style, |
| int | index | ||
| ) | const |
在文件 Stylize.cpp 第 35 行定义.
◆ hasMeshStyle()
| bool eve::stylize::Stylize::hasMeshStyle | ( | const std::string & | style | ) | const |
在文件 Stylize.cpp 第 23 行定义.
◆ hasStyle()
| bool eve::stylize::Stylize::hasStyle | ( | const std::string & | style | ) | const |
◆ Module_REG()
| eve::stylize::Stylize::Module_REG | ( | Stylize | ) |
◆ newChain()
| StyleChain * eve::stylize::Stylize::newChain | ( | ) |
Empty multi-pass chain (caller adds StylePass*).
在文件 Stylize.cpp 第 49 行定义.
◆ newMeshShader()
| graphics::Shader * eve::stylize::Stylize::newMeshShader | ( | graphics::Graphics * | gfx, |
| const std::string & | style | ||
| ) |
Mesh3D Shader for cartoon/ink (owned by Graphics).
在文件 Stylize.cpp 第 55 行定义.
◆ newPass()
| StylePass * eve::stylize::Stylize::newPass | ( | graphics::Graphics * | gfx, |
| const std::string & | style | ||
| ) |
Post-process StylePass (shader owned by Graphics).
在文件 Stylize.cpp 第 39 行定义.
◆ newPassFromShader()
| StylePass * eve::stylize::Stylize::newPassFromShader | ( | const std::string & | styleId, |
| graphics::Shader * | shader | ||
| ) |
Wrap an already-created post Shader (custom SPIR-V / future registered styles). styleId is a label only; capability tables are not updated. Shader must already declare its float uniforms.
在文件 Stylize.cpp 第 44 行定义.
引用了 shader.
◆ newPostShader()
| graphics::Shader * eve::stylize::Stylize::newPostShader | ( | graphics::Graphics * | gfx, |
| const std::string & | style | ||
| ) |
Raw post Shader with defaults (owned by Graphics).
在文件 Stylize.cpp 第 51 行定义.
◆ processImage()
| image::ImageData * eve::stylize::Stylize::processImage | ( | image::ImageData * | src, |
| const std::string & | style | ||
| ) |
CPU fallback stylization for ImageData (RGBA8). Caller owns returned ImageData*.
在文件 Stylize.cpp 第 59 行定义.
引用了 hasStyle() , 以及 eve::stylize::processImageCpu().
◆ supports()
| bool eve::stylize::Stylize::supports | ( | const std::string & | style, |
| const std::string & | feature | ||
| ) | const |
Feature query. Known features: "post" — StylePass / newPostShader "mesh" — newMeshShader "cpu" — processImage "gbuffer" — reserved for depth/normal inputs (always false for now)
在文件 Stylize.cpp 第 27 行定义.
该类的文档由以下文件生成:
- src/modules/stylize/Stylize.h
- src/modules/stylize/Stylize.cpp
Public 成员函数 继承自