mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
Draw the visual styles on Navara as one post pass behind an optional render.setStyle capability
CRT, NVG, FLIR, Anime and Noir run their Cesium shaders through a GLSL prelude with the exact sRGB transfer, crossfade in the stage order, fade the Navara stars with Anime, and report the visualStyles capability through engineCapabilities.
This commit is contained in:
1 parent
00dfed7959
commit
4c28cc0212
16 files changed
+1805
-8
No files matched your search
@@ -198,15 +198,35 @@ export function buildNavaraLook(
|
||||
}
|
||||
return changed;
|
||||
};
|
||||
// Anime's bands turn the starfield into blotches: the stars fade with the
|
||||
// style (Cesium fades its Milky Way), from the look's own brightness.
|
||||
const starsMesh = mesh('stars');
|
||||
const starsIntensity =
|
||||
plan.meshes.find((desc) => Object.hasOwn(desc, 'stars'))?.stars
|
||||
?.intensity ?? NAVARA_STARS_INTENSITY;
|
||||
let starsDimmed = 0;
|
||||
return {
|
||||
handles,
|
||||
frame,
|
||||
resetDaylight() {
|
||||
daylightTime = null;
|
||||
},
|
||||
/** Dims the stars by `amount` (0 none, 1 hidden); true when it changed. */
|
||||
setStarsDimmed(amount) {
|
||||
const next = Math.min(1, Math.max(0, Number(amount) || 0));
|
||||
if (!starsMesh || next === starsDimmed) return false;
|
||||
starsDimmed = next;
|
||||
starsMesh.update({
|
||||
stars: { intensity: starsIntensity * (1 - next) },
|
||||
});
|
||||
return true;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/** Navara's own stars intensity, for a look that does not set one. */
|
||||
export const NAVARA_STARS_INTENSITY = 10;
|
||||
|
||||
const IRRADIANCE_ON = Object.freeze({
|
||||
aerialPerspective: Object.freeze({ irradiance: true }),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user