mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
fix(globe): Navara picks rank as drawn and check model hits at their drawn radius
T11 review follow-up to ed9ea7e6. CPU hits rank as the engine draws them:
sets without a depth test over depth-tested ones, then by set order
(the tracked bank over the fleet, flights over local ADS-B), then depth —
so the CPU's top hit that checks a GPU answer is the instance drawn on
top. A model hit is no longer taken as answered: the model mover keeps
each instance's drawn diameter (after minimumPixelSize/maximumScale) and
the CPU checks the hit against its projected position within that radius
(+3 px); the CPU pick sees models at that radius too.
This commit is contained in:
1 parent
1fe8267550
commit
620ada6df3
6 files changed
+146
-15
No files matched your search
@@ -85,7 +85,10 @@ test('a far model keeps its minimum pixel size', async () => {
|
||||
assert.ok(
|
||||
Math.abs(scale - expected) / expected < 1e-6,
|
||||
`${scale} vs ${expected}`,
|
||||
);
|
||||
); // CPU picks read the drawn radius: half the 40 px minimum (the pixel
|
||||
// size at the pre-minimum distance, so within a radius's worth).
|
||||
assert.ok(Math.abs(mover.pickRadiusPx(0) - 20) < 1e-3, mover.pickRadiusPx(0));
|
||||
assert.equal(mover.pickRadiusPx(1), null);
|
||||
});
|
||||
|
||||
test("the instance colour (sRGB, decoded) tints by the set's blend amount; its alpha is opacity, as Cesium's model colour", async () => {
|
||||
|
||||
Reference in new issue
Block a user