Skip to content

Commit f83b5ff

Browse files
committed
TerrainExtension: Fix cover dirty flag ambiguity
When rendering a picking pass, the pickingFbo is updated every time. The dirty flag refers to the rendering fbo. Previously the dirty flag was updated on picking passes too which sometimes led to the rendering fbo not being updated when it was still dirty.
1 parent 60119a1 commit f83b5ff

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/extensions/src/terrain/terrain-effect.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,12 @@ export class TerrainEffect implements Effect {
202202
devicePixelRatio: 1
203203
}
204204
});
205-
terrainCover.isDirty = false;
205+
206+
if (!this.isPicking) {
207+
// IsDirty refers to the normal fbo, not the picking fbo.
208+
// Only mark it as not dirty if the normal fbo was updated.
209+
terrainCover.isDirty = false;
210+
}
206211
}
207212
} catch (err) {
208213
terrainLayer.raiseError(err as Error, `Error rendering terrain cover ${terrainCover.id}`);

0 commit comments

Comments
 (0)