13 Commits

Author SHA1 Message Date
daiqingshuang
5a8d62f841 Refactor Push Constants and Add Dual Stage Support
- Removed legacy push constant structures and functions for better clarity and maintainability.
- Introduced new `text_push_constants_t` structure for text rendering with optimized layout.
- Implemented dual stage push constant analysis to support separate layouts for vertex and fragment shaders.
- Added functions to generate push constant structures and fill functions based on shader reflection.
- Enhanced static checks for push constant layouts to ensure compatibility and correctness.
- Updated templates to accommodate new dual stage push constant generation.
- Added support detection for procedural vertex shaders based on push constant layout.
2025-12-25 21:04:39 +08:00
daiqingshuang
8172b4f7b9 feat: Add shader-based image and scrollbar widgets
- Introduced `imager_shader` class for rendering images with various scaling modes using GPU shaders.
- Implemented `scrollbar_shader` class for customizable scrollbar rendering with support for vertical and horizontal orientations.
- Added vertex structure template for automatic generation of vertex input structures based on shader reflection.
- Enhanced interaction capabilities for scrollbars, including drag-and-drop functionality and visibility management.
- Provided default styles and configuration options for both image and scrollbar widgets.
2025-12-25 15:28:38 +08:00
daiqingshuang
e3c2aab95b 重构计划和实例化渲染 2025-12-25 13:20:16 +08:00
bd8c71badd 放开push_constant限制,现在每个着色器可以更自由的配置布局 2025-12-25 03:37:50 +08:00
daiqingshuang
90830e427e 新的自定义着色器接口 2025-12-24 15:32:58 +08:00
9cbba518ec TODO 修复后效渲染Bug 2025-12-24 03:15:55 +08:00
d87c53336b Refactor rendering pipeline by removing post effect applicator
- Removed references to `post_effect_applicator` from `render_tree_executor.h`, `shared_render_resources.cpp`, and `shared_render_resources.h`.
- Eliminated `post_effect_command_t` and related functions from `render_collector.cpp` and `render_collector.h`.
- Deleted `post_process.h` and its associated implementation, simplifying the widget structure.
- Updated custom shader widgets to reflect changes in effect handling.
- Adjusted various widget classes to remove unused intrinsic size methods.
- Enhanced shader generation templates to include push constant base member information for better validation.
2025-12-24 01:35:24 +08:00
f91e55328d 添加着色器绑定代码使用方式检查 2025-12-23 23:19:01 +08:00
4d971ae533 优化着色器控件API,现在使用更加方便 2025-12-23 20:54:05 +08:00
daiqingshuang
358162415b feat: Add post-processing effects and canvas widget
- Implemented a fullscreen quad vertex shader for post-processing effects.
- Added a noise fragment shader to apply noise effects to textures.
- Created a vignette fragment shader for darkening corners of the screen.
- Developed a canvas widget to manage child widgets with anchor points and flexible sizing.
- Introduced an effect chain widget to apply multiple post-processing effects in sequence.
- Added overlay widget to position child widgets with alignment and padding options.
- Implemented a post effect widget to apply effects like blur, vignette, and color adjustments to child widgets.
- Provided convenience functions for easily applying common effects to widgets.
2025-11-27 09:52:00 +08:00
daiqingshuang
51ded97e48 feat: Refactor code generation tool to use Jinja2 templates
- Replaced string concatenation with Jinja2 templates for improved maintainability and readability.
- Added new template files for struct definitions, buffer helpers, and buffer manager.
- Introduced a template loader to manage Jinja2 rendering and custom filters.
- Updated the README and documentation to reflect the new template system.
- Added comprehensive tests to ensure output consistency with the previous implementation.
- Maintained full API compatibility with existing functions.
2025-11-22 15:39:08 +08:00
daiqingshuang
00eaad2d42 功能:添加 buffer 数据设置便捷功能,生成辅助函数、类型安全包装器和管理器类 2025-11-22 14:55:14 +08:00
daiqingshuang
a635b0464f 功能:实现着色器编译与反射信息提取
- 新增ShaderCompiler类,通过glslc工具实现GLSL到SPIR-V的编译。
- 实现构建glslc命令、运行编译器及从SPIR-V二进制文件提取反射数据的功能。
- 为SPIR-V指令集、装饰符、执行模型及存储类创建常量。
- 开发SPIR-V解析器以提取类型信息、变量细节及反射数据
- 引入类型映射函数实现SPIR-V类型到C++类型的转换,并计算std430内存布局
- 定义着色器元数据、编译结果及SPIR-V反射信息的数据类
- 添加着色器发现、分组及元数据加载的实用函数
2025-11-22 11:51:31 +08:00