mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 16:52:20 +00:00
Dispose a Navara layer effect's pass when the layer detaches so engine switches stop retaining its material and textures
Layers re-create their ground effects on every attach. Navara's removePass leaves the EffectPass undisposed, so each switch kept its EffectMaterial in three's program and material caches, together with the uniforms' DataTextures and their Float32Array data (earthquakes: about 47 KB of buffers and one WebGL program per switch). engine.LayerEffectDesc now disposes the raw pass on delete, as the app's own effects do.
This commit is contained in:
1 parent
726e201314
commit
ebc717df8b
3 files changed
+59
-3
No files matched your search
@@ -2,7 +2,7 @@
|
||||
// the product way (viewOptions.js) and the GlobeEngine on it. Load it with a
|
||||
// dynamic import() so Navara stays out of the Cesium-mode bundle.
|
||||
|
||||
import { withFrameUpdates } from './frameDescriptor.js';
|
||||
import { layerEffectDesc, withFrameUpdates } from './frameDescriptor.js';
|
||||
import ThreeView, {
|
||||
Color as NavaraColor,
|
||||
MeshDesc,
|
||||
@@ -241,7 +241,7 @@ export async function createNavaraGlobe({
|
||||
NavaraColor,
|
||||
MeshDesc,
|
||||
EffectDesc,
|
||||
LayerEffectDesc: withFrameUpdates(EffectDesc),
|
||||
LayerEffectDesc: layerEffectDesc(EffectDesc),
|
||||
NavaraEffect,
|
||||
DrapedMesh,
|
||||
setupMaterialForDrape,
|
||||
|
||||
Reference in new issue
Block a user