mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
456645f291
commit
c32bf3177d
8 files changed
+227
-9
No files matched your search
Vendored
+16
-9
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user