diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-10 17:27:34 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-10 17:27:34 +0100 |
| commit | e7cd4d65f9f55ccc14045cbcac9d61358ba0c2bf (patch) | |
| tree | c9365a3cb26953478a4bcaf684b7e2ec92442557 /workspaces/main/shaders/vignette.wgsl | |
| parent | 61104d5b9e1774c11f0dba3b6d6018dabc2bce8f (diff) | |
refactor: Factor WGPU boilerplate into builder pattern helpers
Add BindGroupLayoutBuilder, BindGroupBuilder, RenderPipelineBuilder,
and SamplerCache to reduce repetitive WGPU code. Refactor
post_process_helper, cnn_effect, and rotating_cube_effect.
Changes:
- Bind group creation: 19 instances, 14→4 lines each
- Pipeline creation: 30-50→8 lines
- Sampler deduplication: 6 instances → cached
- Total boilerplate reduction: -122 lines across 3 files
Builder pattern prevents binding index errors and consolidates
platform-specific #ifdef in fewer locations. Binary size unchanged
(6.3M debug). Tests pass.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'workspaces/main/shaders/vignette.wgsl')
0 files changed, 0 insertions, 0 deletions
