@ignifx/core 0.15.0 → 0.17.0

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 (54) hide show
  1. package/decoders/draco3dgltf.LICENSE.md +201 -0
  2. package/decoders/draco_decoder.js +116 -0
  3. package/decoders/draco_decoder_gltf.wasm +0 -0
  4. package/decoders/vendored.json +22 -0
  5. package/dist/{decoders-CHJ7vduE.js → decoders-BUQrlS8U.js} +3 -2
  6. package/dist/decoders-BUQrlS8U.js.map +1 -0
  7. package/dist/{environment-DPi0_0SP.js → environment-CMpzGXTz.js} +2 -2
  8. package/dist/{environment-DPi0_0SP.js.map → environment-CMpzGXTz.js.map} +1 -1
  9. package/dist/{ignifx-error-oYdVnT1S.js → ignifx-error-Der0bpHK.js} +7 -1
  10. package/dist/ignifx-error-Der0bpHK.js.map +1 -0
  11. package/dist/index.d.ts +29 -14609
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1715 -4899
  14. package/dist/index.js.map +1 -1
  15. package/dist/{instanced-mesh-instance-NnODkvqK.js → instanced-mesh-instance-BMhREEfx.js} +3 -2
  16. package/dist/{instanced-mesh-instance-NnODkvqK.js.map → instanced-mesh-instance-BMhREEfx.js.map} +1 -1
  17. package/dist/{material-plugin-BUlqLsap.js → material-plugin-B-hartHR.js} +2 -2
  18. package/dist/{material-plugin-BUlqLsap.js.map → material-plugin-B-hartHR.js.map} +1 -1
  19. package/dist/node-DznSvwap.js +301 -0
  20. package/dist/node-DznSvwap.js.map +1 -0
  21. package/dist/{post-effect-BHl7U56q.js → post-effect-CuoYvrhb.js} +3 -30
  22. package/dist/post-effect-CuoYvrhb.js.map +1 -0
  23. package/dist/{post-effect-compiler-CRek8VxQ.js → post-effect-compiler-Bps8QbiJ.js} +3 -3
  24. package/dist/{post-effect-compiler-CRek8VxQ.js.map → post-effect-compiler-Bps8QbiJ.js.map} +1 -1
  25. package/dist/prefab-overrides-76IhcF-e.d.ts +14925 -0
  26. package/dist/prefab-overrides-76IhcF-e.d.ts.map +1 -0
  27. package/dist/prefab-overrides-DGiGTSN-.js +2396 -0
  28. package/dist/prefab-overrides-DGiGTSN-.js.map +1 -0
  29. package/dist/prefab.d.ts +2 -0
  30. package/dist/prefab.js +2 -0
  31. package/dist/reflection-probe-C0pzGrG_.js +1883 -0
  32. package/dist/reflection-probe-C0pzGrG_.js.map +1 -0
  33. package/dist/reflection-probes-B8_vK9YR.js +551 -0
  34. package/dist/reflection-probes-B8_vK9YR.js.map +1 -0
  35. package/dist/{render-texture-C_TnaSz2.js → render-texture-UqRHRLQy.js} +15 -2
  36. package/dist/{render-texture-C_TnaSz2.js.map → render-texture-UqRHRLQy.js.map} +1 -1
  37. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  38. package/dist/{shader-material-B6p66wB8.js → shader-material-Cjfq7nFS.js} +5 -16
  39. package/dist/{shader-material-B6p66wB8.js.map → shader-material-Cjfq7nFS.js.map} +1 -1
  40. package/dist/{shader-material-C0TAUr4t.js → shader-material-DCjYDdkh.js} +2 -2
  41. package/dist/{shader-material-C0TAUr4t.js.map → shader-material-DCjYDdkh.js.map} +1 -1
  42. package/dist/{shader-pragma-BKCoZTTA.js → shader-pragma-cjEC-EPK.js} +2 -2
  43. package/dist/{shader-pragma-BKCoZTTA.js.map → shader-pragma-cjEC-EPK.js.map} +1 -1
  44. package/dist/{surface-shader-BaK0kvBB.js → surface-shader-D40hXQ8c.js} +4 -4
  45. package/dist/{surface-shader-BaK0kvBB.js.map → surface-shader-D40hXQ8c.js.map} +1 -1
  46. package/dist/{vec3-D-0Y2mzE.js → vec3-Cc19wl4r.js} +3 -300
  47. package/dist/vec3-Cc19wl4r.js.map +1 -0
  48. package/package.json +11 -5
  49. package/dist/decoders-CHJ7vduE.js.map +0 -1
  50. package/dist/ignifx-error-oYdVnT1S.js.map +0 -1
  51. package/dist/json-CzZZ6K4x.js +0 -24
  52. package/dist/json-CzZZ6K4x.js.map +0 -1
  53. package/dist/post-effect-BHl7U56q.js.map +0 -1
  54. package/dist/vec3-D-0Y2mzE.js.map +0 -1
