summaryrefslogtreecommitdiff
path: root/src/shaders
AgeCommit message (Collapse)Author
12 daysfactorize render_ntsc()skal
12 daysfix(effects): particle sync and heptagon SDF bugsskal
- particles: stagger respawn y by golden-ratio index offset to break per-row synchronization (100 particles per row fell in lock-step) - heptagon: fix swapped atan2(x,y)->atan2(y,x) and WGSL % truncation for negative angles (broke SDF for entire lower half of shape) handoff(Gemini): heptagon now correct; particles desynchronized Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 dayschange dither_c64() signature to take 'dimension' directlyskal
12 daysntsc: factor common code into snippet; add RGB and YIQ input variantsskal
- Extract shared NTSC logic into render/ntsc_common.wgsl snippet - sample_ntsc_signal() hook decouples input format from processing - ntsc_rgb.wgsl: RGB input (converts via rgba_to_luma_chroma_phase) - ntsc_yiq.wgsl: YIQ passthrough for RotatingCube output - Add NtscYiq WgslEffect thin wrapper; register both in tests handoff(Claude): NTSC refactor complete; NtscYiq ready for timeline use with RotatingCube. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 daysrotating_cube: use VSOut, and store to yiqskal
13 daysNTSC: use 6-taps filtering instead of 12-tapskal
14 daysrefactor: mv get_border_col() to color_c64.wgsl as get_border_c64()skal
14 daysrefactor: extract YIQ and C64 dither to common WGSL shadersskal
- math/color.wgsl: add rgba_to_yiqa, yiqa_to_rgba, rgba_to_luma_chroma_phase - math/color_c64.wgsl: new file with C64 palette, Bayer 8x8, Dither() - ntsc.wgsl: include both, remove local duplicates; Dither() now takes xsize/ysize handoff(Claude): YIQ/dither helpers now reusable by other effects
2026-03-08ntsc effect for realskal
2026-03-08feat: extend debug_print with full ASCII and debug_str()skal
- Replace _dbg_pixel() with _dbg_char(ascii, r, c) covering printable ASCII 0x20-0x7E (95 glyphs, C64-style 8x8 bitmaps) - Update debug_f32() to use ASCII codes directly - Add debug_str(col, pos, origin, s: vec4u, len) for rendering up to 16 chars packed 4-per-u32 big-endian handoff(Claude): debug_print now supports full ASCII strings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08feat: add WGSL debug_f32() snippet with C64 8x8 fontskal
Renders a f32 value (±999.999, 3 decimal digits) at a given screen position using authentic C64 8x8 bitmap glyphs in yellow. Usage: col = debug_f32(col, pos.xy, vec2f(10.0, 10.0), value); Include: #include "debug/debug_print" handoff(Gemini): new snippet at src/shaders/debug/debug_print.wgsl Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08fix(shaders): enforce y-up screen-space convention + document coordinate ↵skal
conventions - Add textureSampleYUp() helper to fullscreen_uv_vs.wgsl to correct y-flip when sampling WebGPU textures with y-up UV coordinates - Use textureSampleYUp() in passthrough, gaussian_blur, combined_postprocess - Fix skybox.wgsl: remove erroneous (1.0 - uv.y) flip (double-flip bug) - Document world/view/screen conventions in doc/3D.md, camera_common.wgsl, and fullscreen_uv_vs.wgsl Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06feat(effects): add Scratch post-process effect with reusable scratch_lines ↵skal
snippet - src/shaders/render/scratch_lines.wgsl: reusable WGSL snippet registered as "render/scratch_lines"; call scratch_lines(uv, resolution, time)->f32 from any effect. Uses hash_1f from math/noise; 8 lines/frame, ~24fps flicker. - src/effects/scratch.{wgsl,h,cc}: thin Scratch effect wrapping the snippet. - Applied to "intro" and "rotating_cube" sequences as the final step. - 35/35 tests passing. handoff(Gemini): Scratch effect added. render/scratch_lines snippet is reusable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28refactor: move common/shaders/ to src/shaders/skal
Relocates shared WGSL shaders under src/ where all source code lives, eliminating the top-level common/ directory. - Update asset references in workspaces/main/assets.txt and workspaces/test/assets.txt - Update docs: PROJECT_CONTEXT.md, ARCHITECTURE.md, WORKSPACE_SYSTEM.md, SHADER_REUSE_INVESTIGATION.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>