@plasius/gpu-renderer 0.1.6 → 0.1.8
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.
- package/CHANGELOG.md +53 -0
- package/README.md +78 -0
- package/dist/index.cjs +813 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +800 -6
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
- package/src/index.d.ts +239 -1
- package/src/index.js +862 -3
package/CHANGELOG.md
CHANGED
|
@@ -23,6 +23,57 @@ All notable changes to this project will be documented in this file.
|
|
|
23
23
|
- **Security**
|
|
24
24
|
- (placeholder)
|
|
25
25
|
|
|
26
|
+
## [0.1.8] - 2026-03-15
|
|
27
|
+
|
|
28
|
+
- **Added**
|
|
29
|
+
- ADR, TDR, and test-first planning coverage for the ray-tracing-first
|
|
30
|
+
hybrid render graph and range-banded scene representations.
|
|
31
|
+
- Added `createRayTracingRenderPlan(...)` plus public render-stage,
|
|
32
|
+
representation-band, and acceleration-structure policy exports.
|
|
33
|
+
- Expanded renderer worker manifests with stable visual snapshot input
|
|
34
|
+
boundaries and RT-first render-planning metadata.
|
|
35
|
+
- Added tests covering stable snapshot ingestion, required denoise/temporal
|
|
36
|
+
stages, representation-band policies, and acceleration-structure classes.
|
|
37
|
+
|
|
38
|
+
- **Changed**
|
|
39
|
+
- TDR-0003 now reflects the implemented RT-first render-planning helpers.
|
|
40
|
+
|
|
41
|
+
- **Fixed**
|
|
42
|
+
- (placeholder)
|
|
43
|
+
|
|
44
|
+
- **Security**
|
|
45
|
+
- (placeholder)
|
|
46
|
+
|
|
47
|
+
## [0.1.7] - 2026-03-14
|
|
48
|
+
|
|
49
|
+
- **Added**
|
|
50
|
+
- Added frame lifecycle hooks and frame-id generation support to
|
|
51
|
+
`createGpuRenderer(...)`.
|
|
52
|
+
- Added `createRendererDebugHooks(...)` for opt-in `@plasius/gpu-debug`
|
|
53
|
+
frame sampling tied to negotiated frame targets.
|
|
54
|
+
- Added ADR, TDR, and design docs for renderer frame hook integration.
|
|
55
|
+
- Added renderer worker profile and manifest exports for `realtime` and `xr`
|
|
56
|
+
DAG scheduling across `@plasius/gpu-worker` and
|
|
57
|
+
`@plasius/gpu-performance`.
|
|
58
|
+
- Added ADR, TDR, and design docs for renderer frame-stage DAG manifests.
|
|
59
|
+
|
|
60
|
+
- **Changed**
|
|
61
|
+
- Clarified renderer guidance for adaptive frame targets and debug
|
|
62
|
+
instrumentation.
|
|
63
|
+
- Clarified that frame hooks cover correlation while worker manifests cover
|
|
64
|
+
renderer stage scheduling.
|
|
65
|
+
- Raised the minimum `@plasius/gpu-xr` dependency to `^0.1.7` so npm
|
|
66
|
+
installs resolve the published adaptive XR session helpers by default.
|
|
67
|
+
- Updated GitHub Actions workflows to run JavaScript actions on Node 24,
|
|
68
|
+
refreshed core workflow action versions, and switched Codecov uploads to
|
|
69
|
+
the Codecov CLI.
|
|
70
|
+
|
|
71
|
+
- **Fixed**
|
|
72
|
+
- (placeholder)
|
|
73
|
+
|
|
74
|
+
- **Security**
|
|
75
|
+
- (placeholder)
|
|
76
|
+
|
|
26
77
|
## [0.1.6] - 2026-03-04
|
|
27
78
|
|
|
28
79
|
- **Added**
|
|
@@ -81,3 +132,5 @@ All notable changes to this project will be documented in this file.
|
|
|
81
132
|
[0.1.1]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.1
|
|
82
133
|
[0.1.2]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.2
|
|
83
134
|
[0.1.6]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.6
|
|
135
|
+
[0.1.7]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.7
|
|
136
|
+
[0.1.8]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.8
|
package/README.md
CHANGED
|
@@ -37,6 +37,72 @@ renderer.resize(window.innerWidth, window.innerHeight);
|
|
|
37
37
|
renderer.start();
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
## Adaptive Frame Hooks
|
|
41
|
+
|
|
42
|
+
`@plasius/gpu-renderer` now exposes frame lifecycle hooks so the app can pass
|
|
43
|
+
negotiated frame targets from `@plasius/gpu-performance` and opt into renderer
|
|
44
|
+
frame sampling for `@plasius/gpu-debug`.
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
import { createGpuRenderer, createRendererDebugHooks } from "@plasius/gpu-renderer";
|
|
48
|
+
|
|
49
|
+
const rendererDebugHooks = createRendererDebugHooks({
|
|
50
|
+
debugSession,
|
|
51
|
+
getTargetFrameTimeMs: () => governor.getSnapshot().targetFrameTimeMs,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const renderer = await createGpuRenderer({
|
|
55
|
+
canvas: "#scene",
|
|
56
|
+
frameIdFactory: ({ frame, xrActive }) => `scene.${xrActive ? "xr" : "flat"}.${frame}`,
|
|
57
|
+
...rendererDebugHooks,
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Worker DAG Manifests
|
|
62
|
+
|
|
63
|
+
The renderer also publishes worker-facing frame-stage manifests so
|
|
64
|
+
`@plasius/gpu-performance` and `@plasius/gpu-worker` can reason about renderer
|
|
65
|
+
work as a multi-root DAG instead of a flat queue.
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
import { getRendererWorkerManifest } from "@plasius/gpu-renderer";
|
|
69
|
+
|
|
70
|
+
const realtimeManifest = getRendererWorkerManifest();
|
|
71
|
+
const xrManifest = getRendererWorkerManifest("xr");
|
|
72
|
+
|
|
73
|
+
console.log(realtimeManifest.jobs.map((job) => job.worker.jobType));
|
|
74
|
+
console.log(xrManifest.jobs.find((job) => job.key === "lateLatch"));
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
- `realtime` publishes `acquire`, `visibility`, `mainEncode`, `postProcess`,
|
|
78
|
+
and `submit`.
|
|
79
|
+
- `xr` publishes `acquire`, `visibility`, `lateLatch`, `mainEncode`, and
|
|
80
|
+
`submit`.
|
|
81
|
+
- Jobs include queue class, priority, dependencies, adaptive budget levels, and
|
|
82
|
+
debug metadata such as allocation tags.
|
|
83
|
+
|
|
84
|
+
## Ray-Tracing-First Planning
|
|
85
|
+
|
|
86
|
+
The renderer now publishes a stable-snapshot render plan for the premium
|
|
87
|
+
ray-tracing-first frame model.
|
|
88
|
+
|
|
89
|
+
```js
|
|
90
|
+
import { createRayTracingRenderPlan } from "@plasius/gpu-renderer";
|
|
91
|
+
|
|
92
|
+
const plan = createRayTracingRenderPlan({
|
|
93
|
+
snapshotId: "visual-snapshot-42",
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
console.log(plan.inputBoundary);
|
|
97
|
+
console.log(plan.renderStages.map((stage) => stage.key));
|
|
98
|
+
console.log(plan.representationBands);
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The plan makes the stable visual snapshot boundary explicit, publishes the
|
|
102
|
+
required RT-first stage ordering, and exposes representation-band plus
|
|
103
|
+
acceleration-structure update policy metadata for downstream lighting and
|
|
104
|
+
performance packages.
|
|
105
|
+
|
|
40
106
|
## XR integration
|
|
41
107
|
|
|
42
108
|
```js
|
|
@@ -56,8 +122,18 @@ renderer.bindXrManager(xr, {
|
|
|
56
122
|
|
|
57
123
|
- `supportsWebGpu(options)`
|
|
58
124
|
- `createGpuRenderer(options)`
|
|
125
|
+
- `createRendererDebugHooks(options)`
|
|
126
|
+
- `getRendererWorkerProfile(name?)`
|
|
127
|
+
- `getRendererWorkerManifest(name?)`
|
|
128
|
+
- `createRayTracingRenderPlan(options)`
|
|
59
129
|
- `bindRendererToXrManager(renderer, xrManager, options)`
|
|
60
130
|
- `defaultRendererClearColor`
|
|
131
|
+
- `rendererDebugOwner`
|
|
132
|
+
- `rendererWorkerQueueClass`
|
|
133
|
+
- `defaultRendererWorkerProfile`
|
|
134
|
+
- `rendererWorkerProfiles`
|
|
135
|
+
- `rendererWorkerProfileNames`
|
|
136
|
+
- `rendererWorkerManifests`
|
|
61
137
|
|
|
62
138
|
## Demo
|
|
63
139
|
|
|
@@ -85,4 +161,6 @@ npm run pack:check
|
|
|
85
161
|
- `src/index.js`: WebGPU renderer runtime and XR binding helper.
|
|
86
162
|
- `src/index.d.ts`: public API typings.
|
|
87
163
|
- `tests/package.test.js`: unit tests for renderer lifecycle behavior.
|
|
164
|
+
- `docs/design/worker-manifest-integration.md`: renderer frame-stage DAG model.
|
|
88
165
|
- `docs/adrs/*`: architecture decisions for renderer runtime design.
|
|
166
|
+
- `docs/tdrs/*`: technical direction for frame hook integration.
|