Every set blends as its blend says on the Cesium renderer

Each frame drawn, a set's host turns the draw commands it gave to the set's
blend before the scene sorts them: opaque draws every command in the
opaque pass unblended with depth writes; translucent alpha-blends every
command without depth writes; additive adds colour times alpha without
depth writes, still depth-tested, after the opaque commands and before the
order-independent translucent pass. Ground commands only blend
differently. Lines, shapes, models, quads, meshes and GPU icons take every
blend, live through setOptions (models do not load again); GPU icons no
longer refuse opaque or additive. The contract documents the semantics and
the checks draw.sets.blend and draw.models.blend read the pixels. The
package boundaries own setBlend.js and screenCluster.js.
This commit is contained in:
Sameh Khamis committed 2026-11-11 16:49:27 -08:00
1 parent a4a4366b13
commit b741b0d5f5
11 files changed
+674 -15

No files matched your search

+11
View File
@@ -66,6 +66,17 @@ export interface SetSpec {
horizonCull?: boolean;
/** `cluster`: screen-space clustering (icons only; see `ClusterSpec`). */
cluster?: ClusterSpec | null;
/**
* How the set's items blend with what is drawn. Omitted: opaque parts
* opaque with depth writes, items with alpha under 1 alpha-blended without
* depth writes. `opaque`: every item opaque, its alpha ignored (taken as
* 1), with depth writes (icons and points keep every part they draw,
* unblended). `translucent`: every item alpha-blended without depth
* writes, even at alpha 1. `additive`: each item's colour times its alpha
* added to what is drawn, without depth writes and still depth-tested.
* For every kind of set; `setOptions({blend})` takes effect from the next
* frame, and models do not load again.
*/
blend?: 'opaque' | 'translucent' | 'additive';
/**
* Among sets that do not depth-test against each other (items drawn with