rayzee 5.9.1 → 5.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rayzee.es.js +20 -16
- package/dist/rayzee.es.js.map +1 -1
- package/dist/rayzee.umd.js +2 -2
- package/dist/rayzee.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/EngineDefaults.js +2 -2
- package/src/Passes/OIDNDenoiser.js +8 -8
package/dist/rayzee.es.js
CHANGED
|
@@ -1054,9 +1054,9 @@ var Vn = class {
|
|
|
1054
1054
|
renderMode: 1,
|
|
1055
1055
|
enableAlphaShadows: !0,
|
|
1056
1056
|
tiles: 3,
|
|
1057
|
-
tilesHelper: !
|
|
1057
|
+
tilesHelper: !0,
|
|
1058
1058
|
enableOIDN: !0,
|
|
1059
|
-
oidnQuality: "
|
|
1059
|
+
oidnQuality: "high",
|
|
1060
1060
|
interactionModeEnabled: !1
|
|
1061
1061
|
}, Qn = {
|
|
1062
1062
|
maxSamples: X.maxSamples,
|
|
@@ -12205,12 +12205,6 @@ var hl = new Float32Array(3), gl = {
|
|
|
12205
12205
|
},
|
|
12206
12206
|
progress: (e, t, n) => {
|
|
12207
12207
|
if (!e?.data || !n) return;
|
|
12208
|
-
this.dispatchEvent({
|
|
12209
|
-
type: "tileProgress",
|
|
12210
|
-
tile: n,
|
|
12211
|
-
imageWidth: e.width,
|
|
12212
|
-
imageHeight: e.height
|
|
12213
|
-
});
|
|
12214
12208
|
let r = this.gpuDevice, i = e.width, a = e.height, o = Math.min(n.width, i - n.x), s = Math.min(n.height, a - n.y);
|
|
12215
12209
|
if (o <= 0 || s <= 0) return;
|
|
12216
12210
|
let c = o * 16, l = o * s * 16, u = r.createBuffer({
|
|
@@ -12224,15 +12218,25 @@ var hl = new Float32Array(3), gl = {
|
|
|
12224
12218
|
d.copyBufferToBuffer(e.data, r, u, a, c);
|
|
12225
12219
|
}
|
|
12226
12220
|
r.queue.submit([d.finish()]), u.mapAsync(GPUMapMode.READ).then(() => {
|
|
12227
|
-
let e = new Float32Array(u.getMappedRange()), t = new ImageData(o, s), r = this.getExposure(),
|
|
12228
|
-
for (let
|
|
12229
|
-
let
|
|
12230
|
-
if (
|
|
12231
|
-
let e = (
|
|
12232
|
-
t.data[
|
|
12233
|
-
} else t.data[
|
|
12221
|
+
let e = new Float32Array(u.getMappedRange()), t = new ImageData(o, s), r = this.getExposure(), c = this.getSaturation(), l = ol.get(this.getToneMapping()) || ol.get(Oe), d = this._cachedAlpha, f = this._cachedAlphaWidth;
|
|
12222
|
+
for (let i = 0, a = e.length; i < a; i += 4) {
|
|
12223
|
+
let a = e[i] * r, s = e[i + 1] * r, u = e[i + 2] * r;
|
|
12224
|
+
if (c !== 1 && (hl[0] = a, hl[1] = s, hl[2] = u, fl(hl, c), a = hl[0], s = hl[1], u = hl[2]), l(a, s, u, 1, hl), t.data[i] = cl(hl[0]) * 255 + .5 | 0, t.data[i + 1] = cl(hl[1]) * 255 + .5 | 0, t.data[i + 2] = cl(hl[2]) * 255 + .5 | 0, d) {
|
|
12225
|
+
let e = (i >> 2) % o, r = (i >> 2) / o | 0;
|
|
12226
|
+
t.data[i + 3] = d[(n.y + r) * f + n.x + e];
|
|
12227
|
+
} else t.data[i + 3] = 255;
|
|
12234
12228
|
}
|
|
12235
|
-
u.unmap(), u.destroy(), this._pendingStagingBuffers.delete(u), this.ctx.putImageData(t, n.x, n.y)
|
|
12229
|
+
u.unmap(), u.destroy(), this._pendingStagingBuffers.delete(u), this.ctx.putImageData(t, n.x, n.y), this.dispatchEvent({
|
|
12230
|
+
type: "tileProgress",
|
|
12231
|
+
tile: {
|
|
12232
|
+
x: n.x,
|
|
12233
|
+
y: n.y,
|
|
12234
|
+
width: o,
|
|
12235
|
+
height: s
|
|
12236
|
+
},
|
|
12237
|
+
imageWidth: i,
|
|
12238
|
+
imageHeight: a
|
|
12239
|
+
});
|
|
12236
12240
|
}).catch(() => {
|
|
12237
12241
|
u.destroy(), this._pendingStagingBuffers.delete(u);
|
|
12238
12242
|
});
|