rayzee 11.16.0 → 11.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 (107) hide show
  1. package/README.md +1 -1
  2. package/dist/ArchiveFormats-_WrBUn7t.js +2796 -0
  3. package/dist/{ArchiveImporter-CEv5EDgg.js → ArchiveImporter-CdtFzb0f.js} +1345 -1305
  4. package/dist/BidirectionalIntegrator-BH-c324Z.js +960 -0
  5. package/dist/{BufferLayout-ny3WneEc.js → BufferLayout-QzWWnb3A.js} +3 -0
  6. package/dist/{CameraRay-CdVb2LnS.js → CameraRay-gszl6gQ8.js} +20 -12
  7. package/dist/{ColorManagement-B6SgefNi.js → ColorManagement-D7Vcr71o.js} +36 -37
  8. package/dist/Common-jRX6P1vs.js +683 -0
  9. package/dist/CompactKernel-cuEVr6Jy.js +21025 -0
  10. package/dist/DepthPass-BAXPCPq-.js +69 -0
  11. package/dist/{LocalExposure-CMO6fd8G.js → LocalExposure-DUUpAbvu.js} +1 -1
  12. package/dist/{NeuralRetouch-CYRGwe9E.js → NeuralRetouch-RRRAJJZw.js} +3 -3
  13. package/dist/{NeuralSuperRes-p0A3_wjO.js → NeuralSuperRes-BXu9pHRi.js} +4 -4
  14. package/dist/{OpenStorage-CjlOYQyW.js → OpenStorage-PsDTuAHF.js} +2 -2
  15. package/dist/{PhysicalSky-qHATDBbB.js → PhysicalSky-Cbf04lJr.js} +310 -310
  16. package/dist/{PictureView-6y4XsUf0.js → PictureView-CqcqmjYy.js} +29 -29
  17. package/dist/{RayzeeRenderer-ClGfovbz.js → RayzeeRenderer-y85Ubgr_.js} +2539 -3702
  18. package/dist/{TextureBuckets-CcOI4Bdg.js → TextureBuckets-BfkUIWK6.js} +2 -0
  19. package/dist/{TextureSampling-CQMmzhCp.js → TextureSampling-Cmd2X04v.js} +129 -126
  20. package/dist/{ToneMapGPU-tJZo_-7S.js → ToneMapGPU-CVKz1Wun.js} +1 -1
  21. package/dist/{ViewTransforms-Bh7hSjSb.js → ViewTransforms-BjMXpgR2.js} +95 -66
  22. package/dist/addons/archives.es.js +2 -2
  23. package/dist/addons/bidirectional.es.js +1 -1
  24. package/dist/addons/color.es.js +1 -1
  25. package/dist/addons/physical-sky.es.js +1 -1
  26. package/dist/addons/storage.es.js +1 -1
  27. package/dist/rayzee-core.es.js +9 -10
  28. package/dist/rayzee.es.js +772 -788
  29. package/dist/rayzee.umd.js +110 -110
  30. package/package.json +2 -2
  31. package/src/EngineDefaults.js +2 -0
  32. package/src/RayzeeRenderer.js +92 -51
  33. package/src/RenderSettings.js +8 -0
  34. package/src/addons/archives/ArchiveImporter.js +67 -20
  35. package/src/addons/archives/ArchiveReader.js +4 -1
  36. package/src/addons/archives/pbrt/PBRTSceneBuilder.js +42 -12
  37. package/src/addons/archives/pbrt/index.js +12 -2
  38. package/src/addons/archives/usd/USDScene.js +25 -3
  39. package/src/addons/bidirectional/Bidirectional.js +1 -0
  40. package/src/addons/bidirectional/BidirectionalIntegrator.js +6 -6
  41. package/src/addons/color/ColorSpaces.js +2 -1
  42. package/src/addons/color/OcioViews.js +3 -3
  43. package/src/addons/physical-sky/PhysicalSky.js +2 -3
  44. package/src/addons/storage/OpenStorage.js +2 -0
  45. package/src/bvh/ReinsertionOptimizer.js +3 -2
  46. package/src/environment/EnvironmentManager.js +2 -2
  47. package/src/lights/LightManager.js +3 -2
  48. package/src/lights/LightSerializer.js +5 -4
  49. package/src/loaders/AssetLoader.js +3 -2
  50. package/src/loaders/PlatformImageLoader.js +180 -12
  51. package/src/loaders/SceneLoading.js +2 -0
  52. package/src/materials/MaterialDataManager.js +19 -7
  53. package/src/materials/MaterialPacking.js +5 -1
  54. package/src/materials/TextureCreator.js +137 -22
  55. package/src/output/Pictures.js +0 -1
  56. package/src/output/TextureReadback.js +2 -1
  57. package/src/pathtracer/KernelManager.js +21 -4
  58. package/src/pathtracer/PackedRayBuffer.js +3 -14
  59. package/src/pathtracer/PathTracer.js +24 -26
  60. package/src/pathtracer/PathTracerStage.js +5 -0
  61. package/src/pathtracer/QueueManager.js +9 -11
  62. package/src/pathtracer/StorageTexturePool.js +24 -35
  63. package/src/pathtracer/UniformManager.js +2 -0
  64. package/src/pipeline/Compositor.js +2 -2
  65. package/src/scene/BufferLayout.js +5 -3
  66. package/src/scene/GeometryExtractor.js +22 -2
  67. package/src/scene/SceneEdits.js +5 -1
  68. package/src/scene/SceneProcessor.js +2 -0
  69. package/src/scene/ViewCamera.js +2 -1
  70. package/src/shaders/Common.js +9 -1
  71. package/src/shaders/DFGTable.js +16 -16
  72. package/src/shaders/EmissiveSampling.js +56 -7
  73. package/src/shaders/Fog.js +238 -90
  74. package/src/shaders/LightBVHSampling.js +28 -9
  75. package/src/shaders/LightsDirect.js +32 -20
  76. package/src/shaders/LightsIndirect.js +6 -8
  77. package/src/shaders/LightsSampling.js +5 -4
  78. package/src/shaders/MaterialProperties.js +22 -3
  79. package/src/shaders/MaterialTransmission.js +125 -152
  80. package/src/shaders/Random.js +4 -1
  81. package/src/shaders/SceneResources.js +9 -1
  82. package/src/shaders/Struct.js +2 -0
  83. package/src/shaders/TextureSampling.js +18 -7
  84. package/src/shaders/ThreePatches.js +3 -33
  85. package/src/shaders/kernels/DepthPass.js +1 -2
  86. package/src/shaders/kernels/ShadeKernel.js +44 -19
  87. package/src/viewer/PathTracerApp.js +2 -1
  88. package/src/viewer/animation/VideoRenderManager.js +2 -0
  89. package/src/viewer/camera/CameraManager.js +1 -1
  90. package/src/viewer/denoise/DenoisingManager.js +2 -2
  91. package/src/viewer/denoise/MotionVector.js +6 -26
  92. package/src/viewer/denoise/NRD.js +25 -40
  93. package/src/viewer/denoise/NormalDepth.js +14 -46
  94. package/src/viewer/denoise/OIDNDenoiser.js +13 -15
  95. package/src/viewer/overlays/ViewOverlayRenderer.js +2 -1
  96. package/src/viewer/picture/AIUpscaler.js +8 -0
  97. package/src/viewer/picture/PictureView.js +5 -2
  98. package/dist/ArchiveFormats-CWi6IbSp.js +0 -1401
  99. package/dist/AssetConfig-C8BsprCp.js +0 -30
  100. package/dist/BidirectionalIntegrator-KWRQrMXX.js +0 -960
  101. package/dist/CompactKernel-C6TCBB6i.js +0 -19759
  102. package/dist/DepthPass-BMnBuepB.js +0 -69
  103. package/dist/PackedRayBuffer-BhqeNEaL.js +0 -802
  104. /package/dist/{EngineEvents-oQGofgRf.js → EngineEvents-Cdhzr9Bq.js} +0 -0
  105. /package/dist/{EngineIssues-DHAU18xh.js → EngineIssues-pnvWClTX.js} +0 -0
  106. /package/dist/{SolarLimb-IayvafJP.js → SolarLimb-BiVdxxmL.js} +0 -0
  107. /package/dist/{ZipReader-D6LbMsfZ.js → ZipReader-CEcslQJR.js} +0 -0
