Skip to content

fork release 4: four-lane raySpheresIntersections, lookupGroundLift option

Choose a tag to compare

@johnfewell johnfewell released this 25 Oct 17:04

Fork release 4 of @takram/three-atmosphere and @takram/three-geospatial. It is release 3 plus two fixes. It is not an upstream release, and it keeps the upstream package names so that one copy of each package resolves.

Base: fork/release-3 @ 4c14bee6. That is the 0.19.1 / 0.9.1 npm release commit b1a4d628 plus the r185 struct fix (22d75078, e7f0418e) and the aerial shadow hook (cd8d304c).

Patch commits on top of release 3:

  • fd6804ba Mask every lane in raySpheresIntersections (packages/core/src/webgpu/math.ts). The mask was always vec2, so vec3 and vec4 radii got valid intersections only in .x and .y. The mask now has one lane per radius. Scalar and vec2 radii keep the vec2 mask, so their output is unchanged.
  • 5ebaffb3 Add AtmosphereContext.lookupGroundLift (packages/atmosphere/src/webgpu/AtmosphereContext.ts, runtime.ts, WEBGPU.md). The LUT lookup path (raymarchScattering = false) lifts the camera and the point by this fraction of the atmosphere thickness. The default is 0.01, the old constant. 0 keeps only the clamp to the bottom radius.
  • 2d518a5d fork release 4: version metadata.
Package Version SHA-256
@takram/three-atmosphere 0.19.1+fork.4 a1701011e91c86b3a61533b1f5ae2a461b81ed4182a912484c34a211465e825c
@takram/three-geospatial 0.9.1+fork.4 42d5fbf68d86f739952a73f673b1f74750e96bcc4251b64d733cc8beb2fbdda0

Both packages change in this release: geospatial carries the mask fix.

Fork gates at 5ebaffb3 (the release adds only version metadata): nx run core:test, atmosphere:test, core:lint, atmosphere:lint, core:typecheck and atmosphere:typecheck all exit 0.

Consumer evidence. Stock three 0.185.1, node 24.16.0, pnpm 11.8.0, fresh directories:

Consumer install pnpm peers check vite build node import (atm / geo) FnLayout(struct) built bundle in node
local tarballs 0, no peer warning 0 0 ok 29 / ok 69 ok 0, prints 29 69
npm 0.19.1 / 0.9.1 (negative control) 0 0 0 FAIL TypeError: Cannot read properties of undefined (reading 'name') / ok 69 FAIL 1

Shader evidence (CPU, the WGSL compiled from AerialPerspectiveNode). With every option at its default, release 4 emits byte-identical fragments to release 3 on the lookup path, lit and unlit, and on the raymarch path. The port's own graphs only change where it calls raySpheresIntersections with vec4 radii.

Releases 2 and 3 stay published.