Skip to content

Commit 73ff0c7

Browse files
committed
Update README and ARCHITECTURE
1 parent a72c325 commit 73ff0c7

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,18 @@ A ray tracing sandbox written in Rust, compiled to SPIR-V shaders using [rust-gp
1515

1616
## Running
1717

18+
Open a live window rendering a scene:
19+
20+
```sh
21+
cargo run --release -- live --scene cornell_box_fs
22+
```
23+
24+
Available scenes: `cornell_box_fs`, `quads_fs`, `metal_test_fs`, `dielectric_test_fs`, `two_spheres_fs`, `three_spheres_fs`, `many_spheres_fs`
25+
26+
Render all scenes to a grid image (`renders/render.png`):
27+
1828
```sh
19-
cargo run --release
29+
cargo run --release -- test
2030
```
2131

2232
## Testing

docs/ARCHITECTURE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The project splits into two layers:
1515
### `host`
1616
CPU-side application with CLI interface:
1717
- `live --scene <name>` - Opens window and renders scene live (default: `cornell_box_fs`)
18-
- `test` - Renders all scenes to image grid (not yet implemented)
18+
- `test` - Renders all scenes to a 4x4 grid image at 720p each, saved to `renders/render.png`
1919

2020
Manages window creation, wgpu device/queue/surface initialization, and the render loop. GPU setup is factored into `gpu.rs` with `GpuContext` struct providing:
2121
- `create_instance()` / `new()` - wgpu initialization
@@ -31,8 +31,11 @@ Types shared between host and shader. Currently just `ShaderConstants` (frame di
3131
GPU entry points compiled to SPIR-V. Contains multiple fragment shader entry points for different scenes:
3232
- `cornell_box_fs` - Cornell box with colored walls and ceiling light
3333
- `quads_fs` - Five colored quads in a room-like arrangement
34+
- `metal_test_fs` - Metal spheres with varying fuzz
35+
- `dielectric_test_fs` - Glass spheres demonstrating refraction
36+
- `two_spheres_fs` - Two spheres on checkered ground
3437
- `three_spheres_fs` - Glass, lambertian, and metal spheres on ground
35-
- `bouncing_spheres_fs` - Classic scene with many small spheres (currently broken)
38+
- `many_spheres_fs` - Classic final scene with many small spheres
3639

3740
Scene setup is factored into `scene.rs` with functions like `cornell_box()`, `quads()`, etc. that return `(Camera, MaterialTable, TextureTable, List<NS, NQ>)`. Each entry point calls its scene function, then traces rays per-pixel.
3841

0 commit comments

Comments
 (0)