@@ -0,0 +1,69 @@
1
+ import { $ as e, M as t, gt as n, it as r, ot as i, rt as a, w as o } from "./Common-jRX6P1vs.js";
2
+ import { i as s, r as c, s as l, v as u } from "./TextureSampling-Cmd2X04v.js";
3
+ import { o as d } from "./TextureBuckets-BfkUIWK6.js";
4
+ import { i as f, n as p, s as m, t as h } from "./CameraRay-gszl6gQ8.js";
5
+ import { StorageBufferAttribute as g } from "three/webgpu";
6
+ import { Matrix4 as _ } from "three";
7
+ import { Break as v, Fn as y, If as b, Loop as x, dot as S, float as C, int as w, length as T, localId as E, normalize as D, select as O, storage as k, uniform as A, vec2 as j, vec3 as M, workgroupId as N } from "three/tsl";
8
+ //#region src/shaders/kernels/DepthPass.js
9
+ var P = 1e10, F = 8, I = 16, L = class {
10
+ constructor(e) {
11
+ this.renderer = e, this.cameraWorldMatrix = A(new _(), "mat4"), this.cameraProjectionMatrixInverse = A(new _(), "mat4"), this.cameraRay = f(), this.width = A(1), this.height = A(1);
12
+ }
13
+ async read(e) {
14
+ let t = e.sceneStorageNodes?.(), r = e.materialData?.materialStorageAttr;
15
+ if (!t || !r) return null;
16
+ let { width: i, height: a } = e;
17
+ this.width.value = i, this.height.value = a, this.cameraWorldMatrix.value.copy(e.uniforms.get("cameraWorldMatrix").value), this.cameraProjectionMatrixInverse.value.copy(e.uniforms.get("cameraProjectionMatrixInverse").value), this.cameraRay.sync(e.uniforms);
18
+ let o = new g(new Float32Array(i * a), 1), s = e.materialData.srgbBuckets ?? [], l = {
19
+ srgbBuckets: c(s),
20
+ linearBuckets: c(null),
21
+ shadowAlbedoMaps: null,
22
+ goboMaps: null,
23
+ iesProfiles: null,
24
+ alphaShadows: null
25
+ }, u = n(this._kernel(t, k(r, "vec4", r.count).toReadOnly(), k(o, "float", i * a)), l).compute([
26
+ Math.ceil(i / F),
27
+ Math.ceil(a / F),
28
+ 1
29
+ ], [
30
+ F,
31
+ F,
32
+ 1
33
+ ]);
34
+ try {
35
+ return m.canCompileInBackground && await this.renderer.compileComputeAsync(u), this.renderer.compute(u), new Float32Array(await this.renderer.getArrayBufferAsync(o));
36
+ } finally {
37
+ u.dispose(), o?.dispose();
38
+ for (let e of [...l.srgbBuckets, ...l.linearBuckets]) s.includes(e.value) || e.value.dispose();
39
+ }
40
+ }
41
+ _kernel({ bvh: n, triangles: c }, f, m) {
42
+ let { width: g, height: _, cameraRay: k } = this, A = k.cameraProjection.equal(w(d.equirectangular));
43
+ return y(([d, y]) => {
44
+ let L = w(N.x).mul(F).add(w(E.x)), R = w(N.y).mul(F).add(w(E.y));
45
+ b(L.lessThan(w(g)).and(R.lessThan(w(_))), () => {
46
+ let E = p(j(C(L).add(.5).div(g), C(R).add(.5).div(_)), d, y, k), N = E.direction.toVar(), F = h(N, k.clipStart, d, k.cameraProjection), z = E.origin.add(N.mul(F)).toVar(), B = M(d[3]).toVar(), V = D(M(d[2])).negate().toVar(), H = C(P).toVar();
47
+ x(I, () => {
48
+ let d = e.wrap(u(a({
49
+ origin: z,
50
+ direction: N
51
+ }), n, c)).toVar();
52
+ b(d.didHit.not(), () => {
53
+ v();
54
+ });
55
+ let p = r.wrap(o(d.materialIndex, f)).toVar(), m = C(0).toVar();
56
+ b(p.alphaMode.notEqual(w(0)), () => {
57
+ let e = l(p, i.wrap(s(d.uv, p)).toVar()).a.mul(p.opacity), t = O(p.alphaMode.equal(w(1)).and(p.alphaTest.greaterThan(0)), p.alphaTest, C(.5));
58
+ m.assign(O(e.lessThan(t), C(1), C(0)));
59
+ }), b(m.equal(0), () => {
60
+ let e = d.hitPoint.sub(B);
61
+ H.assign(O(A, T(e), S(e, V))), v();
62
+ }), z.assign(t(d.hitPoint, N));
63
+ }), m.element(R.mul(w(g)).add(L)).assign(H);
64
+ });
65
+ })(this.cameraWorldMatrix, this.cameraProjectionMatrixInverse);
66
+ }
67
+ };
68
+ //#endregion
69
+ export { L as DepthPass };
@@ -1,4 +1,4 @@
1
- import { I as e, L as t, N as n } from "./RayzeeRenderer-ClGfovbz.js";
1
+ import { F as e, I as t, N as n } from "./RayzeeRenderer-y85Ubgr_.js";
2
2
  import { TextureNode as r } from "three/webgpu";
