@hypersoniclabs/helix-cli 0.1.25-helix3.520 → 0.1.25-helix3.521

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.
Files changed (27) hide show
  1. package/dist/itemLod/artifact.d.ts +41 -2
  2. package/dist/itemLod/artifact.js +82 -17
  3. package/dist/itemLod/artifact.js.map +1 -1
  4. package/dist/itemLod/gbuffer.d.ts +72 -0
  5. package/dist/itemLod/gbuffer.js +245 -0
  6. package/dist/itemLod/gbuffer.js.map +1 -0
  7. package/dist/itemLod/impostor.d.ts +3 -1
  8. package/dist/itemLod/impostor.js +2 -0
  9. package/dist/itemLod/impostor.js.map +1 -1
  10. package/dist/tsconfig.build.tsbuildinfo +1 -1
  11. package/docs/item-lod.md +39 -2
  12. package/package.json +1 -1
  13. package/plugins/beamng-vehicle/bin/__pycache__/beamng_abs.cpython-312.pyc +0 -0
  14. package/plugins/beamng-vehicle/bin/__pycache__/beamng_audio.cpython-312.pyc +0 -0
  15. package/plugins/beamng-vehicle/bin/__pycache__/beamng_engine.cpython-312.pyc +0 -0
  16. package/plugins/beamng-vehicle/bin/__pycache__/beamng_expression.cpython-312.pyc +0 -0
  17. package/plugins/beamng-vehicle/bin/__pycache__/beamng_jbeam.cpython-312.pyc +0 -0
  18. package/plugins/beamng-vehicle/bin/__pycache__/beamng_materials.cpython-312.pyc +0 -0
  19. package/plugins/beamng-vehicle/bin/__pycache__/beamng_stock_events.cpython-312.pyc +0 -0
  20. package/plugins/beamng-vehicle/bin/__pycache__/fmod_studio.cpython-312.pyc +0 -0
  21. package/plugins/beamng-vehicle/bin/__pycache__/fsb5.cpython-312.pyc +0 -0
  22. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio.cpython-312.pyc +0 -0
  23. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_ac.cpython-312.pyc +0 -0
  24. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_beamng.cpython-312.pyc +0 -0
  25. package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_fixtures.cpython-312.pyc +0 -0
  26. package/plugins/beamng-vehicle/bin/__pycache__/test_beamng_engine.cpython-312.pyc +0 -0
  27. package/plugins/beamng-vehicle/bin/__pycache__/test_sim_audio.cpython-312.pyc +0 -0
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GBUFFER_BYTES_SLACK = exports.GBUFFER_MIN_TRIANGLES = exports.GBUFFER_EMISSIVE_SCALE = exports.GBUFFER_LAYOUT = exports.GBUFFER_SHADING = void 0;
7
+ exports.hemiOctDirection = hemiOctDirection;
8
+ exports.dilateWithMask = dilateWithMask;
9
+ exports.packGBuffer = packGBuffer;
10
+ exports.captureGBufferPasses = captureGBufferPasses;
11
+ exports.encodeGBufferAtlases = encodeGBufferAtlases;
12
+ exports.gbufferPreviewPng = gbufferPreviewPng;
13
+ const node_crypto_1 = require("node:crypto");
14
+ const promises_1 = require("node:fs/promises");
15
+ const node_os_1 = require("node:os");
16
+ const node_path_1 = require("node:path");
17
+ const sharp_1 = __importDefault(require("sharp"));
18
+ const captureHost_1 = require("../placements/captureHost");
19
+ const basisEncoder_1 = require("../sceneHlod/basisEncoder");
20
+ const impostor_1 = require("./impostor");
21
+ /**
22
+ * `gbuffer/1`: the impostor holds what the item's materials ARE (albedo, normal, roughness, metalness, glow, clear coat), not how a neutral rig
23
+ * lit them. The runtime lights it with the same three.js physical material and the same lights as the full model (the sun, hemisphere and ambient
24
+ * lights, the environment, the probe grid), so a placed item has the right brightness and hue at every heading and time of day without a fitted
25
+ * constant. The frames are on the `hemi-oct/1` layout. The atlas is three KTX2 files of 8 x 8 views of IMPOSTOR_SIZE / 8 px:
26
+ *
27
+ * - albedo: sRGB RGB albedo, A = coverage (this is also what an albedo-only reader would draw).
28
+ * - surface: linear, R and G = the view-space normal's x and y (z is rebuilt: a visible surface faces the camera), B = roughness, A = metalness.
29
+ * - emissive: sRGB RGB = emissive radiance x GBUFFER_EMISSIVE_SCALE, A = clear coat strength. Present only when the item glows or has a clear coat.
30
+ */
31
+ exports.GBUFFER_SHADING = 'gbuffer/1';
32
+ exports.GBUFFER_LAYOUT = 'hemi-oct/1';
33
+ /** The emissive map stores radiance at this fraction (8-bit headroom); the runtime multiplies it back. */
34
+ exports.GBUFFER_EMISSIVE_SCALE = 0.25;
35
+ /**
36
+ * The impostor is left out of a `gbuffer/1` artifact only for an item that is both tiny (at most this many triangles: its instanced model costs
37
+ * less to draw than a billboard costs to fetch) and whose three maps cost at least GBUFFER_BYTES_SLACK times its source's bytes. Anything bigger
38
+ * keeps its impostor whatever its bytes: far placements of it are drawn as two triangles instead of the model, which is the point of the file.
39
+ */
40
+ exports.GBUFFER_MIN_TRIANGLES = 300;
41
+ exports.GBUFFER_BYTES_SLACK = 2;
42
+ /** A map is written only when at least this many covered texels carry the signal (a rounding speck is not an emissive lamp). */
43
+ const SIGNAL_TEXELS = 8;
44
+ const EMISSIVE_FLOOR = 6; // sum of the three stored channels, out of 765
45
+ const COAT_FLOOR = 8; // out of 255
46
+ /**
47
+ * The direction of frame (i, j) on `hemi-oct/1`: the upper hemisphere folded into the octahedral diamond, the diamond turned 45 degrees onto
48
+ * the 8 x 8 grid so that the grid's outer ring IS the horizon. (u, v) = (2i/(n-1) - 1, 2j/(n-1) - 1); x = (u + v) / 2, z = (u - v) / 2,
49
+ * y = 1 - |x| - |z|, normalised. The 28 frames of the outer ring look along the horizon, 9.5 to 16.2 degrees apart in azimuth; none looks from below
50
+ * the ground a prop stands on, and a player at ground level, who sees every far item from within a few degrees of the horizon, sits ON the ring.
51
+ */
52
+ function hemiOctDirection(i, j, views = impostor_1.IMPOSTOR_VIEWS) {
53
+ const u = (2 * i) / (views - 1) - 1, v = (2 * j) / (views - 1) - 1;
54
+ const x = (u + v) / 2, z = (u - v) / 2, y = 1 - Math.abs(x) - Math.abs(z), length = Math.hypot(x, y, z);
55
+ return [x / length, y / length, z / length];
56
+ }
57
+ /**
58
+ * Dilates `channels` of `data` into texels `coverage` leaves empty, inside each view cell, so filtering at a silhouette never mixes in black.
59
+ * Same step count and neighbour order as `dilateImpostorColors`, but the occupancy comes from a separate mask because only the albedo map's alpha is coverage.
60
+ */
61
+ function dilateWithMask(data, coverage, size, channels, steps = 4) {
62
+ const result = Uint8Array.from(data), cell = size / impostor_1.IMPOSTOR_VIEWS, occupied = new Uint8Array(size * size);
63
+ for (let i = 0; i < occupied.length; i++)
64
+ occupied[i] = coverage[i * 4 + 3] > 0 ? 1 : 0;
65
+ for (let step = 0; step < steps; step++) {
66
+ const next = occupied.slice(), previous = result.slice();
67
+ for (let y = 0; y < size; y++)
68
+ for (let x = 0; x < size; x++) {
69
+ const i = y * size + x;
70
+ if (occupied[i])
71
+ continue;
72
+ const candidates = [x % cell ? i - 1 : -1, x % cell < cell - 1 ? i + 1 : -1, y % cell ? i - size : -1, y % cell < cell - 1 ? i + size : -1];
73
+ const neighbor = candidates.find(n => n >= 0 && occupied[n]);
74
+ if (neighbor === undefined)
75
+ continue;
76
+ for (const c of channels)
77
+ result[i * 4 + c] = previous[neighbor * 4 + c];
78
+ next[i] = 1;
79
+ }
80
+ occupied.set(next);
81
+ }
82
+ return result;
83
+ }
84
+ /** Packs the four capture passes into the three maps and dilates each into the empty texels of its view cell. */
85
+ function packGBuffer(passes, size = impostor_1.IMPOSTOR_SIZE) {
86
+ const texels = size * size, expected = texels * 4;
87
+ for (const [name, pass] of Object.entries(passes))
88
+ if (pass.length !== expected)
89
+ throw new Error(`gbuffer ${name} pass has the wrong size`);
90
+ const { albedo, normal, material, emissive } = passes;
91
+ const surface = new Uint8Array(expected), glow = new Uint8Array(expected);
92
+ let emissiveTexels = 0, coatTexels = 0;
93
+ for (let i = 0; i < texels; i++) {
94
+ const p = i * 4;
95
+ if (albedo[p + 3] === 0)
96
+ continue;
97
+ // Average the normal as a vector (the box filter did), renormalise, keep x and y.
98
+ let x = (normal[p] / 255) * 2 - 1, y = (normal[p + 1] / 255) * 2 - 1, z = (normal[p + 2] / 255) * 2 - 1;
99
+ const length = Math.hypot(x, y, z) || 1;
100
+ x /= length;
101
+ y /= length;
102
+ z /= length;
103
+ surface[p] = Math.round((x * 0.5 + 0.5) * 255);
104
+ surface[p + 1] = Math.round((y * 0.5 + 0.5) * 255);
105
+ surface[p + 2] = material[p];
106
+ surface[p + 3] = material[p + 1];
107
+ glow[p] = emissive[p];
108
+ glow[p + 1] = emissive[p + 1];
109
+ glow[p + 2] = emissive[p + 2];
110
+ glow[p + 3] = material[p + 2];
111
+ if (emissive[p] + emissive[p + 1] + emissive[p + 2] >= EMISSIVE_FLOOR)
112
+ emissiveTexels++;
113
+ if (material[p + 2] >= COAT_FLOOR)
114
+ coatTexels++;
115
+ }
116
+ const hasEmissive = emissiveTexels >= SIGNAL_TEXELS, clearcoat = coatTexels >= SIGNAL_TEXELS;
117
+ const all = [0, 1, 2, 3];
118
+ return {
119
+ albedo: dilateWithMask(albedo, albedo, size, [0, 1, 2]),
120
+ surface: dilateWithMask(surface, albedo, size, all),
121
+ emissive: hasEmissive || clearcoat ? dilateWithMask(glow, albedo, size, all) : null,
122
+ clearcoat, emissiveTexels, coatTexels,
123
+ };
124
+ }
125
+ /** Appended to the shared capture module, so it reuses its renderer and base64 helper. */
126
+ const CAPTURE_GBUFFER_SCRIPT = String.raw `
127
+ const hemiDirection = (x, y, views) => {
128
+ const u = 2 * x / (views - 1) - 1, v = 2 * y / (views - 1) - 1, hx = (u + v) / 2, hz = (u - v) / 2;
129
+ return new THREE.Vector3(hx, 1 - Math.abs(hx) - Math.abs(hz), hz).normalize();
130
+ };
131
+ window.captureGBuffer = async ({ model, size, center, radius, ssaa, views, emissiveScale }) => {
132
+ const gltf = await new GLTFLoader().loadAsync(model);
133
+ gltf.scene.updateMatrixWorld(true);
134
+ const meshes = [], owned = [];
135
+ gltf.scene.traverse(mesh => { if (mesh.isMesh) meshes.push(mesh); });
136
+ for (const mesh of meshes) if (mesh.isSkinnedMesh || Array.isArray(mesh.material)) throw new Error('Impostor capture requires static single-material primitives');
137
+ const vertex = 'varying vec3 vN; varying vec2 vUv; void main() { vN = normalize(mat3(viewMatrix) * mat3(modelMatrix) * normal); vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }';
138
+ const surfaceFragment = (source, kind) => 'uniform float rough; uniform float metal; uniform float coat; uniform vec3 glow; uniform sampler2D glowMap; uniform sampler2D ormMap; varying vec3 vN; varying vec2 vUv;\n'
139
+ + 'void main() { vec3 n = normalize(vN) * (gl_FrontFacing ? 1.0 : -1.0);\n'
140
+ + 'if (' + kind + ' == 0) { gl_FragColor = vec4(n * 0.5 + 0.5, 1.0); return; }\n'
141
+ + (source.roughnessMap || source.metalnessMap ? 'vec4 orm = texture2D(ormMap, vUv);' : 'vec4 orm = vec4(1.0);') + '\n'
142
+ + 'if (' + kind + ' == 1) { gl_FragColor = vec4(rough * orm.g, metal * orm.b, coat, 1.0); return; }\n'
143
+ + 'vec3 e = glow' + (source.emissiveMap ? ' * texture2D(glowMap, vUv).rgb' : '') + '; gl_FragColor = vec4(e * ' + emissiveScale.toFixed(4) + ', 1.0); }';
144
+ const build = pass => {
145
+ const originals = meshes.map(mesh => mesh.material);
146
+ meshes.forEach((mesh, index) => {
147
+ const source = originals[index];
148
+ if (pass === 'albedo') {
149
+ const colour = new THREE.MeshBasicMaterial({ color: source.color, map: source.map, vertexColors: source.vertexColors, alphaTest: source.alphaTest, side: source.side, toneMapped: false });
150
+ owned.push(colour); mesh.material = colour; return;
151
+ }
152
+ const kind = pass === 'normal' ? 0 : pass === 'material' ? 1 : 2;
153
+ const shader = new THREE.ShaderMaterial({ side: source.side, vertexShader: vertex, fragmentShader: surfaceFragment(source, kind),
154
+ uniforms: { rough: { value: source.roughness ?? 1 }, metal: { value: source.metalness ?? 0 }, coat: { value: source.clearcoat ?? 0 },
155
+ glow: { value: (source.emissive ?? new THREE.Color(0)).clone().multiplyScalar(source.emissiveIntensity ?? 1) },
156
+ glowMap: { value: source.emissiveMap ?? null }, ormMap: { value: source.roughnessMap ?? source.metalnessMap ?? null } } });
157
+ owned.push(shader); mesh.material = shader;
158
+ });
159
+ return originals;
160
+ };
161
+ const scene = new THREE.Scene(); scene.add(gltf.scene);
162
+ const pivot = new THREE.Vector3().fromArray(center), camera = new THREE.OrthographicCamera(-radius, radius, radius, -radius, 0.01, radius * 6);
163
+ scene.add(camera);
164
+ const big = size * ssaa, cell = big / views;
165
+ // Two targets, not one retargeted: three fixes a target's internal format (SRGB8_ALPHA8 or RGBA8) when it first renders into it, so changing
166
+ // the colour space of a used target leaves the GPU encoding every later pass as sRGB. That brightened the normal and material maps (the
167
+ // sedan's roughness 0.31 read back as 0.56) until the lab's byte comparison against the shipped atlases caught it.
168
+ const makeTarget = colour => { const t = new THREE.WebGLRenderTarget(big, big, { depthBuffer: true, stencilBuffer: false }); t.texture.colorSpace = colour ? THREE.SRGBColorSpace : THREE.NoColorSpace; return t; };
169
+ const colourTarget = makeTarget(true), dataTarget = makeTarget(false);
170
+ const out = {};
171
+ try {
172
+ for (const pass of ['albedo', 'normal', 'material', 'emissive']) {
173
+ // Colour passes are written into an sRGB target (the GPU encodes); the data passes are linear.
174
+ const target = pass === 'albedo' || pass === 'emissive' ? colourTarget : dataTarget;
175
+ const originals = build(pass);
176
+ renderer.setRenderTarget(target); renderer.setScissorTest(false); renderer.setClearColor(0, 0); renderer.clear(); renderer.setScissorTest(true);
177
+ for (let y = 0; y < views; y++) for (let x = 0; x < views; x++) {
178
+ const direction = hemiDirection(x, y, views);
179
+ camera.position.copy(pivot).addScaledVector(direction, radius * 3);
180
+ camera.up.set(0, 1, 0); if (Math.abs(direction.y) > 0.9999) camera.up.set(0, 0, direction.y > 0 ? -1 : 1);
181
+ camera.lookAt(pivot); camera.updateMatrixWorld(true);
182
+ renderer.setViewport(x * cell, y * cell, cell, cell); renderer.setScissor(x * cell, y * cell, cell, cell);
183
+ renderer.render(scene, camera);
184
+ }
185
+ const pixels = new Uint8Array(big * big * 4); renderer.readRenderTargetPixels(target, 0, 0, big, big, pixels);
186
+ meshes.forEach((mesh, index) => { mesh.material = originals[index]; });
187
+ const reduced = new Uint8Array(size * size * 4), count = ssaa * ssaa;
188
+ for (let y = 0; y < size; y++) for (let x = 0; x < size; x++) {
189
+ let r = 0, g = 0, b = 0, a = 0;
190
+ for (let j = 0; j < ssaa; j++) for (let i = 0; i < ssaa; i++) {
191
+ const p = ((y * ssaa + j) * big + (x * ssaa + i)) * 4, alpha = pixels[p + 3];
192
+ a += alpha; r += pixels[p] * alpha; g += pixels[p + 1] * alpha; b += pixels[p + 2] * alpha;
193
+ }
194
+ const o = (y * size + x) * 4;
195
+ if (a > 0) { reduced[o] = Math.round(r / a); reduced[o + 1] = Math.round(g / a); reduced[o + 2] = Math.round(b / a); }
196
+ reduced[o + 3] = Math.round(a / count);
197
+ }
198
+ out[pass] = base64(reduced);
199
+ }
200
+ return out;
201
+ } finally {
202
+ renderer.setRenderTarget(null); renderer.setScissorTest(false); colourTarget.dispose(); dataTarget.dispose(); owned.forEach(m => m.dispose());
203
+ gltf.scene.traverse(o => { if (o.isMesh) o.geometry.dispose(); });
204
+ }
205
+ };
206
+ `;
207
+ /** The four G-buffer passes of an item on `hemi-oct/1`, from a capture GLB (static, single-material primitives), in the shared headless capture host. */
208
+ async function captureGBufferPasses(captureGlb, framing, size = impostor_1.IMPOSTOR_SIZE) {
209
+ const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'helix-item-lod-'));
210
+ try {
211
+ const sha256 = (0, node_crypto_1.createHash)('sha256').update(captureGlb).digest('hex');
212
+ await (0, promises_1.writeFile)((0, node_path_1.join)(directory, 'capture.glb'), captureGlb);
213
+ const id = `placements.${sha256}`;
214
+ const bake = { schema: 'helix.placements-bake/1', placements: {}, files: [{ id, sha256, path: 'capture.glb', bytes: captureGlb.length, mimeType: 'model/gltf-binary' }] };
215
+ const result = await (0, captureHost_1.withPlacementsCapture)(directory, bake, CAPTURE_GBUFFER_SCRIPT, page => page.evaluate(async (args) => globalThis.captureGBuffer(args), { model: `/asset/${id}`, size, center: framing.center, radius: framing.radius, ssaa: impostor_1.IMPOSTOR_SSAA, views: impostor_1.IMPOSTOR_VIEWS, emissiveScale: exports.GBUFFER_EMISSIVE_SCALE }));
216
+ const decode = (text) => new Uint8Array(Buffer.from(text, 'base64'));
217
+ return { albedo: decode(result.albedo), normal: decode(result.normal), material: decode(result.material), emissive: decode(result.emissive) };
218
+ }
219
+ finally {
220
+ await (0, promises_1.rm)(directory, { recursive: true, force: true });
221
+ }
222
+ }
223
+ /** UASTC KTX2 with mips for each map: albedo and the emissive map as sRGB colour, the surface map as linear data. */
224
+ async function encodeGBufferAtlases(atlases, size = impostor_1.IMPOSTOR_SIZE) {
225
+ return {
226
+ albedo: await (0, basisEncoder_1.encodeHlodBasis)(atlases.albedo, size, size, true),
227
+ surface: await (0, basisEncoder_1.encodeHlodBasis)(atlases.surface, size, size, false),
228
+ emissive: atlases.emissive ? await (0, basisEncoder_1.encodeHlodBasis)(atlases.emissive, size, size, true) : null,
229
+ };
230
+ }
231
+ /** A top-row-first PNG of the albedo atlas and, for review, the surface map's normal as RGB over its own coverage; never part of the artifact. */
232
+ async function gbufferPreviewPng(atlases, size = impostor_1.IMPOSTOR_SIZE) {
233
+ const albedo = await (0, sharp_1.default)(Buffer.from(atlases.albedo), { raw: { width: size, height: size, channels: 4 } }).flip().png().toBuffer();
234
+ const review = new Uint8Array(atlases.surface.length);
235
+ for (let i = 0; i < size * size; i++) {
236
+ const p = i * 4, x = atlases.surface[p] / 255 * 2 - 1, y = atlases.surface[p + 1] / 255 * 2 - 1, z = Math.sqrt(Math.max(0, 1 - x * x - y * y));
237
+ review[p] = atlases.surface[p];
238
+ review[p + 1] = atlases.surface[p + 1];
239
+ review[p + 2] = Math.round((z * 0.5 + 0.5) * 255);
240
+ review[p + 3] = atlases.albedo[p + 3] > 0 ? 255 : 0;
241
+ }
242
+ const surface = await (0, sharp_1.default)(Buffer.from(review), { raw: { width: size, height: size, channels: 4 } }).flip().png().toBuffer();
243
+ return { albedo: new Uint8Array(albedo), surface: new Uint8Array(surface) };
244
+ }
245
+ //# sourceMappingURL=gbuffer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gbuffer.js","sourceRoot":"","sources":["../../src/itemLod/gbuffer.ts"],"names":[],"mappings":";;;;;;AA6CA,4CAIC;AA6BD,wCAiBC;AAGD,kCA2BC;AAsFD,oDAeC;AASD,oDAMC;AAGD,8CASC;AA7PD,6CAAyC;AACzC,+CAA0D;AAC1D,qCAAiC;AACjC,yCAAiC;AACjC,kDAA0B;AAC1B,2DAAkE;AAElE,4DAA4D;AAC5D,yCAAgG;AAEhG;;;;;;;;;GASG;AAEU,QAAA,eAAe,GAAG,WAAoB,CAAC;AACvC,QAAA,cAAc,GAAG,YAAqB,CAAC;AACpD,0GAA0G;AAC7F,QAAA,sBAAsB,GAAG,IAAI,CAAC;AAC3C;;;;GAIG;AACU,QAAA,qBAAqB,GAAG,GAAG,CAAC;AAC5B,QAAA,mBAAmB,GAAG,CAAC,CAAC;AACrC,gIAAgI;AAChI,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,cAAc,GAAG,CAAC,CAAC,CAAC,+CAA+C;AACzE,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,aAAa;AAInC;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,CAAS,EAAE,CAAS,EAAE,KAAK,GAAG,yBAAc;IAC3E,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACnE,MAAM,CAAC,GAAG,C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OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;QAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjL,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,IAAA,eAAK,EAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC9H,OAAO,EAAE,MAAM,EAAE,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;AAC9E,CAAC"}
@@ -19,8 +19,10 @@ export declare function impostorFraming(bounds: {
19
19
  * clear coat, glass, emission) under one neutral outdoor rig, so a white roof, blue-grey flanks, black glass and red lamps are
20
20
  * in the pixels; the runtime only scales the light, per channel, against the rig (`octahedralImpostorPool` in the engine).
21
21
  * `albedo` is the original unlit capture (item-lod/3 artifacts), which the runtime lights flat.
22
+ * `gbuffer/1` is not an atlas of colour at all but of materials (albedo, normal, roughness, metalness, glow, clear coat) on the hemi-oct/1 layout,
23
+ * captured and encoded by `gbuffer.ts`; this file's single-atlas capture refuses it.
22
24
  */
23
- export type ImpostorShading = 'lit/1' | 'albedo';
25
+ export type ImpostorShading = 'lit/1' | 'albedo' | 'gbuffer/1';
24
26
  export declare const IMPOSTOR_SHADING: ImpostorShading;
25
27
  /** The atlas stores the lit radiance at this fraction (headroom for 8 bits): the runtime multiplies by 1 / IMPOSTOR_BAKE_SCALE. */
26
28
  export declare const IMPOSTOR_BAKE_SCALE = 0.5;
@@ -123,6 +123,8 @@ window.captureItem = async ({ model, size, center, radius, lit, rig, ssaa }) =>
123
123
  `;
124
124
  /** RGBA, bottom row first (render-target order), exactly as the tree atlases are stored. */
125
125
  async function captureImpostorAtlas(captureGlb, framing, size = exports.IMPOSTOR_SIZE, shading = exports.IMPOSTOR_SHADING) {
126
+ if (shading === 'gbuffer/1')
127
+ throw new Error('gbuffer/1 is captured by captureGBufferPasses, not as one colour atlas');
126
128
  const directory = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'helix-item-lod-'));
127
129
  try {
128
130
  const sha256 = (0, node_crypto_1.createHash)('sha256').update(captureGlb).digest('hex');
@@ -1 +1 @@
1
- {"version":3,"file":"impostor.js","sourceRoot":"","sources":["../../src/itemLod/impostor.ts"],"names":[],"mappings":";;;;;;AAyBA,0CAIC;AAyGD,oDAcC;AAGD,kDAGC;AAGD,gDAEC;AAGD,4CAIC;AAtKD,6CAAyC;AACzC,+CAA0D;AAC1D,qCAAiC;AACjC,yCAAiC;AACjC,kDAA0B;AAC1B,2DAAkE;AAClE,uDAA+D;AAE/D,4DAA4D;AAE5D;;;;GAIG;AAEU,QAAA,aAAa,GAAG,GAAG,CAAC;AACpB,QAAA,cAAc,GAAG,CAAC,CAAC;AAQhC,SAAgB,eAAe,CAAC,MAA0D;IACxF,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAA6B,CAAC;IAC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