rayzee 11.4.0 → 11.5.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.
@@ -1,5 +1,5 @@
1
- import { n as e } from "./BidirectionalIntegrator-BKF-cwH2.js";
2
- import { A as t, T as n, at as r, n as i, r as a, v as o } from "./sceneCachePolicy-AKOEu2lf.js";
1
+ import { n as e } from "./BidirectionalIntegrator-CJay8tXK.js";
2
+ import { A as t, T as n, at as r, n as i, r as a, v as o } from "./sceneCachePolicy--ta6moJu.js";
3
3
  import { n as s, r as c } from "./EngineIssues-CIZnXHsF.js";
4
4
  import { r as l } from "./shared-BGBcSxBQ.js";
5
5
  import { i as u, n as d, o as f, r as p } from "./identity-C1cLD1C0.js";
@@ -1,6 +1,6 @@
1
1
  import { F as e, Ft as t, I as n, J as r, Jt as i, K as a, L as o, Mt as s, Qt as c, R as l, U as u, X as d, Y as f, Z as p, an as m, c as ee, ct as te, dt as ne, en as re, et as h, ft as g, i as _, in as ie, j as ae, jt as oe, k as se, lt as v, q as y, r as ce, wt as le, y as ue, zt as de } from "./SolarLimb-bZE6y63S.js";
2
- import { A as b, C as x, Ct as fe, D as S, E as C, F as w, G as T, I as E, J as D, M as pe, O as me, S as he, St as O, T as ge, U as _e, V as ve, W as ye, Y as be, _ as k, a as xe, at as A, b as Se, bt as Ce, c as we, d as Te, f as Ee, g as j, h as De, i as Oe, it as M, j as N, k as ke, l as Ae, m as P, o as je, p as Me, q as Ne, r as Pe, rt as Fe, s as Ie, t as Le, u as F, v as Re, vt as ze, w as Be, x as Ve, xt as He, y as Ue, yt as I } from "./PathTracer-D3MvEaZK.js";
3
- import { W as We } from "./sceneCachePolicy-AKOEu2lf.js";
2
+ import { A as b, C as x, Ct as fe, D as S, E as C, F as w, G as T, I as E, J as D, M as pe, O as me, S as he, St as O, T as ge, U as _e, V as ve, W as ye, Y as be, _ as k, a as xe, at as A, b as Se, bt as Ce, c as we, d as Te, f as Ee, g as j, h as De, i as Oe, it as M, j as N, k as ke, l as Ae, m as P, o as je, p as Me, q as Ne, r as Pe, rt as Fe, s as Ie, t as Le, u as F, v as Re, vt as ze, w as Be, x as Ve, xt as He, y as Ue, yt as I } from "./PathTracer-Cldt0mXi.js";
3
+ import { W as We } from "./sceneCachePolicy--ta6moJu.js";
4
4
  import { r as Ge } from "./BufferLayout-xPRH9jYD.js";
5
5
  import { Break as Ke, Fn as L, If as R, Loop as qe, Return as z, abs as B, atomicAdd as Je, atomicFunc as Ye, atomicLoad as V, atomicStore as Xe, bool as Ze, cos as Qe, cross as $e, dot as H, exp2 as et, float as U, floor as tt, instanceIndex as nt, int as W, ivec2 as rt, ivec3 as it, length as at, localId as ot, log2 as st, max as G, min as ct, mix as lt, normalize as ut, sampler as dt, select as K, sin as ft, sqrt as pt, storage as mt, texture as ht, uint as q, uniform as J, uniformArray as gt, vec2 as _t, vec3 as Y, vec4 as vt, workgroupId as yt } from "three/tsl";
6
6
  import { DataTexture as bt, FloatType as xt, RedFormat as St, Vector3 as Ct } from "three";
@@ -1,7 +1,7 @@
1
- import { n as e } from "./BidirectionalIntegrator-BKF-cwH2.js";
1
+ import { n as e } from "./BidirectionalIntegrator-CJay8tXK.js";
2
2
  import { r as t } from "./Logger-dDDGj9Av.js";
3
3
  import { n } from "./AssetConfig-DSEntE65.js";
4
- import { t as r } from "./ToneMapGPU-CTDBvmmS.js";
4
+ import { t as r } from "./ToneMapGPU-sAs8wdgI.js";
5
5
  //#region src/neural/NeuralRetouch.js
