summaryrefslogtreecommitdiff
path: root/doc/EFFECT_WORKFLOW.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-14 19:05:34 +0100
committerskal <pascal.massimino@gmail.com>2026-02-14 19:05:34 +0100
commitb8d4a815453acac752c6fb3c56d047e39a76fd05 (patch)
treee8b49ac34aed2b5cfbdbdc4a4c99903fbd709cef /doc/EFFECT_WORKFLOW.md
parent57aeae226617dbce364716f2d4e7c4aaa6271c1d (diff)
feat(gpu): add SDF camera infrastructure and effect base class
Add unified camera system for SDF raymarching effects: - CameraParams struct (80 bytes): inv_view matrix + FOV/near/far/aspect - SDFEffect base class: manages camera uniform, provides update_camera() helpers - camera_common.wgsl: getCameraRay(), position/forward/up/right extractors - SDFTestEffect: working example with orbiting camera + animated sphere Refactor effect headers: - Extract class definitions from demo_effects.h to individual .h files - Update includes in .cc files to use specific headers - Cleaner compilation dependencies, faster incremental builds Documentation: - Add SDF_EFFECT_GUIDE.md with complete workflow - Update ARCHITECTURE.md, UNIFORM_BUFFER_GUIDELINES.md - Update EFFECT_WORKFLOW.md, CONTRIBUTING.md Tests: 34/34 passing, SDFTestEffect validated Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'doc/EFFECT_WORKFLOW.md')
-rw-r--r--doc/EFFECT_WORKFLOW.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/EFFECT_WORKFLOW.md b/doc/EFFECT_WORKFLOW.md
index 22b8dc9..57cf904 100644
--- a/doc/EFFECT_WORKFLOW.md
+++ b/doc/EFFECT_WORKFLOW.md
@@ -10,6 +10,8 @@ Automated checklist for adding new visual effects to the demo.
**For ShaderToy conversions:** Use `tools/shadertoy/convert_shadertoy.py` then follow steps 3-8 below.
+**For SDF/raymarching effects:** See `doc/SDF_EFFECT_GUIDE.md` for streamlined workflow using SDFEffect base class.
+
**For custom effects:** Follow all steps 1-8.
---
@@ -18,6 +20,8 @@ Automated checklist for adding new visual effects to the demo.
### 1. Create Effect Files
+**Description:** Each visual effect must have its own dedicated header (`.h`) and implementation (`.cc`) file pair.
+
**Location:**
- Header: `src/effects/<effect_name>_effect.h`
- Implementation: `src/effects/<effect_name>_effect.cc`
@@ -84,7 +88,7 @@ SHADER_TUNNEL, NONE, shaders/tunnel.wgsl, "Tunnel effect shader"
# In normal section (line ~183):
src/effects/solarize_effect.cc
- src/effects/tunnel_effect.cc # <-- Add here
+ src/effects/tunnel.cc # <-- Add here
src/effects/chroma_aberration_effect.cc
```
@@ -92,7 +96,7 @@ SHADER_TUNNEL, NONE, shaders/tunnel.wgsl, "Tunnel effect shader"
**File:** `src/gpu/demo_effects.h`
-**Action:** Add include directive:
+**Action:** `src/gpu/demo_effects.h` now acts as a central include file. Add a single include directive for your new effect's header:
```cpp
#include "effects/<effect_name>_effect.h"
```