threejs-atmosphere-aerial-perspective
Implement physically motivated sky and aerial-perspective systems in Three.js. Use for planetary atmospheres, ground-to-space transitions, Rayleigh/Mie scattering, precomputed LUTs, depth-based transmittance and inscattering, sun/moon discs, and atmosphere-aware lighting.
Works with
--- name: threejs-atmosphere-aerial-perspective description: Implement physically motivated sky and aerial-perspective systems in Three.js. Use for planetary atmospheres, ground-to-space transitions, Rayleigh/Mie scattering, precomputed LUTs, depth-based transmittance and inscattering, sun/moon discs, and atmosphere-aware lighting. license: MIT --- # Atmosphere and Aerial Perspective Treat sky rendering and aerial perspective as two views of the same scattering model. They must share radii, density profiles, coefficients, sun direction, exposure scale, and coordinate transforms. ## Choose the implementation tier - Small scene with no orbital camera: analytic height/distance approximation. - Planetary ground-to-space camera: ray integration or precomputed LUTs. - Large geospatial world: LUTs plus world-to-planet transform, altitude correction, and depth-aware aerial perspective. Read [references/atmosphere-system-contract.md](references/atmosphere-system-contract.md) before implementation. It separates the LUT/ellipsoid architecture from dynamic integration and the shell/post handoff. Read the [LUT sky and aerial-perspective entry](examples/lut-aerial-perspective/atmosphere-effect.js) and its `source/` modules for the SkyMaterial, SkyLightProbe, SunDirectionalLight, AerialPerspectiveEffect, precomputed-texture loader, sun/moon direction, lens flare, tone mapping, and dithering path used by the LUT example. ## Required outputs - sky radiance; - sun transmittance/color; - segment transmittance from camera to visible surface; - segment inscattering; - optional sky irradiance for materials; - explicit scale conversion between world units and atmosphere units. ## Failure conditions - sky and terrain haze use different sun directions or coefficients; - the atmosphere is a uniformly transparent sphere; - camera altitude is measured in a local flat frame during orbital motion; - scene depth is treated as linear when it is not; - exposure is used to hide incorrect radiance scale; - atmosphere fades abruptly at shell entry. ## Routing boundary This skill owns molecular/aerosol sky scattering and surface-segment aerial perspective. Use `$threejs-volumetric-clouds` for weather-shaped cloud density, temporal cloud reconstruction, and cloud shadows. Use `$threejs-procedural-vfx` for emissive aurora curtain volumes and their perspective/equirectangular radiance materials.
More Testing skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
setup-pre-commit
mattpocock/skills
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

