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

+16 -9
View File
@@ -232,15 +232,22 @@ export interface SkySettings {
lighting: boolean;
}
export interface SurfaceShading {
kind: 'relief';
/** Elevation-like field to shade, row-major, `width × height`. */
values: Float32Array;
width: number;
height: number;
rectangle: GeoRect;
strength: number;
}
export type SurfaceShading =
| {
kind: 'relief';
/** Elevation-like field to shade, row-major, `width × height`. */
values: Float32Array;
width: number;
height: number;
rectangle: GeoRect;
strength: number;
}
/**
* View-lit shading of the drawn terrain's own relief (the ellipsoid's
* curvature where terrain has no normals); darkens only, at most
* `strength` opacity.
*/
| { kind: 'hillshade'; strength: number };
export interface LoadProgress {
tilesPending: number;