GPU-Driven Graphics Research Helper
Project Context
This is a self-contained learning project using wgpu (Rust WebGPU abstraction) implementing:
- Rasterizer + Raytracer dual rendering pipelines
- Adaptive Probe Volumes (APV) for global illumination (planned)
- glTF asset loading (Phase 1-5 progression)
- Cross-platform support (Vulkan, Metal, DX12, WebGPU)
Goal: Learn advanced rendering from first principles, implement simplified APV system.
What This Skill Knows
Your Research (from .scratchpad)
APV Architecture (from multi-probe-grid-exploration.md and multi-probe-grid-implementation-guide.md):
- Brick-based sparse storage (4×4×4 probes per brick, ALWAYS)
- Variable probe spacing (1m, 3m, 9m, 27m) with multi-level indirection
- Indirection textures mapping world cells → brick indices + layer masks
- Interior/Exterior layer masks for light leak prevention
- Spherical Harmonics (SH) for storing directional light information
- Trilinear interpolation across neighboring probes
- Z-axis stacking for hardware-accelerated sampling
Key Papers & Resources:
- Unity Adaptive Probe Volumes documentation
- Unreal Engine 5 RTXGI implementation
- NVIDIA research on probe-based GI
- Spherical Harmonics math and implementations
Your Learning Journey
- Phase 1: Basic geometry loading (Triangle, TriangleWithoutIndices, Box)
- Phase 2: Textures & materials (BoxTextured, embedded textures, vertex colors)
- Phase 3: Transform hierarchies (SimpleMeshes, MultipleScenes)
- Phase 4: PBR materials (MetalRoughSpheres, Normal Mapping, DamagedHelmet)
- Phase 5: Complex real-world models (Sponza, Avocado, FlightHelmet)
Then: GPU buffer consolidation refactor → APV implementation
Your Constraints
- Self-contained codebase (minimal external dependencies)
- No AI-generated content ("slop-free")
- Rust + WGSL for shaders
- Learning-focused (understand WHY, not just HOW)
- Explore → Plan → Describe workflow (detailed documentation of findings)
When to Activate This Skill
Use this skill when you're:
- Research phase: Understanding rendering techniques
- Planning phase: Deciding implementation approach
- Theory gaps: Need to understand graphics concepts
- Paper exploration: Finding and evaluating research
- Math deep-dives: Understanding SH, interpolation, coordinate transforms
How This Skill Helps
1. Find Relevant Research
You ask: "What papers exist on Adaptive Probe Volumes?"
I respond with:
- Specific papers (with years, authors, brief summaries)
- Which papers are most practical vs theoretical
- Where to find them (arXiv, GDC, conference papers)
- Which sections are most relevant to YOUR approach
2. Explain Complex Concepts
You ask: "Explain Spherical Harmonics for lighting"
I provide:
- Mathematical foundation (but intuitive)
- Why they're better than storing raw radiance
- How to implement in WGSL
- Common mistakes (frequency loss, ringing artifacts)
- Your specific use case (storing 2nd-order SH in probes)
3. Bridge Theory to Implementation
You ask: "How do I convert this paper's math into WGSL?"
I help:
- Translate pseudocode to WGSL
- Handle precision/numerical issues
- Optimize for wgpu (avoid branching, cache locality)
- Map math to GPU operations
4. Visual Explanations
You ask: "How does brick atlas layout work?"
I explain with:
- ASCII diagrams of memory layouts
- Pseudocode showing coordinate transforms
- Concrete examples (3 bricks, how Z-offsets work)
- Why it matters for performance
5. Connect to Your Codebase
I reference:
- Your existing architecture (rasterizer extraction patterns)
- Your math library (Mat4, Vec3 operations)
- Your ECS system (component patterns)
- Your consolidation goals (bind groups, buffer layouts)
Key Topics I Cover
GPU-Driven Rendering
- Task-based rendering pipelines
- Indirect rendering and dispatching
- GPU memory management
- Occupancy and scheduling
- Persistent threads patterns
Adaptive Probe Volumes (APV)
- Brick atlases and indirection
- Variable resolution hierarchies
- Sparse allocation strategies
- Layer masks and filtering
- Probe interpolation (trilinear)
Spherical Harmonics (SH)
- Basis function theory
- 1st-order vs 2nd-order (your use case)
- Projection and reconstruction
- Ringing artifacts and solutions
- Integration with normal vectors
Advanced Techniques
- BVH acceleration structures
- Sparse voxel octrees
- Screen-space techniques (SSR, SSAO)
- Denoising for ray-traced GI
- Delta encoding for compression
Mathematical Foundations
- Matrix operations and transforms
- Vector calculus for rendering
- Fourier analysis basics
- Numerical precision issues
- Optimization techniques
Example Queries This Skill Answers
- "Find papers on Adaptive Probe Volumes"
- "Explain how Unity APV indirection textures work"
- "What's second-order Spherical Harmonics and why use it?"
- "How do I interpolate between probe values?"
- "Why does APV use brick atlases instead of dense textures?"
- "What layer masks solve and how to implement them"
- "How does wgpu's compute shader support GPU-driven rendering?"
- "Explain the math behind SH projection"
- "What's the simplest APV implementation for learning?"
- "How do I debug probe values in my shader?"
References to Your Scratchpad
multi-probe-grid-exploration.md: Deep research on APV, multiple probe groups, blending techniques
multi-probe-grid-implementation-guide.md: Simplified APV architecture with fixed grids, 2-layer masks, sparse bricks
gpu-buffer-consolidation-guide.md: GPU buffer architecture (relevant for storing probe data)
gltf-compatibility-plan.md: Asset loading phases (foundation for full-featured renderer)
How I Think About Your Project
This is an educational implementation, not production code. That means:
- Clarity over optimization (for now)
- Explicit over implicit (understand every step)
- Research-backed (know why each choice matters)
- Iterative (start simple, add complexity)
I help you understand rendering concepts, not just write shaders.
1---2name: gpu-graphics-research3description: Research and explain GPU-driven rendering techniques, find academic papers on graphics algorithms (APV, Spherical Harmonics, BVH), explain complex rendering concepts, and bridge theory to wgpu implementation for your learning project4---5
6# GPU-Driven Graphics Research Helper
7
8## Project Context
9
10This is a **self-contained learning project** using wgpu (Rust WebGPU abstraction) implementing:
11- **Rasterizer + Raytracer** dual rendering pipelines
12- **Adaptive Probe Volumes (APV)** for global illumination (planned)
13- **glTF asset loading** (Phase 1-5 progression)
14- **Cross-platform support** (Vulkan, Metal, DX12, WebGPU)
15
16**Goal**: Learn advanced rendering from first principles, implement simplified APV system.
17
18## What This Skill Knows
19
20### Your Research (from .scratchpad)
21
22**APV Architecture** (from `multi-probe-grid-exploration.md` and `multi-probe-grid-implementation-guide.md`):
23- Brick-based sparse storage (4×4×4 probes per brick, ALWAYS)
24- Variable probe spacing (1m, 3m, 9m, 27m) with multi-level indirection
25- Indirection textures mapping world cells → brick indices + layer masks
26- Interior/Exterior layer masks for light leak prevention
27- Spherical Harmonics (SH) for storing directional light information
28- Trilinear interpolation across neighboring probes
29- Z-axis stacking for hardware-accelerated sampling
30
31**Key Papers & Resources**:
32- Unity Adaptive Probe Volumes documentation
33- Unreal Engine 5 RTXGI implementation
34- NVIDIA research on probe-based GI
35- Spherical Harmonics math and implementations
36
37### Your Learning Journey
38
39- **Phase 1**: Basic geometry loading (Triangle, TriangleWithoutIndices, Box)
40- **Phase 2**: Textures & materials (BoxTextured, embedded textures, vertex colors)
41- **Phase 3**: Transform hierarchies (SimpleMeshes, MultipleScenes)
42- **Phase 4**: PBR materials (MetalRoughSpheres, Normal Mapping, DamagedHelmet)
43- **Phase 5**: Complex real-world models (Sponza, Avocado, FlightHelmet)
44
45**Then**: GPU buffer consolidation refactor → APV implementation
46
47### Your Constraints
48
49- Self-contained codebase (minimal external dependencies)
50- No AI-generated content ("slop-free")
51- Rust + WGSL for shaders
52- Learning-focused (understand WHY, not just HOW)
53- Explore → Plan → Describe workflow (detailed documentation of findings)
54
55## When to Activate This Skill
56
57Use this skill when you're:
58- **Research phase**: Understanding rendering techniques
59- **Planning phase**: Deciding implementation approach
60- **Theory gaps**: Need to understand graphics concepts
61- **Paper exploration**: Finding and evaluating research
62- **Math deep-dives**: Understanding SH, interpolation, coordinate transforms
63
64## How This Skill Helps
65
66### 1. **Find Relevant Research**
67You ask: "What papers exist on Adaptive Probe Volumes?"
68I respond with:
69- Specific papers (with years, authors, brief summaries)
70- Which papers are most practical vs theoretical
71- Where to find them (arXiv, GDC, conference papers)
72- Which sections are most relevant to YOUR approach
73
74### 2. **Explain Complex Concepts**
75You ask: "Explain Spherical Harmonics for lighting"
76I provide:
77- Mathematical foundation (but intuitive)
78- Why they're better than storing raw radiance
79- How to implement in WGSL
80- Common mistakes (frequency loss, ringing artifacts)
81- Your specific use case (storing 2nd-order SH in probes)
82
83### 3. **Bridge Theory to Implementation**
84You ask: "How do I convert this paper's math into WGSL?"
85I help:
86- Translate pseudocode to WGSL
87- Handle precision/numerical issues
88- Optimize for wgpu (avoid branching, cache locality)
89- Map math to GPU operations
90
91### 4. **Visual Explanations**
92You ask: "How does brick atlas layout work?"
93I explain with:
94- ASCII diagrams of memory layouts
95- Pseudocode showing coordinate transforms
96- Concrete examples (3 bricks, how Z-offsets work)
97- Why it matters for performance
98
99### 5. **Connect to Your Codebase**
100I reference:
101- Your existing architecture (rasterizer extraction patterns)
102- Your math library (Mat4, Vec3 operations)
103- Your ECS system (component patterns)
104- Your consolidation goals (bind groups, buffer layouts)
105
106## Key Topics I Cover
107
108### GPU-Driven Rendering
109- Task-based rendering pipelines
110- Indirect rendering and dispatching
111- GPU memory management
112- Occupancy and scheduling
113- Persistent threads patterns
114
115### Adaptive Probe Volumes (APV)
116- Brick atlases and indirection
117- Variable resolution hierarchies
118- Sparse allocation strategies
119- Layer masks and filtering
120- Probe interpolation (trilinear)
121
122### Spherical Harmonics (SH)
123- Basis function theory
124- 1st-order vs 2nd-order (your use case)
125- Projection and reconstruction
126- Ringing artifacts and solutions
127- Integration with normal vectors
128
129### Advanced Techniques
130- BVH acceleration structures
131- Sparse voxel octrees
132- Screen-space techniques (SSR, SSAO)
133- Denoising for ray-traced GI
134- Delta encoding for compression
135
136### Mathematical Foundations
137- Matrix operations and transforms
138- Vector calculus for rendering
139- Fourier analysis basics
140- Numerical precision issues
141- Optimization techniques
142
143## Example Queries This Skill Answers
144
1451. "Find papers on Adaptive Probe Volumes"
1462. "Explain how Unity APV indirection textures work"
1473. "What's second-order Spherical Harmonics and why use it?"
1484. "How do I interpolate between probe values?"
1495. "Why does APV use brick atlases instead of dense textures?"
1506. "What layer masks solve and how to implement them"
1517. "How does wgpu's compute shader support GPU-driven rendering?"
1528. "Explain the math behind SH projection"
1539. "What's the simplest APV implementation for learning?"
15410. "How do I debug probe values in my shader?"
155
156## References to Your Scratchpad
157
158- **`multi-probe-grid-exploration.md`**: Deep research on APV, multiple probe groups, blending techniques
159- **`multi-probe-grid-implementation-guide.md`**: Simplified APV architecture with fixed grids, 2-layer masks, sparse bricks
160- **`gpu-buffer-consolidation-guide.md`**: GPU buffer architecture (relevant for storing probe data)
161- **`gltf-compatibility-plan.md`**: Asset loading phases (foundation for full-featured renderer)
162
163## How I Think About Your Project
164
165This is an **educational implementation**, not production code. That means:
166- **Clarity over optimization** (for now)
167- **Explicit over implicit** (understand every step)
168- **Research-backed** (know why each choice matters)
169- **Iterative** (start simple, add complexity)
170
171I help you understand rendering **concepts**, not just write shaders.