mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 16:52:20 +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
@@ -22,6 +22,12 @@ import {
|
||||
} from './internals.js';
|
||||
import { buildNavaraLook } from './look.js';
|
||||
import { createNavaraSharpen } from './sharpen.js';
|
||||
import { createNavaraStyles } from './stylePasses.js';
|
||||
import { retroShader } from '../../styles/retro.js';
|
||||
import { nightVisionShader } from '../../styles/surveillance.js';
|
||||
import { thermalShader } from '../../styles/thermal.js';
|
||||
import { animeShader } from '../../styles/anime.js';
|
||||
import { noirShader } from '../../styles/noir.js';
|
||||
import { createNavaraMovers } from './movers/index.js';
|
||||
import { createNavaraLines } from './lines/index.js';
|
||||
import { createNavaraOverlay } from './overlay.js';
|
||||
@@ -51,6 +57,16 @@ function preservedCanvas(container) {
|
||||
return canvas;
|
||||
}
|
||||
|
||||
// The app's styles by their names, in Cesium's stage order
|
||||
// (src/ui/visualPresets.js STYLES).
|
||||
const STYLE_SHADERS = Object.freeze({
|
||||
retro: retroShader,
|
||||
surveillance: nightVisionShader,
|
||||
thermal: thermalShader,
|
||||
anime: animeShader,
|
||||
noir: noirShader,
|
||||
});
|
||||
|
||||
// The camera's place for the look, refreshed in place each frame (no
|
||||
// allocation): degrees for the sun's elevation, and the height.
|
||||
const lookCarto = { longitude: 0, latitude: 0, height: 0 };
|
||||
@@ -141,6 +157,10 @@ export async function createNavaraGlobe({
|
||||
container,
|
||||
...(appClock ? { appClock } : {}),
|
||||
sharpen: createNavaraSharpen(view),
|
||||
styles: createNavaraStyles(view, {
|
||||
shaders: STYLE_SHADERS,
|
||||
onStarsDimmed: (amount) => look.setStarsDimmed(amount),
|
||||
}),
|
||||
movers: createNavaraMovers(view, {
|
||||
overlay,
|
||||
// Model colour follows the display-space stage, after the look's ACES.
|
||||
|
||||
Reference in new issue
Block a user