@@ -0,0 +1,551 @@
1
+ import { K as toEntityHandle, L as readOwnerTag, a as EDITOR_ONLY_METADATA_KEY, i as selectReflectionProbe, r as resolveReflectionProbeSize } from "./reflection-probe-C0pzGrG_.js";
2
+ import { i as readSceneEnvironment } from "./environment-CMpzGXTz.js";
3
+ import { o as rebuildMaterialPipelines } from "./material-CGk5mAah.js";
4
+ import { n as deviceOf, r as removeTask, t as colorTextureOf } from "./render-texture-UqRHRLQy.js";
5
+ import { addTask, buildFrameGraphTask, clearPbrLocalEnvironment, createBankedFreeCamera, createRenderTarget, createRenderTask, enablePbrLocalCubemap, getFrameGraph, getPbrUnlit, isPbrMaterial, isPbrSkybox, setPbrEnvironment, setPbrLocalEnvironment } from "@babylonjs/lite";
6
+ //#region src/lite/gpu/reflection-probe.ts
7
+ /**
8
+ * Reflection probes (`docs/plan/2026-11-gi-phase-2-execution-plan.md`, step B1). Its own chunk,
9
+ * loaded only when a world has a `ReflectionProbe` (`CONSTITUTION.md` §2.5). Every Lite claim was
10
+ * read from `@babylonjs/lite@1.34.0`.
11
+ *
12
+ * - **Capture.** Lite has no cube capture, so six render tasks (`createRenderTask`, each with its own
13
+ * `rgba16float` target and a `createBankedFreeCamera` looking down one axis, 90° field of view,
14
+ * square target) are appended to the frame graph, switched on for the frames that capture, like
15
+ * `./render-texture.ts`. Faces follow the cube-map convention in Lite's left-handed space: +X, −X
16
+ * and ±Z faces use +Y as up, +Y uses −Z and −Y uses +Z.
17
+ * - **Cube and mips.** In the next frame's `PreRender`, a small render pipeline of ignifx's own copies
18
+ * each face into a cube texture, decoding gamma when `rendering.hdr` is off (the faces then hold
19
+ * tone-mapped sRGB), and box-downsamples the mip chain. It is submitted before Lite's frame, so queue
20
+ * order makes it read the frame that rendered the faces. Mips are not GGX-prefiltered.
21
+ * - **Environment.** The cube is wrapped in an `EnvironmentTextures` (`index.d.ts` 5598) that shares
22
+ * the scene environment's BRDF table and spherical harmonics, so diffuse light is unchanged.
23
+ * - **Materials.** `setPbrLocalEnvironment` (box parallax) or `setPbrEnvironment` (no box) per lit PBR
24
+ * material, then a material rebuild (`index.d.ts` 12612–12654). `enablePbrLocalCubemap` must have
25
+ * resolved first; it is called when the chunk loads.
26
+ * - **Culling mask.** Render tasks have no mesh filter, so each face task's `execute` hides the meshes
27
+ * the caller rejects and shows them again, as `./render-texture.ts` does for editor-only meshes.
28
+ */
29
+ /** The colour format of the faces and the cube. */
30
+ const PROBE_FORMAT = "rgba16float";
31
+ /** The depth/stencil format Lite's own render tasks use. */
32
+ const DEPTH_STENCIL_FORMAT = "depth24plus-stencil8";
33
+ /** Each face's view direction and up vector, in cube-face order +X, −X, +Y, −Y, +Z, −Z. */
34
+ const FACES = [
35
+ [
36
+ 1,
37
+ 0,
38
+ 0,
39
+ 0,
40
+ 1,
41
+ 0
42
+ ],
43
+ [
44
+ -1,
45
+ 0,
46
+ 0,
47
+ 0,
48
+ 1,
49
+ 0
50
+ ],
51
+ [
52
+ 0,
53
+ 1,
54
+ 0,
55
+ 0,
56
+ 0,
57
+ -1
58
+ ],
59
+ [
60
+ 0,
61
+ -1,
62
+ 0,
63
+ 0,
64
+ 0,
65
+ 1
66
+ ],
67
+ [
68
+ 0,
69
+ 0,
70
+ 1,
71
+ 0,
72
+ 1,
73
+ 0
74
+ ],
75
+ [
76
+ 0,
77
+ 0,
78
+ -1,
79
+ 0,
80
+ 1,
81
+ 0
82
+ ]
83
+ ];
84
+ /** A full-screen triangle that copies, decodes, or (through a linear sampler) box-downsamples. */
85
+ const BLIT_WGSL = `
86
+ struct VsOut { @builtin(position) position: vec4<f32>, @location(0) uv: vec2<f32> };
87
+ @vertex fn vs(@builtin(vertex_index) index: u32) -> VsOut {
88
+ let corner = vec2<f32>(f32((index << 1u) & 2u), f32(index & 2u));
89
+ var out: VsOut;
90
+ out.position = vec4<f32>(corner * 2.0 - 1.0, 0.0, 1.0);
91
+ out.uv = vec2<f32>(corner.x, 1.0 - corner.y);
92
+ return out;
93
+ }
94
+ @group(0) @binding(0) var source: texture_2d<f32>;
95
+ @group(0) @binding(1) var sourceSampler: sampler;
96
+ @fragment fn copy(in: VsOut) -> @location(0) vec4<f32> {
97
+ return vec4<f32>(textureSampleLevel(source, sourceSampler, in.uv, 0.0).rgb, 1.0);
98
+ }
99
+ @fragment fn decode(in: VsOut) -> @location(0) vec4<f32> {
100
+ let colour = textureSampleLevel(source, sourceSampler, in.uv, 0.0).rgb;
101
+ return vec4<f32>(pow(max(colour, vec3<f32>(0.0)), vec3<f32>(2.2)), 1.0);
102
+ }
103
+ `;
104
+ /** Each device's pipelines, the map created on first use (coding standards §4). */
105
+ let pipelineCache = null;
106
+ /**
107
+ * Loads Lite's local-cubemap shader path. Resolve it before assigning any probe.
108
+ *
109
+ * @returns A promise that resolves once the path is registered.
110
+ *
111
+ * @internal
112
+ */
113
+ function enableReflectionProbes() {
114
+ return enablePbrLocalCubemap();
115
+ }
116
+ /**
117
+ * Creates a probe's six face passes, switched off, at the end of the scene's frame graph.
118
+ *
119
+ * @param engine - The WebGPU engine.
120
+ * @param scene - The registered render scene.
121
+ * @param size - The face size in pixels, a power of two.
122
+ * @param excludeKey - The `metadata` key that, set to `true` on a mesh, keeps it out of the faces.
123
+ * @param accept - Whether a mesh's owner may be captured; `false` hides it during the faces.
124
+ * @returns The probe.
125
+ *
126
+ * @internal
127
+ */
128
+ function createLiteReflectionProbe(engine, scene, size, excludeKey, accept) {
129
+ const targets = [];
130
+ const tasks = [];
131
+ const cameras = [];
132
+ const hidden = [];
133
+ for (const face of FACES) {
134
+ const target = createRenderTarget({
135
+ lbl: "ignifx:reflection-probe-face",
136
+ format: PROBE_FORMAT,
137
+ dFormat: DEPTH_STENCIL_FORMAT,
138
+ samples: 1,
139
+ size: {
140
+ width: size,
141
+ height: size
142
+ }
143
+ });
144
+ const camera = createBankedFreeCamera({
145
+ x: 0,
146
+ y: 0,
147
+ z: 0
148
+ }, {
149
+ x: face[0],
150
+ y: face[1],
151
+ z: face[2]
152
+ }, {
153
+ x: face[3],
154
+ y: face[4],
155
+ z: face[5]
156
+ });
157
+ camera.fov = Math.PI / 2;
158
+ const task = createRenderTask({
159
+ name: "ignifx:reflection-probe",
160
+ rt: target,
161
+ cam: camera
162
+ }, engine, scene);
163
+ task.executionEnabled = false;
164
+ const execute = task.execute?.bind(task);
165
+ if (execute === void 0) throw new TypeError("Lite's render task has no execute(); reflection-probe.ts needs updating for this Lite.");
166
+ task.execute = () => {
167
+ for (const mesh of scene.meshes) if (mesh.visible !== false && (mesh.metadata?.[excludeKey] === true || !accept(readOwnerTag(mesh)))) {
168
+ mesh.visible = false;
169
+ hidden.push(mesh);
170
+ }
171
+ try {
172
+ return execute();
173
+ } finally {
174
+ for (const mesh of hidden) mesh.visible = true;
175
+ hidden.length = 0;
176
+ }
177
+ };
178
+ addTask(scene, task);
179
+ buildFrameGraphTask(getFrameGraph(scene), task);
180
+ targets.push(target);
181
+ tasks.push(task);
182
+ cameras.push(camera);
183
+ }
184
+ let cube = null;
185
+ let environment = null;
186
+ let isCapturing = false;
187
+ let isDisposed = false;
188
+ return {
189
+ size,
190
+ get environment() {
191
+ return environment;
192
+ },
193
+ capture(x, y, z, near, far) {
194
+ if (isDisposed) return;
195
+ for (let index = 0; index < FACES.length; index += 1) {
196
+ const face = FACES[index];
197
+ const camera = cameras[index];
198
+ const task = tasks[index];
199
+ if (face === void 0 || camera === void 0 || task === void 0) continue;
200
+ camera.position.set(x, y, z);
201
+ camera.target.set(x + face[0], y + face[1], z + face[2]);
202
+ camera.nearPlane = near;
203
+ camera.farPlane = far;
204
+ task.executionEnabled = true;
205
+ }
206
+ isCapturing = true;
207
+ },
208
+ resolve(decodeGamma) {
209
+ if (isDisposed || !isCapturing) return false;
210
+ isCapturing = false;
211
+ for (const task of tasks) task.executionEnabled = false;
212
+ const device = deviceOf(engine);
213
+ const base = readSceneEnvironment(scene);
214
+ if (device === null || base === null) return false;
215
+ cube ??= device.createTexture({
216
+ label: "ignifx:reflection-probe",
217
+ size: [
218
+ size,
219
+ size,
220
+ FACES.length
221
+ ],
222
+ format: PROBE_FORMAT,
223
+ mipLevelCount: Math.log2(size) + 1,
224
+ usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC
225
+ });
226
+ if (!blitFaces(device, cube, targets, decodeGamma)) return false;
227
+ if (environment !== null) return false;
228
+ environment = {
229
+ specularCube: cube,
230
+ specularCubeView: cube.createView({ dimension: "cube" }),
231
+ brdfLut: base.brdfLut,
232
+ brdfLutView: base.brdfLutView,
233
+ cubeSampler: base.cubeSampler,
234
+ brdfSampler: base.brdfSampler,
235
+ irradianceSH: base.irradianceSH,
236
+ sphericalHarmonics: base.sphericalHarmonics,
237
+ lodGenerationScale: base.lodGenerationScale,
238
+ lodGenerationOffset: base.lodGenerationOffset ?? 0
239
+ };
240
+ return true;
241
+ },
242
+ dispose() {
243
+ if (isDisposed) return;
244
+ isDisposed = true;
245
+ for (const task of tasks) {
246
+ task.executionEnabled = false;
247
+ removeTask(scene, task);
248
+ task.dispose();
249
+ }
250
+ cube = null;
251
+ environment = null;
252
+ }
253
+ };
254
+ }
255
+ /**
256
+ * Copies the six face targets into the cube's first mip and box-downsamples the rest.
257
+ *
258
+ * @param device - The device.
259
+ * @param cube - The cube texture, six layers.
260
+ * @param targets - The face targets, in cube-face order.
261
+ * @param decodeGamma - Whether to decode gamma on the copy.
262
+ * @returns `false` when a face target has no texture yet.
263
+ */
264
+ function blitFaces(device, cube, targets, decodeGamma) {
265
+ const pipelines = blitPipelines(device);
266
+ const encoder = device.createCommandEncoder({ label: "ignifx:reflection-probe-mips" });
267
+ for (let face = 0; face < targets.length; face += 1) {
268
+ const target = targets[face];
269
+ const source = target === void 0 ? null : colorTextureOf(target);
270
+ if (source === null) return false;
271
+ draw(device, encoder, decodeGamma ? pipelines.decode : pipelines.copy, pipelines.sampler, source.createView(), cubeFace(cube, face, 0));
272
+ for (let mip = 1; mip < cube.mipLevelCount; mip += 1) draw(device, encoder, pipelines.copy, pipelines.sampler, cubeFace(cube, face, mip - 1), cubeFace(cube, face, mip));
273
+ }
274
+ device.queue.submit([encoder.finish()]);
275
+ return true;
276
+ }
277
+ /**
278
+ * A 2D view of one face and mip of the cube.
279
+ *
280
+ * @param cube - The cube texture.
281
+ * @param face - The layer.
282
+ * @param mip - The mip level.
283
+ * @returns The view.
284
+ */
285
+ function cubeFace(cube, face, mip) {
286
+ return cube.createView({
287
+ dimension: "2d",
288
+ baseArrayLayer: face,
289
+ arrayLayerCount: 1,
290
+ baseMipLevel: mip,
291
+ mipLevelCount: 1
292
+ });
293
+ }
294
+ /**
295
+ * Encodes one full-screen blit.
296
+ *
297
+ * @param device - The device.
298
+ * @param encoder - The encoder.
299
+ * @param pipeline - The pipeline.
300
+ * @param sampler - The linear sampler.
301
+ * @param source - The view to read.
302
+ * @param destination - The view to write.
303
+ */
304
+ function draw(device, encoder, pipeline, sampler, source, destination) {
305
+ const bindGroup = device.createBindGroup({
306
+ layout: pipeline.getBindGroupLayout(0),
307
+ entries: [{
308
+ binding: 0,
309
+ resource: source
310
+ }, {
311
+ binding: 1,
312
+ resource: sampler
313
+ }]
314
+ });
315
+ const pass = encoder.beginRenderPass({ colorAttachments: [{
316
+ view: destination,
317
+ loadOp: "clear",
318
+ storeOp: "store",
319
+ clearValue: {
320
+ r: 0,
321
+ g: 0,
322
+ b: 0,
323
+ a: 1
324
+ }
325
+ }] });
326
+ pass.setPipeline(pipeline);
327
+ pass.setBindGroup(0, bindGroup);
328
+ pass.draw(3);
329
+ pass.end();
330
+ }
331
+ /**
332
+ * The device's blit pipelines.
333
+ *
334
+ * @param device - The device.
335
+ * @returns The pipelines, created on first use.
336
+ */
337
+ function blitPipelines(device) {
338
+ pipelineCache ??= /* @__PURE__ */ new WeakMap();
339
+ const cached = pipelineCache.get(device);
340
+ if (cached !== void 0) return cached;
341
+ const module = device.createShaderModule({
342
+ label: "ignifx:reflection-probe-blit",
343
+ code: BLIT_WGSL
344
+ });
345
+ const pipeline = (entryPoint) => device.createRenderPipeline({
346
+ label: `ignifx:reflection-probe-${entryPoint}`,
347
+ layout: "auto",
348
+ vertex: {
349
+ module,
350
+ entryPoint: "vs"
351
+ },
352
+ fragment: {
353
+ module,
354
+ entryPoint,
355
+ targets: [{ format: PROBE_FORMAT }]
356
+ },
357
+ primitive: { topology: "triangle-list" }
358
+ });
359
+ const created = {
360
+ copy: pipeline("copy"),
361
+ decode: pipeline("decode"),
362
+ sampler: device.createSampler({
363
+ magFilter: "linear",
364
+ minFilter: "linear"
365
+ })
366
+ };
367
+ pipelineCache.set(device, created);
368
+ return created;
369
+ }
370
+ /**
371
+ * Calls `visit` for every mesh whose material is a lit, non-skybox PBR material.
372
+ *
373
+ * @param scene - The scene.
374
+ * @param visit - Receives the material and the mesh's world position.
375
+ *
376
+ * @internal
377
+ */
378
+ function forEachReflectiveMesh(scene, visit) {
379
+ const meshes = scene.meshes;
380
+ for (let index = 0; index < meshes.length; index += 1) {
381
+ const mesh = meshes[index];
382
+ const material = mesh?.material;
383
+ if (mesh === void 0 || material === void 0 || material === null || !isPbrMaterial(material)) continue;
384
+ if (getPbrUnlit(material) !== void 0 || isPbrSkybox(material)) continue;
385
+ const world = mesh.worldMatrix;
386
+ visit(material, world[12] ?? 0, world[13] ?? 0, world[14] ?? 0);
387
+ }
388
+ }
389
+ /**
390
+ * Points a PBR material at a probe, or back at the scene environment, and rebuilds it.
391
+ *
392
+ * @param scene - The registered scene.
393
+ * @param material - The material.
394
+ * @param binding - The probe, or `null` for the scene environment.
395
+ *
396
+ * @internal
397
+ */
398
+ function assignReflectionProbe(scene, material, binding) {
399
+ if (binding === null) clearPbrLocalEnvironment(material);
400
+ else if (binding.box === null) setPbrEnvironment(material, binding.environment);
401
+ else setPbrLocalEnvironment(material, binding.environment, {
402
+ shape: "box",
403
+ capturePosition: binding.position,
404
+ projectionPosition: binding.position,
405
+ projectionSize: binding.box
406
+ });
407
+ rebuildMaterialPipelines(scene, material);
408
+ }
409
+ //#endregion
410
+ //#region src/render/gpu/reflection-probes.ts
411
+ /**
412
+ * The render layer's half of reflection probes (`docs/plan/2026-11-gi-phase-2-execution-plan.md`,
413
+ * step B1): which probe captures when, and which probe each PBR material reflects. Loaded with
414
+ * `../../lite/gpu/reflection-probe.ts` as one chunk, only once a world has a `ReflectionProbe`.
415
+ */
416
+ /**
417
+ * How many consecutive frames one capture request renders. Lite compiles material pipelines
418
+ * asynchronously, so a single frame right after start or after a scene change can miss meshes that
419
+ * are still compiling; repeating it for a few frames catches them.
420
+ */
421
+ const CAPTURE_FRAMES = 8;
422
+ /**
423
+ * Creates the runtime once Lite's local-cubemap shader path is loaded.
424
+ *
425
+ * @param engine - The engine.
426
+ * @param scene - The registered render scene.
427
+ * @returns The runtime.
428
+ *
429
+ * @internal
430
+ */
431
+ async function createReflectionProbeRuntime(engine, scene) {
432
+ await enableReflectionProbes();
433
+ const states = /* @__PURE__ */ new Map();
434
+ const assigned = /* @__PURE__ */ new Map();
435
+ const seen = /* @__PURE__ */ new Set();
436
+ const candidates = [];
437
+ const release = (probe, state) => {
438
+ state.lite.dispose();
439
+ states.delete(probe);
440
+ };
441
+ const assignMaterials = () => {
442
+ seen.clear();
443
+ forEachReflectiveMesh(scene, (material, x, y, z) => {
444
+ if (seen.has(material)) return;
445
+ seen.add(material);
446
+ const index = selectReflectionProbe(x, y, z, candidates);
447
+ const binding = candidates[index]?.binding ?? null;
448
+ const current = assigned.get(material);
449
+ if (current === binding || current === void 0 && binding === null) return;
450
+ assigned.set(material, binding);
451
+ assignReflectionProbe(scene, material, binding);
452
+ });
453
+ };
454
+ return {
455
+ update(world, probes, isHdr) {
456
+ for (const [probe, state] of states) if (!probes.includes(probe) || resolveReflectionProbeSize(probe.size) !== state.lite.size) release(probe, state);
457
+ candidates.length = 0;
458
+ for (const probe of probes) {
459
+ const wantsRefresh = probe.consumeRefreshRequest();
460
+ if (!probe.isEnabledInHierarchy) continue;
461
+ let state = states.get(probe);
462
+ if (state === void 0) {
463
+ state = {
464
+ lite: createLiteReflectionProbe(engine, scene, resolveReflectionProbeSize(probe.size), EDITOR_ONLY_METADATA_KEY, cullingFilter(world, probe)),
465
+ framesToCapture: probe.refreshMode === "once" ? CAPTURE_FRAMES : 0,
466
+ binding: null
467
+ };
468
+ states.set(probe, state);
469
+ }
470
+ state.lite.resolve(!isHdr);
471
+ const matrix = probe.entity.transform.worldMatrix;
472
+ const x = matrix[12] ?? 0;
473
+ const y = matrix[13] ?? 0;
474
+ const z = matrix[14] ?? 0;
475
+ if (wantsRefresh) state.framesToCapture = CAPTURE_FRAMES;
476
+ if (state.framesToCapture > 0 || probe.refreshMode === "everyFrame") {
477
+ state.lite.capture(x, y, z, probe.near, probe.far);
478
+ state.framesToCapture = Math.max(0, state.framesToCapture - 1);
479
+ }
480
+ const environment = state.lite.environment;
481
+ if (environment === null) continue;
482
+ const box = probe.boxProjection;
483
+ const binding = bindingFor(state.binding, environment, x, y, z, box);
484
+ state.binding = binding;
485
+ candidates.push({
486
+ x,
487
+ y,
488
+ z,
489
+ box,
490
+ binding
491
+ });
492
+ }
493
+ assignMaterials();
494
+ },
495
+ dispose() {
496
+ for (const [probe, state] of states) release(probe, state);
497
+ for (const [material, binding] of assigned) if (binding !== null) assignReflectionProbe(scene, material, null);
498
+ assigned.clear();
499
+ }
500
+ };
501
+ }
502
+ /**
503
+ * Builds the mesh filter of a probe's capture: with a non-empty `cullingMask`, only meshes whose
504
+ * entity is on one of its layers.
505
+ *
506
+ * @param world - The world, for the handle and layer tables.
507
+ * @param probe - The probe; its mask is read on every call, so edits apply to the next capture.
508
+ * @returns The filter.
509
+ */
510
+ function cullingFilter(world, probe) {
511
+ return (tag) => {
512
+ const mask = probe.cullingMask;
513
+ if (mask.length === 0) return true;
514
+ const entity = tag === null ? null : world.getEntityByHandle(toEntityHandle(tag.entity));
515
+ if (entity === null) return false;
516
+ for (const name of mask) if (world.layers.indexOf(name) === entity.layer) return true;
517
+ return false;
518
+ };
519
+ }
520
+ /**
521
+ * The binding a probe's materials use: the previous one while nothing it holds changed, so a still
522
+ * probe never rebuilds its materials.
523
+ *
524
+ * @param previous - The binding last used, or `null`.
525
+ * @param environment - The probe's environment.
526
+ * @param x - The probe's world X.
527
+ * @param y - The probe's world Y.
528
+ * @param z - The probe's world Z.
529
+ * @param box - The projection box size, or `null`.
530
+ * @returns The binding.
531
+ */
532
+ function bindingFor(previous, environment, x, y, z, box) {
533
+ if (previous !== null && previous.environment === environment && previous.position[0] === x && previous.position[1] === y && previous.position[2] === z && (box === null ? previous.box === null : previous.box !== null && previous.box[0] === box.x && previous.box[1] === box.y && previous.box[2] === box.z)) return previous;
534
+ return {
535
+ environment,
536
+ position: [
537
+ x,
538
+ y,
539
+ z
540
+ ],
541
+ box: box === null ? null : [
542
+ box.x,
543
+ box.y,
544
+ box.z
545
+ ]
546
+ };
547
+ }
548
+ //#endregion
549
+ export { createReflectionProbeRuntime };
550
+
551
+ //# sourceMappingURL=reflection-probes-B8_vK9YR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reflection-probes-B8_vK9YR.js","names":[],"sources":["../src/lite/gpu/reflection-probe.ts","../src/render/gpu/reflection-probes.ts"],"sourcesContent":["import {\n addTask,\n buildFrameGraphTask,\n clearPbrLocalEnvironment,\n createBankedFreeCamera,\n createRenderTarget,\n createRenderTask,\n enablePbrLocalCubemap,\n getFrameGraph,\n getPbrUnlit,\n isPbrMaterial,\n isPbrSkybox,\n setPbrEnvironment,\n setPbrLocalEnvironment,\n} from \"@babylonjs/lite\";\nimport { rebuildMaterialPipelines } from \"../material.js\";\nimport { readOwnerTag } from \"../picking.js\";\nimport { readSceneEnvironment } from \"./environment.js\";\nimport { colorTextureOf, deviceOf, removeTask } from \"./render-texture.js\";\nimport type { NodeTag } from \"../node.js\";\nimport type {\n BankedFreeCamera,\n EngineContext,\n EnvironmentTextures,\n Mesh,\n PbrMaterialProps,\n RenderTarget,\n RenderTask,\n SceneContext,\n} from \"@babylonjs/lite\";\n\n/**\n * Reflection probes (`docs/plan/2026-11-gi-phase-2-execution-plan.md`, step B1). Its own chunk,\n * loaded only when a world has a `ReflectionProbe` (`CONSTITUTION.md` §2.5). Every Lite claim was\n * read from `@babylonjs/lite@1.34.0`.\n *\n * - **Capture.** Lite has no cube capture, so six render tasks (`createRenderTask`, each with its own\n * `rgba16float` target and a `createBankedFreeCamera` looking down one axis, 90° field of view,\n * square target) are appended to the frame graph, switched on for the frames that capture, like\n * `./render-texture.ts`. Faces follow the cube-map convention in Lite's left-handed space: +X, −X\n * and ±Z faces use +Y as up, +Y uses −Z and −Y uses +Z.\n * - **Cube and mips.** In the next frame's `PreRender`, a small render pipeline of ignifx's own copies\n * each face into a cube texture, decoding gamma when `rendering.hdr` is off (the faces then hold\n * tone-mapped sRGB), and box-downsamples the mip chain. It is submitted before Lite's frame, so queue\n * order makes it read the frame that rendered the faces. Mips are not GGX-prefiltered.\n * - **Environment.** The cube is wrapped in an `EnvironmentTextures` (`index.d.ts` 5598) that shares\n * the scene environment's BRDF table and spherical harmonics, so diffuse light is unchanged.\n * - **Materials.** `setPbrLocalEnvironment` (box parallax) or `setPbrEnvironment` (no box) per lit PBR\n * material, then a material rebuild (`index.d.ts` 12612–12654). `enablePbrLocalCubemap` must have\n * resolved first; it is called when the chunk loads.\n * - **Culling mask.** Render tasks have no mesh filter, so each face task's `execute` hides the meshes\n * the caller rejects and shows them again, as `./render-texture.ts` does for editor-only meshes.\n */\n\n/** The colour format of the faces and the cube. */\nconst PROBE_FORMAT: GPUTextureFormat = \"rgba16float\";\n\n/** The depth/stencil format Lite's own render tasks use. */\nconst DEPTH_STENCIL_FORMAT: GPUTextureFormat = \"depth24plus-stencil8\";\n\n/** Each face's view direction and up vector, in cube-face order +X, −X, +Y, −Y, +Z, −Z. */\nconst FACES: readonly (readonly [number, number, number, number, number, number])[] = [\n [1, 0, 0, 0, 1, 0],\n [-1, 0, 0, 0, 1, 0],\n [0, 1, 0, 0, 0, -1],\n [0, -1, 0, 0, 0, 1],\n [0, 0, 1, 0, 1, 0],\n [0, 0, -1, 0, 1, 0],\n];\n\n/** A full-screen triangle that copies, decodes, or (through a linear sampler) box-downsamples. */\nconst BLIT_WGSL = /* wgsl */ `\nstruct VsOut { @builtin(position) position: vec4<f32>, @location(0) uv: vec2<f32> };\n@vertex fn vs(@builtin(vertex_index) index: u32) -> VsOut {\n let corner = vec2<f32>(f32((index << 1u) & 2u), f32(index & 2u));\n var out: VsOut;\n out.position = vec4<f32>(corner * 2.0 - 1.0, 0.0, 1.0);\n out.uv = vec2<f32>(corner.x, 1.0 - corner.y);\n return out;\n}\n@group(0) @binding(0) var source: texture_2d<f32>;\n@group(0) @binding(1) var sourceSampler: sampler;\n@fragment fn copy(in: VsOut) -> @location(0) vec4<f32> {\n return vec4<f32>(textureSampleLevel(source, sourceSampler, in.uv, 0.0).rgb, 1.0);\n}\n@fragment fn decode(in: VsOut) -> @location(0) vec4<f32> {\n let colour = textureSampleLevel(source, sourceSampler, in.uv, 0.0).rgb;\n return vec4<f32>(pow(max(colour, vec3<f32>(0.0)), vec3<f32>(2.2)), 1.0);\n}\n`;\n\n/** The blit pipelines of one device. */\ninterface BlitPipelines {\n readonly copy: GPURenderPipeline;\n readonly decode: GPURenderPipeline;\n readonly sampler: GPUSampler;\n}\n\n/** Each device's pipelines, the map created on first use (coding standards §4). */\nlet pipelineCache: WeakMap<GPUDevice, BlitPipelines> | null = null;\n\n/**\n * One probe's capture passes and cube map.\n *\n * @internal\n */\nexport interface LiteReflectionProbe {\n /** The cube face size in pixels. */\n readonly size: number;\n /** The environment materials reflect, `null` until the first capture resolved. Stable afterwards. */\n readonly environment: EnvironmentTextures | null;\n /**\n * Renders the six faces in the coming frame.\n *\n * @param x - The world X of the capture point.\n * @param y - The world Y.\n * @param z - The world Z.\n * @param near - The near clip distance.\n * @param far - The far clip distance.\n */\n capture(x: number, y: number, z: number, near: number, far: number): void;\n /**\n * Turns the faces the last frame rendered into the cube map, when a capture ran.\n *\n * @param decodeGamma - Whether the faces hold gamma-encoded colour (`rendering.hdr` off).\n * @returns `true` when {@link LiteReflectionProbe.environment} was created by this call.\n */\n resolve(decodeGamma: boolean): boolean;\n /** Removes the passes and frees the textures. Idempotent. */\n dispose(): void;\n}\n\n/**\n * Loads Lite's local-cubemap shader path. Resolve it before assigning any probe.\n *\n * @returns A promise that resolves once the path is registered.\n *\n * @internal\n */\nexport function enableReflectionProbes(): Promise<void> {\n return enablePbrLocalCubemap();\n}\n\n/**\n * Creates a probe's six face passes, switched off, at the end of the scene's frame graph.\n *\n * @param engine - The WebGPU engine.\n * @param scene - The registered render scene.\n * @param size - The face size in pixels, a power of two.\n * @param excludeKey - The `metadata` key that, set to `true` on a mesh, keeps it out of the faces.\n * @param accept - Whether a mesh's owner may be captured; `false` hides it during the faces.\n * @returns The probe.\n *\n * @internal\n */\nexport function createLiteReflectionProbe(\n engine: EngineContext,\n scene: SceneContext,\n size: number,\n excludeKey: string,\n accept: (tag: NodeTag | null) => boolean,\n): LiteReflectionProbe {\n const targets: RenderTarget[] = [];\n const tasks: RenderTask[] = [];\n const cameras: BankedFreeCamera[] = [];\n const hidden: Mesh[] = [];\n for (const face of FACES) {\n const target = createRenderTarget({\n lbl: \"ignifx:reflection-probe-face\",\n format: PROBE_FORMAT,\n dFormat: DEPTH_STENCIL_FORMAT,\n samples: 1,\n size: { width: size, height: size },\n });\n const camera = createBankedFreeCamera(\n { x: 0, y: 0, z: 0 },\n { x: face[0], y: face[1], z: face[2] },\n {\n x: face[3],\n y: face[4],\n z: face[5],\n },\n );\n camera.fov = Math.PI / 2;\n const task = createRenderTask({ name: \"ignifx:reflection-probe\", rt: target, cam: camera }, engine, scene);\n task.executionEnabled = false;\n const execute = task.execute?.bind(task);\n if (execute === undefined) {\n throw new TypeError(\"Lite's render task has no execute(); reflection-probe.ts needs updating for this Lite.\");\n }\n task.execute = (): number => {\n for (const mesh of scene.meshes) {\n if (mesh.visible !== false && (mesh.metadata?.[excludeKey] === true || !accept(readOwnerTag(mesh)))) {\n mesh.visible = false;\n hidden.push(mesh);\n }\n }\n try {\n return execute();\n } finally {\n for (const mesh of hidden) {\n mesh.visible = true;\n }\n hidden.length = 0;\n }\n };\n addTask(scene, task);\n buildFrameGraphTask(getFrameGraph(scene), task);\n targets.push(target);\n tasks.push(task);\n cameras.push(camera);\n }\n let cube: GPUTexture | null = null;\n let environment: EnvironmentTextures | null = null;\n let isCapturing = false;\n let isDisposed = false;\n return {\n size,\n get environment(): EnvironmentTextures | null {\n return environment;\n },\n capture(x: number, y: number, z: number, near: number, far: number): void {\n if (isDisposed) {\n return;\n }\n for (let index = 0; index < FACES.length; index += 1) {\n const face = FACES[index];\n const camera = cameras[index];\n const task = tasks[index];\n if (face === undefined || camera === undefined || task === undefined) {\n continue;\n }\n camera.position.set(x, y, z);\n camera.target.set(x + face[0], y + face[1], z + face[2]);\n camera.nearPlane = near;\n camera.farPlane = far;\n task.executionEnabled = true;\n }\n isCapturing = true;\n },\n resolve(decodeGamma: boolean): boolean {\n if (isDisposed || !isCapturing) {\n return false;\n }\n isCapturing = false;\n for (const task of tasks) {\n task.executionEnabled = false;\n }\n const device = deviceOf(engine);\n const base = readSceneEnvironment(scene);\n if (device === null || base === null) {\n return false;\n }\n cube ??= device.createTexture({\n label: \"ignifx:reflection-probe\",\n size: [size, size, FACES.length],\n format: PROBE_FORMAT,\n mipLevelCount: Math.log2(size) + 1,\n usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC,\n });\n if (!blitFaces(device, cube, targets, decodeGamma)) {\n return false;\n }\n if (environment !== null) {\n return false;\n }\n environment = {\n specularCube: cube,\n specularCubeView: cube.createView({ dimension: \"cube\" }),\n brdfLut: base.brdfLut,\n brdfLutView: base.brdfLutView,\n cubeSampler: base.cubeSampler,\n brdfSampler: base.brdfSampler,\n irradianceSH: base.irradianceSH,\n sphericalHarmonics: base.sphericalHarmonics,\n lodGenerationScale: base.lodGenerationScale,\n lodGenerationOffset: base.lodGenerationOffset ?? 0,\n };\n return true;\n },\n dispose(): void {\n if (isDisposed) {\n return;\n }\n isDisposed = true;\n for (const task of tasks) {\n task.executionEnabled = false;\n removeTask(scene, task);\n task.dispose();\n }\n // Materials still bound to the cube are reassigned by the caller before the next frame; the\n // cube itself is left for the garbage collector, since a bind group in flight may name it.\n cube = null;\n environment = null;\n },\n };\n}\n\n/**\n * Copies the six face targets into the cube's first mip and box-downsamples the rest.\n *\n * @param device - The device.\n * @param cube - The cube texture, six layers.\n * @param targets - The face targets, in cube-face order.\n * @param decodeGamma - Whether to decode gamma on the copy.\n * @returns `false` when a face target has no texture yet.\n */\nfunction blitFaces(\n device: GPUDevice,\n cube: GPUTexture,\n targets: readonly RenderTarget[],\n decodeGamma: boolean,\n): boolean {\n const pipelines = blitPipelines(device);\n const encoder = device.createCommandEncoder({ label: \"ignifx:reflection-probe-mips\" });\n for (let face = 0; face < targets.length; face += 1) {\n const target = targets[face];\n const source = target === undefined ? null : colorTextureOf(target);\n if (source === null) {\n return false;\n }\n draw(\n device,\n encoder,\n decodeGamma ? pipelines.decode : pipelines.copy,\n pipelines.sampler,\n source.createView(),\n cubeFace(cube, face, 0),\n );\n for (let mip = 1; mip < cube.mipLevelCount; mip += 1) {\n draw(\n device,\n encoder,\n pipelines.copy,\n pipelines.sampler,\n cubeFace(cube, face, mip - 1),\n cubeFace(cube, face, mip),\n );\n }\n }\n device.queue.submit([encoder.finish()]);\n return true;\n}\n\n/**\n * A 2D view of one face and mip of the cube.\n *\n * @param cube - The cube texture.\n * @param face - The layer.\n * @param mip - The mip level.\n * @returns The view.\n */\nfunction cubeFace(cube: GPUTexture, face: number, mip: number): GPUTextureView {\n return cube.createView({\n dimension: \"2d\",\n baseArrayLayer: face,\n arrayLayerCount: 1,\n baseMipLevel: mip,\n mipLevelCount: 1,\n });\n}\n\n/**\n * Encodes one full-screen blit.\n *\n * @param device - The device.\n * @param encoder - The encoder.\n * @param pipeline - The pipeline.\n * @param sampler - The linear sampler.\n * @param source - The view to read.\n * @param destination - The view to write.\n */\nfunction draw(\n device: GPUDevice,\n encoder: GPUCommandEncoder,\n pipeline: GPURenderPipeline,\n sampler: GPUSampler,\n source: GPUTextureView,\n destination: GPUTextureView,\n): void {\n const bindGroup = device.createBindGroup({\n layout: pipeline.getBindGroupLayout(0),\n entries: [\n { binding: 0, resource: source },\n { binding: 1, resource: sampler },\n ],\n });\n const pass = encoder.beginRenderPass({\n colorAttachments: [\n { view: destination, loadOp: \"clear\", storeOp: \"store\", clearValue: { r: 0, g: 0, b: 0, a: 1 } },\n ],\n });\n pass.setPipeline(pipeline);\n pass.setBindGroup(0, bindGroup);\n pass.draw(3);\n pass.end();\n}\n\n/**\n * The device's blit pipelines.\n *\n * @param device - The device.\n * @returns The pipelines, created on first use.\n */\nfunction blitPipelines(device: GPUDevice): BlitPipelines {\n pipelineCache ??= new WeakMap();\n const cached = pipelineCache.get(device);\n if (cached !== undefined) {\n return cached;\n }\n const module = device.createShaderModule({ label: \"ignifx:reflection-probe-blit\", code: BLIT_WGSL });\n const pipeline = (entryPoint: string): GPURenderPipeline =>\n device.createRenderPipeline({\n label: `ignifx:reflection-probe-${entryPoint}`,\n layout: \"auto\",\n vertex: { module, entryPoint: \"vs\" },\n fragment: { module, entryPoint, targets: [{ format: PROBE_FORMAT }] },\n primitive: { topology: \"triangle-list\" },\n });\n const created: BlitPipelines = {\n copy: pipeline(\"copy\"),\n decode: pipeline(\"decode\"),\n sampler: device.createSampler({ magFilter: \"linear\", minFilter: \"linear\" }),\n };\n pipelineCache.set(device, created);\n return created;\n}\n\n/**\n * What a material reflects: a probe's environment, where it sits, and its projection box.\n *\n * @internal\n */\nexport interface LiteProbeBinding {\n /** The probe's environment. */\n readonly environment: EnvironmentTextures;\n /** The capture position. */\n readonly position: readonly [number, number, number];\n /** The full size of the projection box, or `null` for none. */\n readonly box: readonly [number, number, number] | null;\n}\n\n/**\n * Calls `visit` for every mesh whose material is a lit, non-skybox PBR material.\n *\n * @param scene - The scene.\n * @param visit - Receives the material and the mesh's world position.\n *\n * @internal\n */\nexport function forEachReflectiveMesh(\n scene: SceneContext,\n visit: (material: PbrMaterialProps, x: number, y: number, z: number) => void,\n): void {\n const meshes = scene.meshes;\n for (let index = 0; index < meshes.length; index += 1) {\n const mesh = meshes[index];\n const material = mesh?.material;\n // Declared non-null, but Lite's mesh factories create meshes with `material: null`.\n // oxlint-disable-next-line typescript/no-unnecessary-condition\n if (mesh === undefined || material === undefined || material === null || !isPbrMaterial(material)) {\n continue;\n }\n if (getPbrUnlit(material) !== undefined || isPbrSkybox(material)) {\n continue;\n }\n const world = mesh.worldMatrix;\n visit(material, world[12] ?? 0, world[13] ?? 0, world[14] ?? 0);\n }\n}\n\n/**\n * Points a PBR material at a probe, or back at the scene environment, and rebuilds it.\n *\n * @param scene - The registered scene.\n * @param material - The material.\n * @param binding - The probe, or `null` for the scene environment.\n *\n * @internal\n */\nexport function assignReflectionProbe(\n scene: SceneContext,\n material: PbrMaterialProps,\n binding: LiteProbeBinding | null,\n): void {\n if (binding === null) {\n clearPbrLocalEnvironment(material);\n } else if (binding.box === null) {\n setPbrEnvironment(material, binding.environment);\n } else {\n setPbrLocalEnvironment(material, binding.environment, {\n shape: \"box\",\n capturePosition: binding.position,\n projectionPosition: binding.position,\n projectionSize: binding.box,\n });\n }\n rebuildMaterialPipelines(scene, material);\n}\n","import { toEntityHandle } from \"../../handles/handle.js\";\nimport {\n assignReflectionProbe,\n createLiteReflectionProbe,\n enableReflectionProbes,\n forEachReflectiveMesh,\n} from \"../../lite/gpu/reflection-probe.js\";\nimport { resolveReflectionProbeSize, selectReflectionProbe } from \"../reflection-probe.js\";\nimport { EDITOR_ONLY_METADATA_KEY } from \"../render-texture.js\";\nimport type { LiteProbeBinding, LiteReflectionProbe } from \"../../lite/gpu/reflection-probe.js\";\nimport type { NodeTag } from \"../../lite/node.js\";\nimport type { LiteEngine, LiteScene } from \"../../lite/scene.js\";\nimport type { Vec3Like } from \"../../math/types.js\";\nimport type { World } from \"../../world/world.js\";\nimport type { ReflectionProbe, ReflectionProbeCandidate } from \"../reflection-probe.js\";\n\n/**\n * The render layer's half of reflection probes (`docs/plan/2026-11-gi-phase-2-execution-plan.md`,\n * step B1): which probe captures when, and which probe each PBR material reflects. Loaded with\n * `../../lite/gpu/reflection-probe.ts` as one chunk, only once a world has a `ReflectionProbe`.\n */\n\n/**\n * How many consecutive frames one capture request renders. Lite compiles material pipelines\n * asynchronously, so a single frame right after start or after a scene change can miss meshes that\n * are still compiling; repeating it for a few frames catches them.\n */\nconst CAPTURE_FRAMES = 8;\n\n/** One component's GPU probe and what it last captured with. */\ninterface ProbeState {\n /** The GPU probe. */\n lite: LiteReflectionProbe;\n /** How many more frames capture before the probe rests. */\n framesToCapture: number;\n /** The binding materials use, rebuilt when the probe moves or its box changes. */\n binding: LiteProbeBinding | null;\n}\n\n/** A material `forEachReflectiveMesh` hands out. */\ntype ReflectiveMaterial = Parameters<typeof assignReflectionProbe>[1];\n\n/** A candidate with the binding it stands for. */\ninterface BoundCandidate extends ReflectionProbeCandidate {\n /** The binding. */\n readonly binding: LiteProbeBinding;\n}\n\n/**\n * Every reflection probe of a renderer.\n *\n * @internal\n */\nexport interface ReflectionProbeRuntime {\n /**\n * Captures what is due and points each lit PBR material at its probe. Called once per frame from\n * the `PreRender` system.\n *\n * @param world - The world the probes live in.\n * @param probes - Every `ReflectionProbe` in the world.\n * @param isHdr - Whether `rendering.hdr` is on.\n */\n update(world: World, probes: readonly ReflectionProbe[], isHdr: boolean): void;\n /** Frees every probe and hands every material back to the scene environment. */\n dispose(): void;\n}\n\n/**\n * Creates the runtime once Lite's local-cubemap shader path is loaded.\n *\n * @param engine - The engine.\n * @param scene - The registered render scene.\n * @returns The runtime.\n *\n * @internal\n */\nexport async function createReflectionProbeRuntime(\n engine: LiteEngine,\n scene: LiteScene,\n): Promise<ReflectionProbeRuntime> {\n await enableReflectionProbes();\n const states = new Map<ReflectionProbe, ProbeState>();\n const assigned = new Map<ReflectiveMaterial, LiteProbeBinding | null>();\n const seen = new Set<object>();\n const candidates: BoundCandidate[] = [];\n\n const release = (probe: ReflectionProbe, state: ProbeState): void => {\n state.lite.dispose();\n states.delete(probe);\n };\n\n const assignMaterials = (): void => {\n seen.clear();\n forEachReflectiveMesh(scene, (material, x, y, z) => {\n if (seen.has(material)) {\n return;\n }\n seen.add(material);\n const index = selectReflectionProbe(x, y, z, candidates);\n const binding = candidates[index]?.binding ?? null;\n const current = assigned.get(material);\n if (current === binding || (current === undefined && binding === null)) {\n return;\n }\n assigned.set(material, binding);\n assignReflectionProbe(scene, material, binding);\n });\n };\n\n return {\n update(world: World, probes: readonly ReflectionProbe[], isHdr: boolean): void {\n for (const [probe, state] of states) {\n if (!probes.includes(probe) || resolveReflectionProbeSize(probe.size) !== state.lite.size) {\n release(probe, state);\n }\n }\n candidates.length = 0;\n for (const probe of probes) {\n const wantsRefresh = probe.consumeRefreshRequest();\n if (!probe.isEnabledInHierarchy) {\n continue;\n }\n let state = states.get(probe);\n if (state === undefined) {\n state = {\n lite: createLiteReflectionProbe(\n engine,\n scene,\n resolveReflectionProbeSize(probe.size),\n EDITOR_ONLY_METADATA_KEY,\n cullingFilter(world, probe),\n ),\n framesToCapture: probe.refreshMode === \"once\" ? CAPTURE_FRAMES : 0,\n binding: null,\n };\n states.set(probe, state);\n }\n state.lite.resolve(!isHdr);\n const matrix = probe.entity.transform.worldMatrix;\n const x = matrix[12] ?? 0;\n const y = matrix[13] ?? 0;\n const z = matrix[14] ?? 0;\n if (wantsRefresh) {\n state.framesToCapture = CAPTURE_FRAMES;\n }\n if (state.framesToCapture > 0 || probe.refreshMode === \"everyFrame\") {\n state.lite.capture(x, y, z, probe.near, probe.far);\n state.framesToCapture = Math.max(0, state.framesToCapture - 1);\n }\n const environment = state.lite.environment;\n if (environment === null) {\n continue;\n }\n const box = probe.boxProjection;\n const binding = bindingFor(state.binding, environment, x, y, z, box);\n state.binding = binding;\n candidates.push({ x, y, z, box, binding });\n }\n assignMaterials();\n },\n dispose(): void {\n for (const [probe, state] of states) {\n release(probe, state);\n }\n for (const [material, binding] of assigned) {\n if (binding !== null) {\n assignReflectionProbe(scene, material, null);\n }\n }\n assigned.clear();\n },\n };\n}\n\n/**\n * Builds the mesh filter of a probe's capture: with a non-empty `cullingMask`, only meshes whose\n * entity is on one of its layers.\n *\n * @param world - The world, for the handle and layer tables.\n * @param probe - The probe; its mask is read on every call, so edits apply to the next capture.\n * @returns The filter.\n */\nfunction cullingFilter(world: World, probe: ReflectionProbe): (tag: NodeTag | null) => boolean {\n return (tag): boolean => {\n const mask = probe.cullingMask;\n if (mask.length === 0) {\n return true;\n }\n const entity = tag === null ? null : world.getEntityByHandle(toEntityHandle(tag.entity));\n if (entity === null) {\n return false;\n }\n for (const name of mask) {\n if (world.layers.indexOf(name) === entity.layer) {\n return true;\n }\n }\n return false;\n };\n}\n\n/**\n * The binding a probe's materials use: the previous one while nothing it holds changed, so a still\n * probe never rebuilds its materials.\n *\n * @param previous - The binding last used, or `null`.\n * @param environment - The probe's environment.\n * @param x - The probe's world X.\n * @param y - The probe's world Y.\n * @param z - The probe's world Z.\n * @param box - The projection box size, or `null`.\n * @returns The binding.\n */\nfunction bindingFor(\n previous: LiteProbeBinding | null,\n environment: LiteProbeBinding[\"environment\"],\n x: number,\n y: number,\n z: number,\n box: Vec3Like | null,\n): LiteProbeBinding {\n if (\n previous !== null &&\n previous.environment === environment &&\n previous.position[0] === x &&\n previous.position[1] === y &&\n previous.position[2] === z &&\n (box === null\n ? previous.box === null\n : previous.box !== null && previous.box[0] === box.x && previous.box[1] === box.y && previous.box[2] === box.z)\n ) {\n return previous;\n }\n return { environment, position: [x, y, z], box: box === null ? null : [box.x, box.y, box.z] };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAM,eAAiC;;AAGvC,MAAM,uBA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,OAAO;CAET,OAAO;EAAE;EAAa,UAAU;GAAC;GAAG;GAAG;EAAC;EAAG,KAAK,QAAQ,OAAO,OAAO;GAAC,IAAI;GAAG,IAAI;GAAG,IAAI;EAAC;CAAE;AAC9F"}
@@ -1,5 +1,12 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
1
2
  import { addTask, buildFrameGraphTask, createRenderTarget, createRenderTask, getFrameGraph } from "@babylonjs/lite";
