mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +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
@@ -469,3 +469,43 @@ test('the minimal look keeps its stars and clouds whatever the sun', () => {
|
||||
look.frame(900, false, 0, { lat: 0, lng: 0 });
|
||||
assert.deepEqual(view.added[1].updates, []);
|
||||
});
|
||||
|
||||
test('Anime fades the stars from the look own brightness and back', () => {
|
||||
const view = fakeView(0);
|
||||
const look = warmCinematic(view);
|
||||
const stars = view.added.find(({ desc }) => Object.hasOwn(desc, 'stars'));
|
||||
assert.equal(look.setStarsDimmed(0), false, 'already undimmed');
|
||||
assert.equal(look.setStarsDimmed(0.25), true);
|
||||
assert.equal(look.setStarsDimmed(0.25), false);
|
||||
assert.equal(look.setStarsDimmed(1), true);
|
||||
assert.equal(look.setStarsDimmed(0), true);
|
||||
assert.deepEqual(
|
||||
stars.updates.filter((update) => update.stars),
|
||||
[
|
||||
{ stars: { intensity: 90 } },
|
||||
{ stars: { intensity: 0 } },
|
||||
{ stars: { intensity: 120 } },
|
||||
],
|
||||
);
|
||||
// The minimal look keeps Navara's own intensity as its base.
|
||||
const minimalView = fakeView(0);
|
||||
const minimal = buildNavaraLook(
|
||||
minimalView,
|
||||
plugin([]),
|
||||
navaraScenePlan('minimal'),
|
||||
() => 0,
|
||||
);
|
||||
minimal.setStarsDimmed(0.5);
|
||||
const minimalStars = minimalView.added.find(({ desc }) =>
|
||||
Object.hasOwn(desc, 'stars'),
|
||||
);
|
||||
assert.deepEqual(minimalStars.updates, [{ stars: { intensity: 5 } }]);
|
||||
// A look without its own stars (the plugin's photoreal scene) ignores it.
|
||||
const photoreal = buildNavaraLook(
|
||||
fakeView(0),
|
||||
plugin([]),
|
||||
navaraScenePlan('photoreal'),
|
||||
() => 0,
|
||||
);
|
||||
assert.equal(photoreal.setStarsDimmed(1), false);
|
||||
});
|
||||
Reference in new issue
Block a user