summaryrefslogtreecommitdiff
path: root/doc/CODING_STYLE.md
AgeCommit message (Collapse)Author
12 daysfix: use ShaderComposer in RotatingCube; add rule to CODING_STYLEskal
rotating_cube_effect.cc was bypassing ShaderComposer, causing #include directives in rotating_cube.wgsl to fail at runtime. handoff(Claude): ShaderComposer rule documented and enforced in rotating_cube. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 daysstyle: require 2-line header comment in all .wgsl filesskal
Add rule to CODING_STYLE.md and apply to ntsc.wgsl. handoff(Claude): rule added, ntsc.wgsl patched; scratch_lines and color_c64 already compliant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05docs: add control flow braces rule to coding styleskal
2026-02-21refactor(wgsl): Use vec*f alias for vector typesskal
Replaces all instances of `vec<f32>` with the more concise `vec*f` alias (e.g., `vec3f`) across all `.wgsl` shaders. This improves readability and aligns with common graphics programming conventions. Also adds a new coding style rule to `doc/CODING_STYLE.md` to enforce this standard going forward. Finally, this commit fixes a build error in `test_effect_base.cc` by replacing a call to the non-existent `wgpuDeviceTick` with `wgpuDevicePoll`, which resolves the test failure.
2026-02-17docs(style): Add rule for WGPU object initializationskal
2026-02-17refactor: centralize platform-specific code in gpu.hskal
Move platform-specific type definitions to gpu.h and establish coding rule that platform ifdefs must be confined to gpu/platform layers. - gpu.h: add GpuTextureCopyInfo, GpuTextureDataLayout type aliases - effect.cc: use GpuTextureCopyInfo instead of platform ifdefs - texture_manager.cc: use type aliases and label_view() helper - CODING_STYLE.md: add platform-specific code section with rule Tests: 34/34 passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14feat(gpu): add two-pass raymarching infrastructureskal
Add RayMarchResult struct and functions for deferred SDF rendering: - rayMarchWithID() tracks object ID and distance_max - reconstructPosition(), normalWithID(), shadowWithStoredDistance() - Pass 1: store geometry data, Pass 2: reuse for shading Add WGSL style rule: prefer return values over pointers for small structs (≤16 bytes). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09docs: Condense essential context files (856→599 lines)skal
Extract detailed examples and untriaged tasks to on-demand docs. Created BACKLOG.md, ARCHITECTURE.md, CODING_STYLE.md, TOOLS_REFERENCE.md. Reduces always-loaded token budget by 30% while preserving all information. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>