$npx -y skills add scottstts/Threejs-Awesome-Graphics-Agent-Skills --skill threejs-raymarched-space-effectsBuild raymarched space phenomena in Three.js. Use for black-hole lensing, accretion disks, wormholes, curved-ray integration, procedural star fields, relativistic-looking distortion, bounded volumetric structures, and GPU effects that need controlled numerical integration.
| 1 | # Raymarched Space Effects |
| 2 | |
| 3 | Treat these effects as numerical renderers with explicit integration state. The visual character depends on coordinate choice, step policy, and how rays interact with emissive structures. |
| 4 | |
| 5 | ## Workflow |
| 6 | |
| 7 | 1. Define the effect-space transform and camera ray. |
| 8 | 2. Choose a physical, physically inspired, or purely artistic bending model. |
| 9 | 3. Bound the integration domain. |
| 10 | 4. Track ray position, direction, throughput, and accumulated radiance. |
| 11 | 5. Detect crossings with disks, shells, throats, or event boundaries. |
| 12 | 6. Sample the background only after integration terminates. |
| 13 | 7. Add diagnostics for trajectory, step count, and termination reason. |
| 14 | |
| 15 | Read [references/curved-ray-integrators.md](references/curved-ray-integrators.md) |
| 16 | for the RK4 wormhole, artistic curved-ray accretion integrator, disk |
| 17 | composition, and implementation defects. |
| 18 | |
| 19 | Read the |
| 20 | [curved-ray accretion volume](examples/curved-ray-accretion-volume/curved-ray-effect.js) |
| 21 | for the inverse-square steering loop, thin disk density, front-to-back |
| 22 | accumulation, deterministic star environment, and integrator diagnostics. |
| 23 | |
| 24 | Read the |
| 25 | [Schwarzschild geodesic black-hole effect](examples/schwarzschild-geodesic-black-hole/geodesic-black-hole-effect.js) |
| 26 | for RK2 null-geodesic integration, interpolated equatorial disk crossings, |
| 27 | Doppler/redshift disk emission, lensed procedural deep field, and HDR bloom |
| 28 | composition. |
| 29 | |
| 30 | ## Constraints |
| 31 | |
| 32 | - Do not call a UV swirl “gravitational lensing.” |
| 33 | - Cap iterations and provide early termination. |
| 34 | - Use continuous crossing tests for thin structures. |
| 35 | - Keep numerical stability independent from frame rate. |
| 36 | - Separate the integrator from shading of the accretion disk or wormhole interior. |
| 37 | - Provide a cheaper approximation for non-hero views. |
| 38 | |
| 39 | ## Routing boundary |
| 40 | |
| 41 | Use `$threejs-procedural-vfx` for ordinary particles, trails, plasma, and event |
| 42 | effects. This skill is for per-pixel numerical ray integration through curved |
| 43 | or bounded space-effect domains. |