3
3
  import { Vector4 as i } from "three";
4
4
  import { Fn as a, If as o, Loop as s, atomicAdd as c, atomicLoad as l, atomicStore as u, attributeArray as d, dot as f, exp as p, exp2 as m, float as h, floatBitsToUint as g, floor as _, int as v, ivec2 as y, localId as b, log2 as x, max as S, min as C, mix as w, select as T, storage as E, textureLoad as D, toneMappingExposure as O, uint as k, uniform as A, vec2 as j, vec4 as M, workgroupArray as N, workgroupBarrier as P, workgroupId as F } from "three/tsl";
@@ -1,7 +1,7 @@
1
- import { n as e } from "./BidirectionalIntegrator-KWRQrMXX.js";
1
+ import { n as e } from "./BidirectionalIntegrator-BH-c324Z.js";
2
2
  import { r as t } from "./Logger-D7hic8LA.js";
3
- import { n } from "./AssetConfig-C8BsprCp.js";
4
- import { t as r } from "./ToneMapGPU-tJZo_-7S.js";
3
+ import { y as n } from "./ViewTransforms-BjMXpgR2.js";
4
+ import { t as r } from "./ToneMapGPU-CVKz1Wun.js";
5
5
  //#region src/viewer/picture/NeuralRetouch.js