6
6
  var i = /* @__PURE__ */ e({
7
7
  NeuralRetouch: () => m,
@@ -1,8 +1,8 @@
1
- import { n as e } from "./BidirectionalIntegrator-BKF-cwH2.js";
1
+ import { n as e } from "./BidirectionalIntegrator-CJay8tXK.js";
2
2
  import { t } from "./EngineEvents-Ci8dVWCP.js";
3
3
  import { r as n } from "./Logger-dDDGj9Av.js";
4
4
  import { n as r } from "./AssetConfig-DSEntE65.js";
5
- import { t as i } from "./ToneMapGPU-CTDBvmmS.js";
5
+ import { t as i } from "./ToneMapGPU-sAs8wdgI.js";
6
6
  //#region src/neural/NeuralSuperRes.js
7
7
  var a = /* @__PURE__ */ e({
8
8
  NeuralSuperRes: () => g,
@@ -1,5 +1,5 @@
1
1
  import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as o, Ct as s, D as c, Dt as l, E as u, Et as d, G as f, Gt as p, H as m, Ht as h, It as g, J as _, Jt as v, K as y, Kt as b, Lt as x, M as S, Mt as C, N as w, Nt as T, O as E, Ot as D, P as O, Q as ee, Qt as k, Rt as A, S as te, St as ne, T as re, Tt as j, Ut as ie, V as ae, Vt as oe, W as se, Wt as ce, X as le, Xt as ue, Y as de, Yt as fe, Z as pe, Zt as me, _ as he, _t as ge, a as _e, an as ve, at as ye, b as be, bt as xe, c as Se, ct as Ce, d as we, dt as Te, en as Ee, f as De, ft as Oe, g as ke, gt as Ae, h as je, ht as Me, i as Ne, in as Pe, it as Fe, j as Ie, jt as Le, k as Re, kt as ze, l as Be, lt as Ve, m as He, mt as Ue, n as We, nn as Ge, nt as Ke, o as qe, ot as Je, p as Ye, pt as Xe, q as Ze, qt as Qe, r as $e, rn as et, s as tt, st as nt, t as rt, tn as it, tt as at, u as ot, ut as st, v as ct, vt as lt, w as ut, wt as dt, x as ft, xt as pt, yt as mt, z as ht, zt as gt } from "./SolarLimb-bZE6y63S.js";
2
- import { B as _t, D as vt, E as yt, F as bt, G as M, H as xt, L as St, M as Ct, N as wt, P as Tt, R as Et, S as Dt, U as Ot, V as kt, W as At, X as jt, Z as Mt, _ as Nt, a as Pt, at as Ft, b as It, c as Lt, f as Rt, g as N, h as zt, i as Bt, it as Vt, j as Ht, k as P, m as Ut, p as Wt, q as Gt, r as Kt, s as qt, t as Jt, w as Yt, z as Xt } from "./sceneCachePolicy-AKOEu2lf.js";
2
+ import { B as _t, D as vt, E as yt, F as bt, G as M, H as xt, L as St, M as Ct, N as wt, P as Tt, R as Et, S as Dt, U as Ot, V as kt, W as At, X as jt, Z as Mt, _ as Nt, a as Pt, at as Ft, b as It, c as Lt, f as Rt, g as N, h as zt, i as Bt, it as Vt, j as Ht, k as P, m as Ut, p as Wt, q as Gt, r as Kt, s as qt, t as Jt, w as Yt, z as Xt } from "./sceneCachePolicy--ta6moJu.js";
3
3
  import { i as F, o as Zt, r as Qt } from "./Logger-dDDGj9Av.js";
4
4
  import { _ as $t, a as en, b as tn, c as nn, d as rn, f as an, g as on, h as sn, i as cn, l as I, m as ln, n as un, o as dn, p as fn, r as pn, s as mn, t as hn, u as gn, v as _n } from "./BufferLayout-xPRH9jYD.js";
5
5
  import { n as vn, t as yn } from "./EngineIssues-CIZnXHsF.js";
@@ -1,4 +1,4 @@
1
- import { n as e } from "./BidirectionalIntegrator-BKF-cwH2.js";
1
+ import { n as e } from "./BidirectionalIntegrator-CJay8tXK.js";
2
2
  import { dt as t, i as n, in as r } from "./SolarLimb-bZE6y63S.js";
3
3
  import { r as i } from "./WorkingMatrix-C6y233hT.js";
4
4
  import { StorageInstancedBufferAttribute as a } from "three/webgpu";
@@ -1,7 +1,7 @@
1
1
  import { dt as e } from "./SolarLimb-bZE6y63S.js";
2
- import { Dt as t, Ot as n, Tt as r, _t as i, ct as a, gt as o, kt as s, mt as c, n as l, ot as u, st as d, wt as f } from "./PathTracer-D3MvEaZK.js";
2
+ import { Dt as t, Ot as n, Tt as r, _t as i, ct as a, gt as o, kt as s, mt as c, n as l, ot as u, st as d, wt as f } from "./PathTracer-Cldt0mXi.js";
3
3
  import { n as p, t as m } from "./EngineEvents-Ci8dVWCP.js";
4
- import { $ as h, C as g, G as _, M as ee, Q as te, T as ne, W as re, at as v, d as ie, et as ae, f as oe, l as se, nt as y, ot as ce, r as le, rt as ue, tt as de, u as fe, v as pe, x as b } from "./sceneCachePolicy-AKOEu2lf.js";
4
+ import { $ as h, C as g, G as _, M as ee, Q as te, T as ne, W as re, at as v, d as ie, et as ae, f as oe, l as se, nt as y, ot as ce, r as le, rt as ue, tt as de, u as fe, v as pe, x as b } from "./sceneCachePolicy--ta6moJu.js";
5
5
  import { i as x, r as me } from "./Logger-dDDGj9Av.js";
6
6
  import { f as he, r as ge } from "./BufferLayout-xPRH9jYD.js";
7
7
  import { i as _e, n as S, t as ve } from "./EngineIssues-CIZnXHsF.js";
@@ -12,7 +12,7 @@ import { n as w, r as we } from "./AssetConfig-DSEntE65.js";
12
12
  import { d as Te, l as Ee, m as De, p as Oe, t as ke, u as T } from "./ViewTransforms-CYN7bq2w.js";
13
13
  import { i as E, n as Ae, r as je } from "./identity-C1cLD1C0.js";
14
14
  import { a as Me, i as Ne, t as Pe } from "./SceneMetadata-D2Sh-0e-.js";
15
- import { t as Fe } from "./ToneMapGPU-CTDBvmmS.js";
15
+ import { t as Fe } from "./ToneMapGPU-sAs8wdgI.js";
16
16
  import { LinearSRGBColorSpace as Ie, MeshBasicNodeMaterial as Le, NodeMaterial as Re, QuadMesh as D, RectAreaLightNode as ze, SRGBColorSpace as O, TextureNode as Be, WebGPURenderer as Ve } from "three/webgpu";
17
17
  import { Fn as He, If as Ue, cubeTexture as We, dot as Ge, float as k, int as A, ivec2 as Ke, mix as j, screenCoordinate as qe, screenUV as Je, select as M, storage as Ye, texture as Xe, uint as Ze, uniform as N, uv as P, vec3 as F, vec4 as Qe } from "three/tsl";
18
18
  import { Box3 as $e, BufferGeometry as et, CircleGeometry as tt, Color as nt, DataTexture as rt, DirectionalLight as it, DirectionalLightHelper as at, EquirectangularReflectionMapping as ot, EventDispatcher as I, FloatType as st, LinearFilter as ct, LinearSRGBColorSpace as lt, LoaderUtils as L, LoadingManager as ut, MathUtils as R, Mesh as dt, MeshPhysicalMaterial as ft, NearestFilter as pt, NoBlending as mt, NoToneMapping as ht, Object3D as gt, OrthographicCamera as _t, PerspectiveCamera as vt, PointLight as yt, PointLightHelper as bt, REVISION as xt, RGBAFormat as St, RectAreaLight as z, RenderTarget as Ct, SRGBColorSpace as B, Scene as V, SpotLight as wt, SpotLightHelper as Tt, TextureLoader as Et, UnsignedByteType as Dt, Vector2 as Ot, Vector3 as H } from "three";
@@ -130,7 +130,20 @@ fn main( @builtin(global_invocation_id) gid: vec3<u32> ) {
130
130
  async toPlanar(e, t) {
131
131
  return new Float32Array(await this._run(e, t));
132
132
  }
133
- async _run(e, { exposure: t = 1, toneMapping: n = 0, saturation: r = 1, flipY: i = !1, preserveAlpha: a = !1, gain: o = null } = {}) {
133
+ async _run(e, t = {}) {
134
+ let n = t.gain;
135
+ if (!n?.device || n.device === this.device) return this._dispatch(e, t);
136
+ let r = await n.copyTo(this.device);
137
+ try {
138
+ return await this._dispatch(e, {
139
+ ...t,
140
+ gain: r
141
+ });
142
+ } finally {
143
+ r.destroy();
144
+ }
145
+ }
146
+ async _dispatch(e, { exposure: t = 1, toneMapping: n = 0, saturation: r = 1, flipY: i = !1, preserveAlpha: a = !1, gain: o = null } = {}) {
134
147
  if (this.disposed) throw Error("PackedToneMapper: disposed");
135
148
  if (!this._storage) throw Error("PackedToneMapper: call ensureSize() first");
136
149
  let c = this._ensurePipeline(o);
@@ -1,3 +1,3 @@
1
1
  import { n as e, t } from "../ZipReader-gDSWr0I5.js";
2
- import { n, t as r } from "../ArchiveImporter-Cgyx5AF7.js";
2
+ import { n, t as r } from "../ArchiveImporter-29Nl1567.js";
3
3
  export { r as ARCHIVE_ELEMENT_PROMPT_BYTES, n as ArchiveImporter, t as openZip, e as readZipDirectory };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../BidirectionalIntegrator-BKF-cwH2.js";
1
+ import { t as e } from "../BidirectionalIntegrator-CJay8tXK.js";
2
2
  export { e as BidirectionalIntegrator };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../PhysicalSky-CY4jiz6a.js";
1
+ import { t as e } from "../PhysicalSky-CUWrTcmT.js";
2
2
  export { e as PhysicalSky };
@@ -1,8 +1,8 @@
1
1
  import "./SolarLimb-bZE6y63S.js";
2
- import { a as e, n as t, o as n, r, t as i } from "./RayzeeRenderer-D23m6NqG.js";
3
- import { ut as a, wt as o } from "./PathTracer-D3MvEaZK.js";
2
+ import { a as e, n as t, o as n, r, t as i } from "./RayzeeRenderer-Dd-Dit0v.js";
3
+ import { ut as a, wt as o } from "./PathTracer-Cldt0mXi.js";
4
4
  import { n as s, t as c } from "./EngineEvents-Ci8dVWCP.js";
5
- import { G as l, q as u, r as d, x as f, y as p } from "./sceneCachePolicy-AKOEu2lf.js";
5
+ import { G as l, q as u, r as d, x as f, y as p } from "./sceneCachePolicy--ta6moJu.js";
6
6
  import { i as m, n as h, r as g, t as _ } from "./Logger-dDDGj9Av.js";
7
7
  import { f as v } from "./BufferLayout-xPRH9jYD.js";
8
8
  import { i as y, n as b, r as x, t as S } from "./EngineIssues-CIZnXHsF.js";
package/dist/rayzee.es.js CHANGED
@@ -1,9 +1,9 @@
1
- import { t as e } from "./BidirectionalIntegrator-BKF-cwH2.js";
1
+ import { t as e } from "./BidirectionalIntegrator-CJay8tXK.js";
2
2
  import { $t as t, Ft as n, Pt as r, Yt as i, en as a, jt as o, nn as s, rt as c, wt as l } from "./SolarLimb-bZE6y63S.js";
3
- import { _ as u, a as d, c as f, d as p, f as m, g as h, h as g, i as _, l as v, m as y, n as b, o as x, p as S, r as ee, s as C, t as w, u as T } from "./RayzeeRenderer-D23m6NqG.js";
4
- import { $ as E, B as te, Et as D, H as ne, K as re, L as ie, N as ae, Ot as O, P as k, Q as oe, R as se, Tt as A, X as ce, Z as le, _t as ue, dt as de, et as fe, ft as pe, gt as me, ht as he, kt as ge, lt as _e, nt as ve, pt as ye, tt as be, ut as xe, wt as Se, z as Ce } from "./PathTracer-D3MvEaZK.js";
3
+ import { _ as u, a as d, c as f, d as p, f as m, g as h, h as g, i as _, l as v, m as y, n as b, o as x, p as S, r as ee, s as C, t as w, u as T } from "./RayzeeRenderer-Dd-Dit0v.js";
4
+ import { $ as E, B as te, Et as D, H as ne, K as re, L as ie, N as ae, Ot as O, P as k, Q as oe, R as se, Tt as A, X as ce, Z as le, _t as ue, dt as de, et as fe, ft as pe, gt as me, ht as he, kt as ge, lt as _e, nt as ve, pt as ye, tt as be, ut as xe, wt as Se, z as Ce } from "./PathTracer-Cldt0mXi.js";
5
5
  import { n as we, t as j } from "./EngineEvents-Ci8dVWCP.js";
6
- import { D as Te, G as Ee, J as De, K as Oe, O as ke, W as Ae, Y as je, a as Me, c as Ne, et as Pe, i as Fe, m as Ie, ot as Le, p as Re, q as ze, r as Be, tt as Ve, x as He, y as Ue } from "./sceneCachePolicy-AKOEu2lf.js";
6
+ import { D as Te, G as Ee, J as De, K as Oe, O as ke, W as Ae, Y as je, a as Me, c as Ne, et as Pe, i as Fe, m as Ie, ot as Le, p as Re, q as ze, r as Be, tt as Ve, x as He, y as Ue } from "./sceneCachePolicy--ta6moJu.js";
7
7
  import { i as We, n as Ge, r as Ke, t as qe } from "./Logger-dDDGj9Av.js";
8
8
  import { f as Je, r as Ye } from "./BufferLayout-xPRH9jYD.js";
9
9
  import { i as Xe, n as Ze, r as Qe, t as $e } from "./EngineIssues-CIZnXHsF.js";
@@ -14,13 +14,13 @@ import { n as ot, t as st } from "./AssetConfig-DSEntE65.js";
14
14
  import { a as ct, d as lt, g as ut, i as dt, l as ft, o as pt, p as mt, r as ht, s as gt, t as _t, u as vt } from "./ViewTransforms-CYN7bq2w.js";
15
15
  import { a as yt, i as bt, n as xt, r as St } from "./identity-C1cLD1C0.js";
16
16
  import { a as Ct, n as wt, r as Tt, t as Et } from "./SceneMetadata-D2Sh-0e-.js";
17
- import { t as Dt } from "./ToneMapGPU-CTDBvmmS.js";
17
+ import { t as Dt } from "./ToneMapGPU-sAs8wdgI.js";
18
18
  import { t as Ot } from "./FileFormats-sPGJeCRc.js";
19
19
  import { A as kt, C as At, D as jt, E as Mt, O as Nt, S as Pt, T as Ft, _ as It, a as Lt, b as Rt, c as zt, d as Bt, f as Vt, g as Ht, h as Ut, i as Wt, k as Gt, l as Kt, m as qt, n as Jt, o as Yt, p as Xt, r as Zt, s as Qt, t as $t, u as en, v as tn, w as nn, x as rn, y as an } from "./ColorManagement-oeEk7oSu.js";
20
20
  import { c as on, l as sn, n as cn, o as ln, t as un } from "./openStorage-Fe9BoS1_.js";
21
21
  import { n as dn, t as fn } from "./ZipReader-gDSWr0I5.js";
22
- import { i as pn, n as mn, r as hn } from "./NeuralSuperRes-DV5TtURP.js";
23
- import { i as gn, n as _n, r as vn } from "./NeuralRetouch-C3Q2XqbF.js";
22
+ import { i as pn, n as mn, r as hn } from "./NeuralSuperRes-BHxhYzlD.js";
23
+ import { i as gn, n as _n, r as vn } from "./NeuralRetouch-KqGVPV7u.js";
24
24
  import { ExternalTexture as yn, MeshBasicNodeMaterial as bn, QuadMesh as xn, ReadbackBuffer as Sn, RenderTarget as Cn, StorageTexture as wn, TextureNode as M, WebGPURenderer as Tn } from "three/webgpu";
25
25
  import { Fn as En, If as N, Loop as Dn, Return as On, abs as kn, atan as An, atomicAdd as jn, atomicLoad as Mn, atomicStore as Nn, attributeArray as Pn, dot as Fn, exp as In, exp2 as Ln, float as P, floatBitsToUint as Rn, floor as zn, fract as Bn, int as F, ivec2 as I, localId as L, log2 as Vn, max as R, min as Hn, mix as z, normalize as Un, pow as Wn, round as Gn, saturate as B, select as V, smoothstep as Kn, sqrt as qn, storage as Jn, textureLoad as H, textureStore as U, toneMappingExposure as Yn, uint as W, uniform as G, uvec2 as Xn, uvec4 as Zn, vec2 as K, vec3 as q, vec4 as J, wgslFn as Qn, workgroupArray as $n, workgroupBarrier as er, workgroupId as Y } from "three/tsl";
26
26
  import { ACESFilmicToneMapping as tr, AddEquation as nr, AnimationMixer as rr, Box2 as ir, Box3 as ar, ClampToEdgeWrapping as or, Color as sr, Controls as cr, CustomBlending as lr, DataArrayTexture as ur, DataTexture as dr, EventDispatcher as fr, FloatType as pr, HalfFloatType as mr, InterpolateSmooth as hr, LinearFilter as X, LoopOnce as gr, LoopRepeat as _r, MathUtils as vr, Matrix3 as yr, Matrix4 as br, Mesh as xr, MeshBasicMaterial as Sr, NearestFilter as Z, NoColorSpace as Cr, NumberKeyframeTrack as wr, OneFactor as Tr, OrthographicCamera as Er, PerspectiveCamera as Dr, PropertyBinding as Or, Quaternion as kr, RGBAFormat as Q, Raycaster as Ar, RedIntegerFormat as jr, SRGBColorSpace as Mr, Scene as Nr, SphereGeometry as Pr, Timer as Fr, UnsignedByteType as Ir, UnsignedIntType as Lr, Vector2 as Rr, Vector3 as $, Vector4 as zr, VectorKeyframeTrack as Br } from "three";
@@ -2012,10 +2012,11 @@ fn rayzee_gain( uv: vec2<f32>, linear: vec3<f32>, exposure: f32 ) -> f32 {
2012
2012
  size: 64,
2013
2013
  usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
2014
2014
  }), e.device.queue.writeBuffer(this._paramsBuffer, 0, this._params);
2015
- let r = this._params.slice();
2015
+ let r = this._params.slice(), i = () => Promise.all([this.renderer.getArrayBufferAsync(this._grid.value), this.renderer.getArrayBufferAsync(this._blur.value)]);
2016
2016
  return {
2017
2017
  key: "local-exposure",
2018
2018
  wgsl: qa,
2019
+ device: e.device,
2019
2020
  entries: [
2020
2021
  {
2021
2022
  binding: 0,
@@ -2031,8 +2032,32 @@ fn rayzee_gain( uv: vec2<f32>, linear: vec3<f32>, exposure: f32 ) -> f32 {
2031
2032
  }
2032
2033
  ],
2033
2034
  cpu: async () => {
2034
- let [e, t] = await Promise.all([this.renderer.getArrayBufferAsync(this._grid.value), this.renderer.getArrayBufferAsync(this._blur.value)]), n = new Float32Array(e), i = new Float32Array(t);
2035
- return (e, t, a, o) => Ka(r, n, i, e, t, a, o);
2035
+ let [e, t] = await i(), n = new Float32Array(e), a = new Float32Array(t);
2036
+ return (e, t, i, o) => Ka(r, n, a, e, t, i, o);
2037
+ },
2038
+ copyTo: async (e) => {
2039
+ let [t, n] = await i(), a = [
2040
+ [t, GPUBufferUsage.STORAGE],
2041
+ [n, GPUBufferUsage.STORAGE],
2042
+ [r, GPUBufferUsage.UNIFORM]
2043
+ ].map(([t, n]) => {
2044
+ let r = e.createBuffer({
2045
+ label: "local-exposure-copy",
2046
+ size: t.byteLength,
2047
+ usage: n | GPUBufferUsage.COPY_DST
2048
+ });
2049
+ return e.queue.writeBuffer(r, 0, t), r;
2050
+ });
2051
+ return {
2052
+ key: "local-exposure",
2053
+ wgsl: qa,
2054
+ device: e,
2055
+ entries: a.map((e, t) => ({
2056
+ binding: t,
2057
+ resource: { buffer: e }
2058
+ })),
2059
+ destroy: () => a.forEach((e) => e.destroy())
2060
+ };
2036
2061
  }
2037
2062
  };
2038
2063
  }
@@ -4474,7 +4499,7 @@ var ks = {
4474
4499
  isUpscaling: !1,
4475
4500
  isLoading: !1,
4476
4501
  abortController: null
4477
- }, this._worker = null, this._currentModelUrl = null, this._tileId = 0, this._pendingWorkerHandlers = /* @__PURE__ */ new Set(), this._upscaledAlpha = null, this._upscaledAlphaWidth = 0, this._backupCanvas = null, this._baseWidth = e.width, this._baseHeight = e.height, this._toneMapper = null;
4502
+ }, this._worker = null, this._currentModelUrl = null, this._tileId = 0, this._pendingWorkerHandlers = /* @__PURE__ */ new Map(), this._upscaledAlpha = null, this._upscaledAlphaWidth = 0, this._backupCanvas = null, this._baseWidth = e.width, this._baseHeight = e.height, this._toneMapper = null;
4478
4503
  }
4479
4504
  async _ensureSession() {
4480
4505
  let e = ks.QUALITY_PRESETS[this.quality];
@@ -4511,30 +4536,30 @@ var ks = {
4511
4536
  }
4512
4537
  }
4513
4538
  }
4514
- async start() {
4539
+ async start(e = null) {
4515
4540
  if (!this.enabled || this.state.isUpscaling || this.state.isLoading) return !1;
4516
4541
  this.dispatchEvent({ type: "start" });
4517
- let e = performance.now(), t = await this.execute();
4518
- if (t) {
4542
+ let t = performance.now(), n = await this.execute(e);
4543
+ if (n) {
4519
4544
  this.renderer?.resetState?.();
4520
- let t = performance.now() - e;
4521
- console.log(`AI Upscaler: ${this.scaleFactor}x upscale completed in ${t.toFixed(1)}ms`);
4545
+ let e = performance.now() - t;
4546
+ console.log(`AI Upscaler: ${this.scaleFactor}x upscale completed in ${e.toFixed(1)}ms`);
4522
4547
  }
4523
- return t;
4548
+ return n;
4524
4549
  }
4525
4550
  _revealOutput() {
4526
4551
  this.output.style.display = "block", this.input.style.opacity = "0";
4527
4552
  }
4528
- async execute() {
4553
+ async execute(e = null) {
4529
4554
  if (!this.enabled) return !1;
4530
- this.state.abortController = new AbortController(), this.state.isUpscaling = !0, this.hdr && this.getGPUTextures ? this._capturedSource = await this._captureSourceHDR() : this._capturedSource = this._captureSource(), this._createBackup(this._capturedSource);
4531
- let e = this._capturedSource.width * this.scaleFactor, t = this._capturedSource.height * this.scaleFactor;
4532
- this.output.width = e, this.output.height = t;
4533
- let n = this.output.getContext("2d", {
4555
+ this.state.abortController = new AbortController(), this.state.isUpscaling = !0, e ? this._capturedSource = e : this.hdr && this.getGPUTextures ? this._capturedSource = await this._captureSourceHDR() : this._capturedSource = this._captureSource(), this._createBackup(this._capturedSource);
4556
+ let t = this._capturedSource.width * this.scaleFactor, n = this._capturedSource.height * this.scaleFactor;
4557
+ this.output.width = t, this.output.height = n;
4558
+ let r = this.output.getContext("2d", {
4534
4559
  willReadFrequently: !0,
4535
4560
  alpha: !0
4536
4561
  });
4537
- n.imageSmoothingEnabled = !0, n.imageSmoothingQuality = "high", n.drawImage(this._backupCanvas, 0, 0, e, t), this._revealOutput();
4562
+ r.imageSmoothingEnabled = !0, r.imageSmoothingQuality = "high", r.drawImage(this._backupCanvas, 0, 0, t, n), this._revealOutput();
4538
4563
  try {
4539
4564
  return await this._ensureSession(), await this._runUpscale(), this.dispatchEvent({
4540
4565
  type: "resolution_changed",
@@ -4650,7 +4675,7 @@ var ks = {
4650
4675
  let o = (e) => {
4651
4676
  e.data.id === r && (this._worker.removeEventListener("message", o), this._pendingWorkerHandlers.delete(o), e.data.type === "inferred" ? i(e.data.outputData) : e.data.type === "error" && a(Error(e.data.message)));
4652
4677
  };
4653
- this._pendingWorkerHandlers.add(o), this._worker.addEventListener("message", o), this._worker.postMessage({
4678
+ this._pendingWorkerHandlers.set(o, a), this._worker.addEventListener("message", o), this._worker.postMessage({
4654
4679
  type: "infer",
4655
4680
  tileData: e,
4656
4681
  width: t,
@@ -4729,7 +4754,7 @@ var ks = {
4729
4754
  this._baseWidth = e, this._baseHeight = t;
4730
4755
  }
4731
4756
  _cleanupPendingWorkerHandlers() {
4732
- if (this._worker) for (let e of this._pendingWorkerHandlers) this._worker.removeEventListener("message", e);
4757
+ for (let [e, t] of this._pendingWorkerHandlers) this._worker?.removeEventListener("message", e), t(new DOMException("Aborted", "AbortError"));
4733
4758
  this._pendingWorkerHandlers.clear();
4734
4759
  }
4735
4760
  async dispose() {
@@ -4737,7 +4762,7 @@ var ks = {
4737
4762
  }
4738
4763
  }, js = Ke("neural"), Ms = 120, Ns = 2, Ps = 1, Fs = 0, Is = 300, Ls = 5, Rs = 3, zs = 3, Bs = 16, Vs = (e) => Math.max(0, 1 - e / Bs), Hs = class extends fr {
4739
4764
  constructor({ renderer: e, mainCanvas: t, stages: n, pipeline: r, getExposure: i, getSaturation: a, getDisplayGain: o = null, issues: s = null }) {
4740
- super(), this.renderer = e, this._issues = s, this.mainCanvas = t, this.upscalerCanvas = this._createUpscalerCanvas(t), this.pipeline = r, this._stages = n, this._getExposure = i, this._getSaturation = a, this._getDisplayGain = o, this.denoiser = null, this.upscaler = null, this.upscalerBackend = "esrgan", this._neuralUpscaler = null, this.neuralRendering = !1, this.neuralRenderingSettings = {}, this._retouch = null, this._superResModule = null, this._neuralPostBusy = !1, this._finalQuality = ei.oidnQuality, this.finalDenoise = ei.enableOIDN, this.continuousDenoise = ei.continuousDenoise, this.continuousDenoiseInterval = ei.continuousDenoiseInterval, this._lastCadenceAt = -Infinity, this._lastCadenceSamples = 0, this._failedRefreshes = 0, this._cadenceSuspended = !1, this._movingDenoiseMs = [], this._movingHopeless = !1, this._holdWhileMoving = null, this._onReset = null, this._onPostProcessRefresh = null, this._onDisplayRefresh = null, this.temporalHistory = ei.oidnTemporalHistory, this._history = null, this._historyDirty = !0, this._knownResetCount = 0, this._seenTracedFrames = 0, this._viewProj = new br(), this._historyCamera = {
4765
+ super(), this.renderer = e, this._issues = s, this.mainCanvas = t, this.upscalerCanvas = this._createUpscalerCanvas(t), this.pipeline = r, this._stages = n, this._getExposure = i, this._getSaturation = a, this._getDisplayGain = o, this.denoiser = null, this.upscaler = null, this.upscalerBackend = "esrgan", this._neuralUpscaler = null, this.neuralRendering = !1, this.neuralRenderingSettings = {}, this._retouch = null, this._superResModule = null, this._neuralPostBusy = !1, this._postIsStillComplete = null, this._postRun = null, this._postRedo = null, this._postCancelled = !1, this._finalQuality = ei.oidnQuality, this.finalDenoise = ei.enableOIDN, this.continuousDenoise = ei.continuousDenoise, this.continuousDenoiseInterval = ei.continuousDenoiseInterval, this._lastCadenceAt = -Infinity, this._lastCadenceSamples = 0, this._failedRefreshes = 0, this._cadenceSuspended = !1, this._movingDenoiseMs = [], this._movingHopeless = !1, this._holdWhileMoving = null, this._onReset = null, this._onPostProcessRefresh = null, this._onDisplayRefresh = null, this.temporalHistory = ei.oidnTemporalHistory, this._history = null, this._historyDirty = !0, this._knownResetCount = 0, this._seenTracedFrames = 0, this._viewProj = new br(), this._historyCamera = {
4741
4766
  world: null,
4742
4767
  projInv: null,
4743
4768
  viewProj: null,
@@ -5049,16 +5074,17 @@ var ks = {
5049
5074
  this._neuralUpscaler?.dispose(), this._neuralUpscaler = null, this._superResModule?.releaseDenoisedReader();
5050
5075
  }
5051
5076
  setNeuralRendering(e, t = null) {
5077
+ let n = this.neuralRendering !== !!e;
5052
5078
  this.neuralRendering = !!e, t && (this.neuralRenderingSettings = {
5053
5079
  ...this.neuralRenderingSettings,
5054
5080
  ...t
5055
- }), this.neuralRendering || (this._releaseNeuralRetouch(), this._restoreRenderDisplay());
5081
+ }), this.neuralRendering || (this._releaseNeuralRetouch(), this._restoreRenderDisplay()), n && this._redoPostPasses();
5056
5082
  }
5057
5083
  _releaseNeuralRetouch() {
5058
5084
  this._retouch?.dispose(), this._retouch = null;
5059
5085
  }
5060
5086
  async _runNeuralPost(e) {
5061
- let t = this.upscaler?.enabled && this.upscalerBackend === "neural", n = this.neuralRendering;
5087
+ let t = this.upscaler?.enabled && this.upscalerBackend === "neural", n = this.neuralRendering, r = this.upscaler?.enabled && !t;
5062
5088
  if (!(!t && !n) && !this._neuralPostBusy) {
5063
5089
  if (!this.upscalerCanvas) {
5064
5090
  this._recordNoOverlayCanvas("neural");
@@ -5070,43 +5096,51 @@ var ks = {
5070
5096
  }
5071
5097
  this._neuralPostBusy = !0, this.dispatchEvent({ type: j.UPSCALING_START });
5072
5098
  try {
5073
- let r = await import("./NeuralSuperRes-DV5TtURP.js").then((e) => e.t);
5074
- this._superResModule = r;
5075
- let i = n ? await import("./NeuralRetouch-C3Q2XqbF.js").then((e) => e.t) : null, a = this.denoiser?._outTexSize, o = (a?.width ?? 0) * (a?.height ?? 0), s = n && o <= i.RETOUCH_MAX_PIXELS;
5076
- if (n && !s && (js.warn(`Neural rendering skipped: the render is ${(o / 1e6).toFixed(1)} MP, above the ${(i.RETOUCH_MAX_PIXELS / 1e6).toFixed(1)} MP the pass survives.` + (t ? " The upscale still ran." : "")), this._releaseNeuralRetouch()), !t && !s) return;
5077
- let c = {
5099
+ let i = await import("./NeuralSuperRes-BHxhYzlD.js").then((e) => e.t);
5100
+ this._superResModule = i;
5101
+ let a = n ? await import("./NeuralRetouch-KqGVPV7u.js").then((e) => e.t) : null, o = this.denoiser?._outTexSize, s = (o?.width ?? 0) * (o?.height ?? 0), c = n && s <= a.RETOUCH_MAX_PIXELS;
5102
+ if (n && !c && (js.warn(`Neural rendering skipped: the render is ${(s / 1e6).toFixed(1)} MP, above the ${(a.RETOUCH_MAX_PIXELS / 1e6).toFixed(1)} MP the pass survives.` + (t ? " The upscale still ran." : "")), this._releaseNeuralRetouch()), !t && !c) {
5103
+ r && !this._postCancelled && await this.upscaler.start();
5104
+ return;
5105
+ }
5106
+ let l = {
5078
5107
  exposure: this._getEffectiveExposure(),
5079
5108
  toneMapping: this._getToneMapping(),
5080
5109
  saturation: this._getSaturation?.() ?? 1,
5081
5110
  gain: this._getDisplayGain?.() ?? null
5082
- }, l = await r.readDenoisedHalf(this.denoiser);
5083
- t && (this._neuralUpscaler && (this._neuralUpscaler.inputWidth !== l.width || this._neuralUpscaler.inputHeight !== l.height) && this._releaseNeuralUpscaler(), this._neuralUpscaler ||= await r.NeuralSuperRes.create({
5084
- width: l.width,
5085
- height: l.height
5111
+ }, u = await i.readDenoisedHalf(this.denoiser);
5112
+ t && (this._neuralUpscaler && (this._neuralUpscaler.inputWidth !== u.width || this._neuralUpscaler.inputHeight !== u.height) && this._releaseNeuralUpscaler(), this._neuralUpscaler ||= await i.NeuralSuperRes.create({
5113
+ width: u.width,
5114
+ height: u.height
5086
5115
  }));
5087
- let u = l;
5088
- if (s) {
5089
- let e = await i.enhanceFrame({
5090
- source: u,
5116
+ let d = u;
5117
+ if (c) {
5118
+ let e = await a.enhanceFrame({
5119
+ source: d,
5091
5120
  settings: this.neuralRenderingSettings,
5092
5121
  instance: this._retouch,
5093
- exposure: c.exposure,
5094
- tone: t ? null : c
5122
+ exposure: l.exposure,
5123
+ tone: t ? null : l
5095
5124
  });
5096
- this._retouch = e.instance, u = e;
5125
+ this._retouch = e.instance, d = e;
5097
5126
  }
5098
- if (t && (u = await this._neuralUpscaler.upscaleToRGBA8(u, c)), !e()) {
5127
+ if (t && (d = await this._neuralUpscaler.upscaleToRGBA8(d, l)), !e()) {
5099
5128
  this.dropDisplay();
5100
5129
  return;
5101
5130
  }
5102
- if (r.presentRGBA8(this.upscalerCanvas, u.rgba8, u.width, u.height), !e()) {
5131
+ if (this._postRedo || this._postCancelled) return;
5132
+ if (r) {
5133
+ await this.upscaler.start(new ImageData(d.rgba8, d.width, d.height));
5134
+ return;
5135
+ }
5136
+ if (i.presentRGBA8(this.upscalerCanvas, d.rgba8, d.width, d.height), !e()) {
5103
5137
  this.dropDisplay();
5104
5138
  return;
5105
5139
  }
5106
5140
  this.mainCanvas && (this.mainCanvas.style.opacity = "0"), this.dispatchEvent({
5107
5141
  type: j.RESOLUTION_CHANGED,
5108
- width: u.width,
5109
- height: u.height
5142
+ width: d.width,
5143
+ height: d.height
5110
5144
  });
5111
5145
  } catch (e) {
5112
5146
  js.warn("neural pass failed", e);
@@ -5127,16 +5161,22 @@ var ks = {
5127
5161
  let t = await e.start();
5128
5162
  return t && this._onDisplayRefresh?.(), t && e.hasOutput;
5129
5163
  }
5164
+ _runPostPasses(e) {
5165
+ this._postIsStillComplete = e, this._postCancelled = !1, this.neuralRendering || this.upscaler?.enabled && this.upscalerBackend === "neural" ? this._postRun = this._runNeuralPost(e) : this._postRun = this.upscaler?.enabled ? this.upscaler.start() : null;
5166
+ }
5167
+ _redoPostPasses() {
5168
+ let e = this._postIsStillComplete;
5169
+ !e?.() || this._postRedo || (this.upscaler?.abort(), this._postCancelled = !1, this._postRedo = Promise.resolve(this._postRun).catch(() => {}).then(() => {
5170
+ this._postRedo = null, !(this._postCancelled || this._postIsStillComplete !== e || !e()) && (this._restoreRenderDisplay(), this._runPostPasses(e));
5171
+ }));
5172
+ }
5173
+ cancelPostPasses() {
5174
+ this._postCancelled = !0, this.upscaler?.abort(), this._restoreRenderDisplay(), this.dispatchEvent({ type: j.UPSCALING_END });
5175
+ }
5130
5176
  onRenderComplete({ isStillComplete: e }) {
5131
- this._cleanupCompletionListener();
5177
+ this._cleanupCompletionListener(), this._postIsStillComplete = null;
5132
5178
  let t = this.finalDenoise ? "final" : this.continuousDenoise ? "refresh" : null, n = () => {
5133
- if (this.denoiser?.removeEventListener("end", n), this._pendingStartUpscaler = null, e()) {
5134
- if (t && this._onDisplayRefresh?.(), this.neuralRendering || this.upscaler?.enabled && this.upscalerBackend === "neural") {
5135
- this._runNeuralPost(e);
5136
- return;
5137
- }
5138
- this.upscaler?.enabled && this.upscaler.start();
5139
- }
5179
+ this.denoiser?.removeEventListener("end", n), this._pendingStartUpscaler = null, e() && (t && this._onDisplayRefresh?.(), this._runPostPasses(e));
5140
5180
  };
5141
5181
  if (!t) {
5142
5182
  n();
@@ -5153,7 +5193,7 @@ var ks = {
5153
5193
  } else r();
5154
5194
  }
5155
5195
  abort(e, { keepDisplay: t = !1 } = {}) {
5156
- this._cleanupCompletionListener(), this._restoreRenderDisplay(), e && e !== this.mainCanvas && (e.style.opacity = "1"), this.upscaler && this.upscaler.abort();
5196
+ this._cleanupCompletionListener(), this._postIsStillComplete = null, this._restoreRenderDisplay(), e && e !== this.mainCanvas && (e.style.opacity = "1"), this.upscaler && this.upscaler.abort();
5157
5197
  let n = !!this._stages.pathTracer?.viewIsChanging, r = t && this.continuousDenoise && !this._cadenceSuspended && !!this.denoiser?.hasOutput && (!n || this.holdsWhileMoving);
5158
5198
  this.denoiser && !r && (this.denoiser.enabled && this.denoiser.abort(), this._unpublishOutput()), this._resetCadence();
5159
5199
  }
@@ -5161,7 +5201,7 @@ var ks = {
5161
5201
  this._unpublishOutput(), this._restoreRenderDisplay(), this._historyDirty = !0;
5162
5202
  }
5163
5203
  dispose() {
5164
- this._cleanupCompletionListener(), this._releaseNeuralUpscaler(), this._releaseNeuralRetouch(), this._unpublishOutput(), this._releaseHistory(), this.denoiser &&= (this._denoiserStartHandler && this.denoiser.removeEventListener("start", this._denoiserStartHandler), this._denoiserEndHandler && this.denoiser.removeEventListener("end", this._denoiserEndHandler), this._denoiserTileHandler && this.denoiser.removeEventListener("tileProgress", this._denoiserTileHandler), this._denoiserErrorHandler && this.denoiser.removeEventListener("error", this._denoiserErrorHandler), this.denoiser.dispose(), null), this.upscaler && (this._upscalerResChangedHandler && this.upscaler.removeEventListener("resolution_changed", this._upscalerResChangedHandler), this._upscalerStartHandler && this.upscaler.removeEventListener("start", this._upscalerStartHandler), this._upscalerProgressHandler && this.upscaler.removeEventListener("progress", this._upscalerProgressHandler), this._upscalerEndHandler && this.upscaler.removeEventListener("end", this._upscalerEndHandler), this.upscaler.dispose(), this.upscaler = null, this.upscalerBackend = "esrgan", this._neuralUpscaler = null), this._denoiserStartHandler = null, this._denoiserEndHandler = null, this._denoiserTileHandler = null, this._denoiserErrorHandler = null, this._upscalerResChangedHandler = null, this._upscalerStartHandler = null, this._upscalerProgressHandler = null, this._upscalerEndHandler = null, this._onReset = null, this._onPostProcessRefresh = null, this._onDisplayRefresh = null, this._getExposure = null, this._getSaturation = null, this._getDisplayGain = null, this._issues = null, this.upscalerCanvas?.parentNode && (this.upscalerCanvas.parentNode.removeChild(this.upscalerCanvas), this.upscalerCanvas = null);
5204
+ this._cleanupCompletionListener(), this._postIsStillComplete = null, this._releaseNeuralUpscaler(), this._releaseNeuralRetouch(), this._unpublishOutput(), this._releaseHistory(), this.denoiser &&= (this._denoiserStartHandler && this.denoiser.removeEventListener("start", this._denoiserStartHandler), this._denoiserEndHandler && this.denoiser.removeEventListener("end", this._denoiserEndHandler), this._denoiserTileHandler && this.denoiser.removeEventListener("tileProgress", this._denoiserTileHandler), this._denoiserErrorHandler && this.denoiser.removeEventListener("error", this._denoiserErrorHandler), this.denoiser.dispose(), null), this.upscaler && (this._upscalerResChangedHandler && this.upscaler.removeEventListener("resolution_changed", this._upscalerResChangedHandler), this._upscalerStartHandler && this.upscaler.removeEventListener("start", this._upscalerStartHandler), this._upscalerProgressHandler && this.upscaler.removeEventListener("progress", this._upscalerProgressHandler), this._upscalerEndHandler && this.upscaler.removeEventListener("end", this._upscalerEndHandler), this.upscaler.dispose(), this.upscaler = null, this.upscalerBackend = "esrgan", this._neuralUpscaler = null), this._denoiserStartHandler = null, this._denoiserEndHandler = null, this._denoiserTileHandler = null, this._denoiserErrorHandler = null, this._upscalerResChangedHandler = null, this._upscalerStartHandler = null, this._upscalerProgressHandler = null, this._upscalerEndHandler = null, this._onReset = null, this._onPostProcessRefresh = null, this._onDisplayRefresh = null, this._getExposure = null, this._getSaturation = null, this._getDisplayGain = null, this._issues = null, this.upscalerCanvas?.parentNode && (this.upscalerCanvas.parentNode.removeChild(this.upscalerCanvas), this.upscalerCanvas = null);
5165
5205
  }
5166
5206
  setOverlayManager(e) {
5167
5207
  this._overlayManager = e;
@@ -5215,7 +5255,8 @@ var ks = {
5215
5255
  this._setTileHelper(e);
5216
5256
  }
5217
5257
  setUpscalerEnabled(e) {
5218
- this.upscaler ? this.upscaler.enabled = e : e && this._recordNoOverlayCanvas("upscaler"), e || this._restoreRenderDisplay();
5258
+ let t = !!this.upscaler && this.upscaler.enabled !== !!e;
5259
+ this.upscaler ? this.upscaler.enabled = e : e && this._recordNoOverlayCanvas("upscaler"), e || this._restoreRenderDisplay(), t && this._redoPostPasses();
5219
5260
  }
5220
5261
  setUpscalerScaleFactor(e) {
5221
5262
  this.upscaler?.setScaleFactor(e);
@@ -6061,7 +6102,7 @@ var gc = Ke("engine"), _c = class extends w {
6061
6102
  }), this.cameraManager.camera;
6062
6103
  }
6063
6104
  _initAssetPipeline() {
6064
- super._initAssetPipeline(), this.assetLoader.controls = this.cameraManager.controls, this.assetLoader.registerFormat(...Ot), this.assetLoader.setArchiveImporterLoader(() => import("./ArchiveImporter-Cgyx5AF7.js").then((e) => e.r).then((e) => new e.ArchiveImporter(this.assetLoader)), Tt);
6105
+ super._initAssetPipeline(), this.assetLoader.controls = this.cameraManager.controls, this.assetLoader.registerFormat(...Ot), this.assetLoader.setArchiveImporterLoader(() => import("./ArchiveImporter-29Nl1567.js").then((e) => e.r).then((e) => new e.ArchiveImporter(this.assetLoader)), Tt);
6065
6106
  let e = () => {
6066
6107
  this.needsReset = !0, this.stages.pathTracer?.enterInteractionMode(), this.wake();
6067
6108
  };
@@ -6088,7 +6129,7 @@ var gc = Ke("engine"), _c = class extends w {
6088
6129
  super._initPipeline(), this.pipeline.eventBus.on("pathtracer:interactionStart", () => this._requestRenderScale(this._interactionRenderScale())), this.pipeline.eventBus.on("pathtracer:interactionEnd", () => this._applyRenderScale(1));
6089
6130
  }
6090
6131
  async _initManagers() {
6091
- await super._initManagers(), this.environmentManager.setProceduralSkyLoader(() => import("./PhysicalSky-CY4jiz6a.js").then((e) => e.n).then((e) => e.PhysicalSky)), this.stages.pathTracer.registerIntegrator(["bidirectional", "vcm"], (t) => new e(t)), this.stages.pathTracer.requestOutput("gBuffer"), this.interactionManager = new $a({
6132
+ await super._initManagers(), this.environmentManager.setProceduralSkyLoader(() => import("./PhysicalSky-CUWrTcmT.js").then((e) => e.n).then((e) => e.PhysicalSky)), this.stages.pathTracer.registerIntegrator(["bidirectional", "vcm"], (t) => new e(t)), this.stages.pathTracer.requestOutput("gBuffer"), this.interactionManager = new $a({
6092
6133
  scene: this.meshScene,
6093
6134
  camera: this.camera,
6094
6135
  canvas: this.canvas,