Skip to content

Feature/webgpu renderer - #8

Merged
pacMakaveli merged 5 commits into
mainfrom
feature/webgpu-renderer
Oct 2, 2026
Merged

pacMakaveli merged 5 commits into
mainfrom
feature/webgpu-renderer

Conversation

@pacMakaveli

Copy link
Copy Markdown
Contributor

What & why

Type of change

  • feat (new feature)
  • fix (bug fix)
  • docs
  • refactor / chore
  • breaking change

Checklist

  • One thing per PR (atomic), with a clear description above
  • Conventional Commit title (feat:, fix:, …)
  • Commits are verified (signed)
  • Tests added/updated and passing
  • Lint/format clean
  • CHANGELOG.md updated under Unreleased (if user-facing)
  • No secrets committed
  • No AI author or Co-Authored-By trailer; no em dashes

Screenshots / notes

The WebGPU renderer takes over as the primary renderer with Canvas 2D as
the fallback, so the SVG build moves under legacy/ for reference and is
no longer maintained. Its imports and stylesheet paths now point at the
shared modules from the new location.
- shared/looks.js is the dependency-free single source of truth for the
  five looks (realistic, cartoon, neon, hologram, ink).
- The scene schema moves to version 2 with look, clouds and bloom
  settings, and sections or fields can carry renderers: [...] so each
  demo panel shows only what its renderer can draw.
- shared/topology.js holds the TopoJSON fetch and decode, free of any
  renderer import, with the 1:50m land source added for the 3D globe.
- node:test unit tests cover schema invariants, look data consistency
  and the topology decoder, and CI now runs them.
shared/ui.css is rebuilt on design tokens, and setting data-look on the
root swaps all of them: glass for realistic, chunky outlined cards for
cartoon, neon edges, hologram wireframe, and paper and ink. It adds the
look lens picker, a settings drawer, a drawn brand glyph, and separates
panel text from backdrop text so every theme stays legible.

ui.js gains buildLookLenses and applyLookTheme, and the scene panel can
hide settings the active renderer cannot draw. The Canvas page adopts the
new chrome, hides 2D-only controls correctly, and announces when it was
reached through the WebGPU fallback.
A true 3D globe on Three.js WebGPU and TSL, loaded through a pinned
import map with no build step.

- The planet is lit by the real sun with a ray-marched Rayleigh and Mie
  atmosphere, living clouds with shadows, ocean glint, relief and night
  lights. Static fields (biomes, ocean, clouds, sky) are baked once on the
  GPU, so the per-frame shader only samples textures and holds 60 fps.
- Impact sparks and about 40k orbital motes run in GPU compute kernels.
- Beams are ribbons animated entirely in the shader from their birth time.
- A moon, orbit rings with satellites, shooting stars and aurora round
  out the scene.
- Five looks cross-fade live through weight uniforms with no recompile.
- Bloom, chromatic fringe, scanlines, vignette and grain finish per look.
- Browsers without WebGPU are handed to the Canvas renderer with their
  URL options intact.

The root page becomes a landing page with a live globe and a look picker
that re-dresses the page.
- ARCHITECTURE describes the bake, compute and per-frame pipeline, and
  records the shader pitfalls found while building it.
- New LOOKS.md covers the five looks and how to add one.
- INSTALL, USAGE and README reflect WebGPU as the default, Canvas as the
  fallback, the new URL options and the renderer-scoped schema.
- AGENTS.md allows Three.js as the one pinned runtime dependency.
- CHANGELOG lists the user-facing changes under Unreleased.
@pacMakaveli
pacMakaveli merged commit 5224f39 into main Oct 2, 2026
3 checks passed
@pacMakaveli
pacMakaveli deleted the feature/webgpu-renderer branch October 2, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant