mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(sky): blur the faint Milky Way glow wider so unresolved stars leave no clumps
The fine 0.4 degree blur kept the residual glow of unresolved stars as mottled patches at the band's edges. Blend towards a 2 degree blur where the coarse copy is faint (smoothstep over 0.5-8 % of the range), so the core keeps its dust lanes and the faint sky goes smooth. Faces 85 -> 62 kB. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e8fd1f2d01
commit
86ae5e9cf4
10 files changed
+51
-4
No files matched your search
@@ -9,6 +9,7 @@ import {
|
||||
cubeFaceDirection,
|
||||
directionToPlateCarree,
|
||||
icrfToGalactic,
|
||||
smoothstep,
|
||||
softBlack,
|
||||
} from '../../scripts/build-milky-way.mjs';
|
||||
import { raDecToUnitVector } from '../sky/stars.js';
|
||||
@@ -121,3 +122,11 @@ test('the black level eases in instead of cutting the faint sky into contours',
|
||||
assert.ok(softBlack(0.003) < 0.0003);
|
||||
close(softBlack(1), 1 - 0.03, 1e-3);
|
||||
});
|
||||
|
||||
test('the faint-glow blend weight eases between its edges', () => {
|
||||
assert.equal(smoothstep(0.1, 0.2, 0), 0);
|
||||
assert.equal(smoothstep(0.1, 0.2, 0.1), 0);
|
||||
close(smoothstep(0.1, 0.2, 0.15), 0.5, 1e-9);
|
||||
assert.equal(smoothstep(0.1, 0.2, 0.2), 1);
|
||||
assert.equal(smoothstep(0.1, 0.2, 9), 1);
|
||||
});
|
||||
Reference in new issue
Block a user