@plasius/gpu-renderer 0.2.55 → 0.2.57

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 CHANGED
@@ -23,6 +23,36 @@ All notable changes to this project will be documented in this file.
23
23
  - **Security**
24
24
  - (placeholder)
25
25
 
26
+ ## [0.2.57] - 2026-10-27
27
+
28
+ - Add opt-in shared mesh BLAS/TLAS instancing with affine transforms and renderer-owned GPU resource byte budgets, allocation diagnostics and failure cleanup.
29
+
30
+ - **Added**
31
+ - (placeholder)
32
+
33
+ - **Changed**
34
+ - (placeholder)
35
+
36
+ - **Fixed**
37
+ - Stage large scene-buffer uploads in bounded sequential chunks to reduce temporary memory pressure during high-resolution initialization.
38
+
39
+ - **Security**
40
+ - (placeholder)
41
+
42
+ ## [0.2.56] - 2026-10-24
43
+
44
+ - **Added**
45
+ - (placeholder)
46
+
47
+ - **Changed**
48
+ - (placeholder)
49
+
50
+ - **Fixed**
51
+ - Reject referenced canonical unlit workflows and declared unlit extension markers until an explicit unlit shading path exists, with a bounded diagnostic that preserves the caller's previous supported rendering path.
52
+
53
+ - **Security**
54
+ - (placeholder)
55
+
26
56
  ## [0.2.55] - 2026-10-24
27
57
 
28
58
  - **Added**
@@ -1315,3 +1345,5 @@ All notable changes to this project will be documented in this file.
1315
1345
  [0.2.53]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.53
1316
1346
  [0.2.54]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.54
1317
1347
  [0.2.55]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.55
1348
+ [0.2.56]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.56
1349
+ [0.2.57]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.57
package/README.md CHANGED
@@ -78,9 +78,60 @@ Canonical blend materials multiply authored factor alpha by texture alpha once;
78
78
  opaque materials ignore both alpha channels. Direct `WavefrontMeshInput` callers
79
79
  can select `alphaMode: "opaque" | "blend"`; omitting it preserves legacy opacity
80
80
  composition. Alpha masks remain unsupported by the canonical adapter.
81
+ Referenced canonical unlit workflows and declared `KHR_materials_unlit`/`unlit`
82
+ extension markers are unsupported and fail explicitly. Keep those assets on an
83
+ unlit-capable rendering path; do not drop their markers or reinterpret them as lit.
81
84
  For an interactive model viewer with loading, integrity checks, camera gestures
82
85
  and quality controls, use the shared package's `model-inspection` entry.
83
86
 
87
+ ## Repeat geometry with instances
88
+
89
+ Pass each mesh once and reference its ID from `instances`. This shares geometry,
90
+ material textures and each mesh's acceleration structure across placements:
91
+
92
+ ```js
93
+ import { createWavefrontPathTracingComputeRenderer } from "@plasius/gpu-renderer";
94
+
95
+ const renderer = await createWavefrontPathTracingComputeRenderer({
96
+ canvas: "#scene",
97
+ meshes: [{
98
+ id: 1,
99
+ positions: [-0.4, 0, 0, 0.4, 0, 0, 0, 0.8, 0],
100
+ indices: [0, 1, 2],
101
+ color: [0.3, 0.6, 0.4, 1],
102
+ }],
103
+ instances: Array.from({ length: 100 }, (_, index) => ({
104
+ id: index + 1,
105
+ meshId: 1,
106
+ transform: [
107
+ 1, 0, 0, 0,
108
+ 0, 1, 0, 0,
109
+ 0, 0, 1, 0,
110
+ (index % 10) - 4.5, 0, Math.floor(index / 10) - 4.5, 1,
111
+ ],
112
+ })),
113
+ camera: { position: [12, 10, 16], target: [0, 0, 0] },
114
+ memoryBudgetBytes: 512 * 1024 * 1024,
115
+ });
116
+ await renderer.renderFrame();
117
+ console.log(renderer.getSnapshot().allocations);
118
+ renderer.destroy();
119
+ ```
120
+
121
+ Transforms are invertible column-major affine matrices, including nonuniform
122
+ scale and reflection. Every supplied mesh needs an instance; IDs must be unique
123
+ within their respective mesh/instance lists. The initial instance path supports
124
+ static non-emissive meshes with CPU acceleration construction. Unsupported
125
+ emissive instances or GPU acceleration requests fail explicitly.
126
+
127
+ `memoryBudgetBytes` limits renderer-owned resource storage. Admission also checks
128
+ individual device limits. `getSnapshot().allocations` reports current/peak bytes
129
+ and individual buffers/textures, including refinement and denoising resources.
130
+ These are requested allocation sizes, not a measurement of free VRAM or driver
131
+ residency. A larger instance count adds transforms and scene-index nodes without
132
+ multiplying the underlying geometry. Large buffer uploads use bounded sequential
133
+ staging to reduce temporary upload pressure. Recreate the runtime to replace instances.
134
+
84
135
  ## Choose a rendering API
85
136
 
86
137
  | API | Purpose |