@plasius/gpu-demo-viewer 0.1.9 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ # Experimental wavefront viewer
2
+
3
+ Run `npm run demo` from the workspace checkout first. This page uses sibling
4
+ package builds; it is separate from the standalone model workshop.
5
+
6
+ To open the experimental wavefront path-tracing technique demo directly:
7
+
8
+ ```text
9
+ http://localhost:8000/gpu-demo-viewer/wavefront/?experimental=wavefront
10
+ ```
11
+
12
+ Deterministic 540p capture settings are available at:
13
+
14
+ ```text
15
+ http://localhost:8000/gpu-demo-viewer/wavefront/?experimental=wavefront&capture=1
16
+ ```
17
+
18
+ The displayed primary-ray count is calculated as:
19
+
20
+ ```text
21
+ render width x render height x samples per pixel
22
+ ```
23
+
24
+ The debug panel also reports the separate screen-pixel count so render
25
+ resolution and stochastic sampling cost remain visible independently.
26
+ Continuation rays are then spawned from the active queue by bounce depth inside
27
+ the renderer. The active demo presets are 960x540 capture, 1280x720 balanced,
28
+ 1920x1080 detail, and a 3840x2160 4K target. The 540p/720p/1080p presets
29
+ default to 8 samples per pixel, while 4K defaults to 4 samples per pixel; the
30
+ renderer keeps queue buffers tile-bounded so these targets do not require
31
+ full-frame ray queues.
32
+
33
+ The wavefront page runs a live render loop by default. The performance panel
34
+ shows FPS, frame timing, primary rays per second, and a 100% stacked timing bar
35
+ for the viewer-observed frame budget: WebGPU command dispatch, GPU completion
36
+ wait, optional probe/readback, overlay update, and requestAnimationFrame pacing.
37
+ These timings are browser-side measurements; they identify where the viewer is
38
+ blocked each frame but do not yet replace future GPU timestamp-query profiling
39
+ inside individual compute passes.
40
+
41
+ ## Validation Notes
42
+
43
+ - Browser-backed WebGPU demos still require `localhost` or `HTTPS`.
44
+ - The wavefront path-tracing demo is a WebGPU renderer mount, not a CPU/static
45
+ canvas tracer. It submits only the benchmark model mesh set with
46
+ `displayQuality: true`, builds the renderer mesh BVH on the GPU, disables
47
+ environment portals, and leaves skybox/environment lighting as the only
48
+ scene lighting source. The demo intentionally excludes the previous synthetic
49
+ room, floor, wall, emissive-panel, and fluid-surface geometry so most escaped
50
+ paths should terminate against the skybox rather than unlit scene blockers.
51
+ Shallow no-light/max-depth paths return the renderer ambient residual to
52
+ approximate unresolved high-order indirect bounces. The demo exposes 1, 4, 8,
53
+ and 16 samples-per-pixel settings and defaults to 8 spp for the 540p, 720p,
54
+ and 1080p presets. The denoise toggle runs the renderer post pass; denoise
55
+ smooths neighboring pixels but does not replace active-ray skybox/environment
56
+ hits as the primary lighting source. The loop updates camera uniforms every
57
+ animation frame through `@plasius/gpu-renderer` so the FPS counter represents
58
+ a moving realtime render rather than repeated presentation of one static
59
+ frame.
60
+ - The wavefront performance chart is intended for local tuning: compare
61
+ resolution, depth, samples-per-pixel, and denoise settings while watching
62
+ whether time is dominated by command dispatch, sampled GPU completion sync,
63
+ readback, overlay work, or frame pacing. The demo does not hard-sync every
64
+ frame; completion sync is sampled periodically to avoid making the viewer
65
+ itself serialize the GPU queue.
66
+ - The shared integration showcase is 3D but does not require WebGPU initialization just to render the validation scene.
67
+ - The showcase now resolves `@plasius/gpu-shared` through an import map so the browser entry uses the package public surface instead of a deep internal file path.
68
+ - `gpu-world-generator` is launched from its built `demo/dist/` bundle in the viewer because its source demo uses a Vite workflow.
69
+ - Code-example packages are listed for discovery but are not embedded in an iframe.