mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
a4a4366b13
commit
b741b0d5f5
11 files changed
+674
-15
No files matched your search
@@ -178,6 +178,20 @@ members' billboards; a set on the GPU (`columns`, or moving, receding,
|
||||
proxy-picked or level-of-detail icons) refuses clustering. The check
|
||||
`draw.icons.cluster` draws a cluster, picks it, and parts it by moving in.
|
||||
|
||||
A set's `blend` holds for every kind of set: omitted, opaque parts draw
|
||||
opaque with depth writes and translucent ones blend without; `opaque` draws
|
||||
every item opaque, its alpha ignored, with depth writes; `translucent` blends
|
||||
every item without depth writes, even at alpha 1; `additive` adds each item's
|
||||
colour times its alpha, without depth writes and still depth-tested. It
|
||||
changes live (`setOptions`, from the next frame; models do not load again).
|
||||
The Cesium port builds billboards and points in Cesium's blend options, and
|
||||
turns every set's draw commands to its blend each frame before the scene
|
||||
sorts them (`src/render/cesium/setBlend.js`): additive ones draw after every
|
||||
opaque command and before the translucent pass, which blends
|
||||
order-independently and would undo the addition; ground commands keep their
|
||||
pass and stencil and only blend differently. The checks `draw.sets.blend`
|
||||
(points, icons, lines, shapes) and `draw.models.blend` read the pixels.
|
||||
|
||||
The Cesium port also draws `pattern` line styles (the image repeated
|
||||
`repeat` times along the line, in the translucent pass; draped too), lines in the
|
||||
`inertial` frame (turned each frame by the set's motion clock, a depth-fail
|
||||
|
||||
Reference in new issue
Block a user