@itwin/core-frontend 5.14.0-dev.14 → 5.14.0-dev.15
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/CHANGELOG.md +6 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/SceneCompositor.js +16 -19
- package/lib/cjs/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.d.ts +2 -0
- package/lib/cjs/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Target.js +1 -0
- package/lib/cjs/internal/render/webgl/Target.js.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/SceneCompositor.js +16 -19
- package/lib/esm/internal/render/webgl/SceneCompositor.js.map +1 -1
- package/lib/esm/internal/render/webgl/Target.d.ts +2 -0
- package/lib/esm/internal/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Target.js +1 -0
- package/lib/esm/internal/render/webgl/Target.js.map +1 -1
- package/package.json +20 -20
|
@@ -227,8 +227,8 @@ class FrameBuffers {
|
|
|
227
227
|
idsAndZComposite;
|
|
228
228
|
idsAndAltZComposite;
|
|
229
229
|
edlDrawCol;
|
|
230
|
-
init(textures, depth, depthMS) {
|
|
231
|
-
if (!this.initPotentialMSFbos(textures, depth, depthMS))
|
|
230
|
+
init(textures, depth, depthMS, boundColor) {
|
|
231
|
+
if (!this.initPotentialMSFbos(textures, depth, depthMS, boundColor))
|
|
232
232
|
return false;
|
|
233
233
|
this.depthAndOrder = FrameBuffer.create([expectDefined(textures.depthAndOrder)], depth);
|
|
234
234
|
this.hilite = FrameBuffer.create([expectDefined(textures.hilite)], depth);
|
|
@@ -236,7 +236,7 @@ class FrameBuffers {
|
|
|
236
236
|
if (!this.depthAndOrder || !this.hilite || !this.hiliteUsingStencil)
|
|
237
237
|
return false;
|
|
238
238
|
assert(undefined === this.opaqueAll);
|
|
239
|
-
if (!this.initPotentialMSMRTFbos(textures, depth, depthMS))
|
|
239
|
+
if (!this.initPotentialMSMRTFbos(textures, depth, depthMS, boundColor))
|
|
240
240
|
return false;
|
|
241
241
|
assert(undefined !== textures.accumulation && undefined !== textures.revealage);
|
|
242
242
|
const colors = [textures.accumulation, textures.revealage];
|
|
@@ -253,9 +253,8 @@ class FrameBuffers {
|
|
|
253
253
|
&& undefined !== this.clearTranslucent
|
|
254
254
|
&& undefined !== this.pingPong;
|
|
255
255
|
}
|
|
256
|
-
initPotentialMSFbos(textures, depth, depthMS) {
|
|
257
|
-
|
|
258
|
-
assert(undefined !== boundColor && undefined !== textures.color);
|
|
256
|
+
initPotentialMSFbos(textures, depth, depthMS, boundColor) {
|
|
257
|
+
assert(undefined !== textures.color);
|
|
259
258
|
if (undefined === depthMS) {
|
|
260
259
|
this.opaqueColor = FrameBuffer.create([boundColor], depth);
|
|
261
260
|
this.opaqueAndCompositeColor = FrameBuffer.create([textures.color], depth);
|
|
@@ -268,10 +267,8 @@ class FrameBuffers {
|
|
|
268
267
|
return undefined !== this.opaqueColor
|
|
269
268
|
&& undefined !== this.opaqueAndCompositeColor;
|
|
270
269
|
}
|
|
271
|
-
initPotentialMSMRTFbos(textures, depth, depthMs) {
|
|
272
|
-
|
|
273
|
-
assert(undefined !== boundColor &&
|
|
274
|
-
undefined !== textures.color &&
|
|
270
|
+
initPotentialMSMRTFbos(textures, depth, depthMs, boundColor) {
|
|
271
|
+
assert(undefined !== textures.color &&
|
|
275
272
|
undefined !== textures.featureId &&
|
|
276
273
|
undefined !== textures.depthAndOrder &&
|
|
277
274
|
undefined !== textures.accumulation &&
|
|
@@ -385,23 +382,23 @@ class FrameBuffers {
|
|
|
385
382
|
this.idsAndAltZComposite = dispose(this.idsAndAltZComposite);
|
|
386
383
|
}
|
|
387
384
|
}
|
|
388
|
-
enableMultiSampling(textures, depth, depthMS) {
|
|
385
|
+
enableMultiSampling(textures, depth, depthMS, boundColor) {
|
|
389
386
|
this.opaqueColor = dispose(this.opaqueColor);
|
|
390
387
|
this.opaqueAndCompositeColor = dispose(this.opaqueAndCompositeColor);
|
|
391
|
-
let rVal = this.initPotentialMSFbos(textures, depth, depthMS);
|
|
388
|
+
let rVal = this.initPotentialMSFbos(textures, depth, depthMS, boundColor);
|
|
392
389
|
this.opaqueAll = dispose(this.opaqueAll);
|
|
393
390
|
this.opaqueAndCompositeAll = dispose(this.opaqueAndCompositeAll);
|
|
394
|
-
rVal = this.initPotentialMSMRTFbos(textures, depth, depthMS);
|
|
391
|
+
rVal = this.initPotentialMSMRTFbos(textures, depth, depthMS, boundColor);
|
|
395
392
|
return rVal;
|
|
396
393
|
}
|
|
397
|
-
disableMultiSampling(textures, depth) {
|
|
394
|
+
disableMultiSampling(textures, depth, boundColor) {
|
|
398
395
|
this.opaqueAll = dispose(this.opaqueAll);
|
|
399
396
|
this.opaqueAndCompositeAll = dispose(this.opaqueAndCompositeAll);
|
|
400
|
-
if (!this.initPotentialMSMRTFbos(textures, depth, undefined))
|
|
397
|
+
if (!this.initPotentialMSMRTFbos(textures, depth, undefined, boundColor))
|
|
401
398
|
return false;
|
|
402
399
|
this.opaqueColor = dispose(this.opaqueColor);
|
|
403
400
|
this.opaqueAndCompositeColor = dispose(this.opaqueAndCompositeColor);
|
|
404
|
-
return this.initPotentialMSFbos(textures, depth, undefined);
|
|
401
|
+
return this.initPotentialMSFbos(textures, depth, undefined, boundColor);
|
|
405
402
|
}
|
|
406
403
|
get isDisposed() {
|
|
407
404
|
return undefined === this.opaqueColor && undefined === this.opaqueAndCompositeColor && undefined === this.depthAndOrder
|
|
@@ -1444,7 +1441,7 @@ class Compositor extends SceneCompositor {
|
|
|
1444
1441
|
this._depthMS = undefined;
|
|
1445
1442
|
if (this._depth !== undefined) {
|
|
1446
1443
|
return this._textures.init(this._width, this._height, this._antialiasSamples)
|
|
1447
|
-
&& this._fbos.init(this._textures, this._depth, this._depthMS)
|
|
1444
|
+
&& this._fbos.init(this._textures, this._depth, this._depthMS, expectDefined(this.target.outputColorTexture))
|
|
1448
1445
|
&& this._geom.init(this._textures)
|
|
1449
1446
|
&& this.eyeDomeLighting.init(this._width, this._height, this._depth);
|
|
1450
1447
|
}
|
|
@@ -1459,11 +1456,11 @@ class Compositor extends SceneCompositor {
|
|
|
1459
1456
|
if (!this._textures.enableMultiSampling(this._width, this._height, this._antialiasSamples))
|
|
1460
1457
|
return false;
|
|
1461
1458
|
assert(undefined !== this._depth && undefined !== this._depthMS);
|
|
1462
|
-
return this._fbos.enableMultiSampling(this._textures, this._depth, this._depthMS);
|
|
1459
|
+
return this._fbos.enableMultiSampling(this._textures, this._depth, this._depthMS, expectDefined(this.target.outputColorTexture));
|
|
1463
1460
|
}
|
|
1464
1461
|
disableMultiSampling() {
|
|
1465
1462
|
assert(undefined !== this._depth);
|
|
1466
|
-
if (!this._fbos.disableMultiSampling(this._textures, this._depth))
|
|
1463
|
+
if (!this._fbos.disableMultiSampling(this._textures, this._depth, expectDefined(this.target.outputColorTexture)))
|
|
1467
1464
|
return false;
|
|
1468
1465
|
// Want to disable multisampling without deleting & reallocating other stuff.
|
|
1469
1466
|
this._depthMS = dispose(this._depthMS);
|