Add hillshade surface shading and draw it on the Cesium globe

The globe port takes the globe's material only when it is free, follows a
terrain change, lets go of a material someone replaced, and takes it again
once it comes free; idle ticks ask for no frame.
This commit is contained in:
Sameh Khamis committed 2026-11-08 13:50:38 -08:00
1 parent 456645f291
commit c32bf3177d
8 files changed
+227 -9

No files matched your search

+32
View File
@@ -3086,6 +3086,38 @@ export function portChecks() {
},
{ capability: 'surfaceIdentity' },
),
check(
'globe.surfaceShading',
'hillshade shading is set, restrengthened and cleared, drawing each time',
async (h, r) => {
await overAustin(h, r, 20000);
const errors = [];
const off = r.on('error', (e) => errors.push(e));
const draws = [];
const offDraw = r.frame.on('postRender', () => draws.push(1));
try {
for (const shading of [
{ kind: 'hillshade', strength: 0.28 },
{ kind: 'hillshade', strength: 0.5 },
null,
]) {
const before = draws.length;
r.globe.setSurfaceShading(shading);
await h.frame(r);
await h.frame(r);
ok(
draws.length > before,
`drawn after ${shading?.strength ?? 'clearing'}`,
);
}
deepEqual(errors, [], 'no errors');
} finally {
off();
offDraw();
}
},
{ capability: 'surfaceShading' },
),
check(
'globe.sky',
'sky settings round-trip and keep unchanged keys',