2
3
  //#region src/lite/gpu/render-texture.ts
4
+ var render_texture_exports = /* @__PURE__ */ __exportAll({
5
+ colorTextureOf: () => colorTextureOf,
6
+ createLiteRenderTexture: () => createLiteRenderTexture,
7
+ deviceOf: () => deviceOf,
8
+ removeTask: () => removeTask
9
+ });
3
10
  /**
4
11
  * Render-to-texture (`docs/architecture/07-rendering.md` §2.11): a second pass of the render scene,
5
12
  * through another camera, into an offscreen colour target that can be read back.
@@ -128,6 +135,8 @@ function createLiteRenderTexture(engine, scene, width, height, excludeKey) {
128
135
  *
129
136
  * @param target - The target.
130
137
  * @returns The texture, or `null` before the owning task has recorded.
138
+ *
139
+ * @internal
131
140
  */
132
141
  function colorTextureOf(target) {
133
142
  return target._colorTexture ?? null;
@@ -137,6 +146,8 @@ function colorTextureOf(target) {
137
146
  *
138
147
  * @param engine - The engine.
139
148
  * @returns The device, or `null` for an engine without one.
149
+ *
150
+ * @internal
140
151
  */
141
152
  function deviceOf(engine) {
142
153
  return engine._device ?? null;
@@ -146,6 +157,8 @@ function deviceOf(engine) {
146
157
  *
147
158
  * @param scene - The scene.
148
159
  * @param task - The task.
160
+ *
161
+ * @internal
149
162
  */
150
163
  function removeTask(scene, task) {
151
164
  const tasks = getFrameGraph(scene)._tasks;
@@ -195,6 +208,6 @@ async function readTexture(device, texture, width, height) {
195
208
  }
196
209
  }
197
210
  //#endregion
198
- export { createLiteRenderTexture };
211
+ export { render_texture_exports as i, deviceOf as n, removeTask as r, colorTextureOf as t };
199
212
 
200
- //# sourceMappingURL=render-texture-C_TnaSz2.js.map
213
+ //# sourceMappingURL=render-texture-UqRHRLQy.js.map