6
6
  var i = /* @__PURE__ */ e({
7
7
  NeuralRetouch: () => m,
@@ -1,8 +1,8 @@
1
- import { n as e } from "./BidirectionalIntegrator-KWRQrMXX.js";
1
+ import { n as e } from "./BidirectionalIntegrator-BH-c324Z.js";
2
2
  import { r as t } from "./Logger-D7hic8LA.js";
3
- import { n } from "./AssetConfig-C8BsprCp.js";
4
- import { t as r } from "./EngineEvents-oQGofgRf.js";
5
- import { t as i } from "./ToneMapGPU-tJZo_-7S.js";
3
+ import { y as n } from "./ViewTransforms-BjMXpgR2.js";
4
+ import { t as r } from "./EngineEvents-Cdhzr9Bq.js";
5
+ import { t as i } from "./ToneMapGPU-CVKz1Wun.js";
6
6
  //#region src/viewer/picture/NeuralSuperRes.js
7
7
  var a = /* @__PURE__ */ e({
8
8
  NeuralSuperRes: () => g,
@@ -1,4 +1,4 @@
1
- import { n as e } from "./EngineIssues-DHAU18xh.js";
1
+ import { n as e } from "./EngineIssues-pnvWClTX.js";
2
2
  import { l as t, s as n, t as r, u as i } from "./FileIdentity-BXmPNvJP.js";
3
3
  //#region src/addons/storage/Locks.js
4
4
  var a = /* @__PURE__ */ new Map();
@@ -734,7 +734,7 @@ var L = class {
734
734
  }, this._ready = this.call("init", {
735
735
  namespace: e,
736
736
  root: t
737
- });
737
+ }), this._ready.catch(() => {});
738
738
  }
739
739
  call(e, t, n = []) {
740
740
  return this._worker ? new Promise((r, i) => {