mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
fix(globe): the cinematic look's atmosphere scale, warm-up and sunset clouds
- The takram uniform paths move to internals.js (forEachLuminanceUniform, loud in dev when a path is gone); look.js sets each factor to scale x the recorded base value, so shared or copied vectors are never scaled twice, and the stars keep the base value (own vector when shared). Stars at intensity 120: a starfield shows from space. - Both night-side shader variants compile on the first two frames. - The clouds hide once the sun sets at the camera (dark puffs at dusk). - No allocation on look frames that change nothing (frozen updates, a scratch camera place from livePosition). Gallery regenerated.
This commit is contained in:
1 parent
26968f4903
commit
5188e8869d
9 files changed
+410
-228
No files matched your search
@@ -22,6 +22,9 @@ import {
|
||||
STARS_SPACE_ENTER_M,
|
||||
STARS_SPACE_EXIT_M,
|
||||
starsVisibleAt,
|
||||
CLOUDS_HIDE_SUN_BELOW_DEG,
|
||||
CLOUDS_SHOW_SUN_ABOVE_DEG,
|
||||
cloudsSunlitAt,
|
||||
} from './viewOptions.js';
|
||||
|
||||
test('the product view renders on demand with MSAA 4 at the native pixel ratio', () => {
|
||||
@@ -84,7 +87,7 @@ test('the cinematic look: photoreal plus clouds and ACES, no sun shadow maps, no
|
||||
assert.equal(plan.pluginDefault, false);
|
||||
assert.deepEqual(plan.meshes, [
|
||||
{ sky: {} },
|
||||
{ stars: { intensity: 40 / ATMOSPHERE_LUMINANCE_SCALE, pointSize: 2 } },
|
||||
{ stars: { intensity: 120, pointSize: 2 } },
|
||||
]);
|
||||
assert.deepEqual(plan.lights, [
|
||||
{ skyLightProbe: {} },
|
||||
@@ -214,3 +217,12 @@ test('stars show at night and from space, not in a daylit sky, with hysteresis',
|
||||
assert.ok(STARS_SHOW_SUN_BELOW_DEG < STARS_HIDE_SUN_ABOVE_DEG);
|
||||
assert.ok(STARS_SPACE_EXIT_M < STARS_SPACE_ENTER_M);
|
||||
});
|
||||
|
||||
test('the clouds hide once the sun sets at the camera, with hysteresis', () => {
|
||||
assert.equal(cloudsSunlitAt(40, true), true);
|
||||
assert.equal(cloudsSunlitAt(CLOUDS_HIDE_SUN_BELOW_DEG - 0.1, true), false);
|
||||
assert.equal(cloudsSunlitAt(1, false), false, 'inside the gap');
|
||||
assert.equal(cloudsSunlitAt(1, true), true, 'inside the gap');
|
||||
assert.equal(cloudsSunlitAt(CLOUDS_SHOW_SUN_ABOVE_DEG + 0.1, false), true);
|
||||
assert.equal(cloudsSunlitAt(Number.NaN, false), false, 'unknown keeps it');
|
||||
});
|
||||
Reference in new issue
Block a user