summaryrefslogtreecommitdiff
path: root/doc/MASKING_SYSTEM.md
AgeCommit message (Collapse)Author
25 hoursdocs: Simplify all design docs (50% reduction, 1687 lines removed)skal
Consolidated and streamlined all documentation: **Merged:** - PROCEDURAL.md → deleted (content in ASSET_SYSTEM.md) - FETCH_DEPS.md → BUILD.md (dependencies section) **Simplified (line reductions):** - HOWTO.md: 468→219 (53%) - CONTRIBUTING.md: 453→173 (62%) - SPECTRAL_BRUSH_EDITOR.md: 497→195 (61%) - SEQUENCE.md: 355→197 (45%) - CONTEXT_MAINTENANCE.md: 332→200 (40%) - test_demo_README.md: 273→122 (55%) - ASSET_SYSTEM.md: 271→108 (60%) - MASKING_SYSTEM.md: 240→125 (48%) - 3D.md: 196→118 (40%) - TRACKER.md: 124→76 (39%) - SCENE_FORMAT.md: 59→49 (17%) - BUILD.md: 83→69 (17%) **Total:** 3344→1657 lines (50.4% reduction) **Changes:** - Removed verbose examples, redundant explanations, unimplemented features - Moved detailed task plans to TODO.md (single source of truth) - Consolidated coding style rules - Kept essential APIs, syntax references, technical details **PROJECT_CONTEXT.md:** - Added "Design Docs Quick Reference" with 2-3 line summaries - Removed duplicate task entries - All design docs now loaded on-demand via Read tool Result: Context memory files reduced from 31.6k to ~15k tokens.
39 hoursfeat(gpu): Add auxiliary texture masking systemskal
Implements MainSequence auxiliary texture registry to support inter-effect texture sharing within a single frame. Primary use case: screen-space partitioning where multiple effects render to complementary regions. Architecture: - MainSequence::register_auxiliary_texture(name, width, height) Creates named texture that persists for entire frame - MainSequence::get_auxiliary_view(name) Retrieves texture view for reading/writing Use case example: - Effect1: Generate mask (1 = Effect1 region, 0 = Effect2 region) - Effect1: Render scene A where mask = 1 - Effect2: Reuse mask, render scene B where mask = 0 - Result: Both scenes composited to same framebuffer Implementation details: - Added std::map<std::string, AuxiliaryTexture> to MainSequence - Texture lifecycle managed by MainSequence (create/resize/shutdown) - Memory impact: ~4-8 MB per mask (acceptable for 2-3 masks) - Size impact: ~100 lines (~500 bytes code) Changes: - src/gpu/effect.h: Added auxiliary texture registry API - src/gpu/effect.cc: Implemented registry with FATAL_CHECK validation - doc/MASKING_SYSTEM.md: Complete architecture documentation - doc/HOWTO.md: Added auxiliary texture usage example Also fixed: - test_demo_effects.cc: Corrected EXPECTED_POST_PROCESS_COUNT (9→8) Pre-existing bug: DistortEffect was counted but not tested Testing: - All 33 tests pass (100%) - No functional changes to existing effects - Zero regressions See doc/MASKING_SYSTEM.md for detailed design rationale and examples.