Agent skill

3D Underwater God Rays

by MengTo in MengTo/Skills

Add volumetric underwater god rays to a Three.js scene, marching one drifting swell field along every view ray at half resolution so the light shafts converge on the sun, parallax with the camera…

MITAuto-check passedGame Development

Install 3D Underwater God Rays

skills CLI
$ npx skills add MengTo/Skills --skill 3d-underwater-god-rays -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MengTo/Skills 3d-underwater-god-rays --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MengTo/Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent-skills/3d/3d-underwater-god-rays .claude/skills/3d-underwater-god-rays && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
3d-underwater-god-rays
GitHub stars
6.7k
Token cost
~2.5k tokens
SKILL.md length
1,269 words
Files
11 (incl. assets)
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

Add volumetric underwater god rays to a Three.js scene, marching one drifting swell field along every view ray at half resolution so the light shafts converge on the sun, parallax with the camera…

  • Underwater scenes
  • SKILL.md covers The mechanism, Reuse the working effect, The numbers that shipped and Rules, each with the failure…, plus 3 more sections
  • Runs JavaScript scripts from its folder
  • Oceans seen from below

What it does

3D Underwater God Rays is an agent skill from MengTo/Skills. Add volumetric underwater god rays to a Three.js scene, marching one drifting swell field along every view ray at half resolution so the light shafts converge on the sun, parallax with the camera and carry rippling caustic streaks, with a shimmering surface underside, a sun that wobbles through the ripples, and the same light dappling fish as they swim through the beams. Use for underwater scenes, oceans seen from below, aquariums, reefs, kelp forests, diving and shipwreck scenes, schools of fish, sunbeams or…

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including assets (for example `agents/openai.yaml`, `demo/PROMPT.md` and `demo/src/ui.js`).

It sits in Game Development, covering 3D graphics and WebGL. It works with Three.js. The repository describes itself as: Agent skills for designers and builders using Codex, Claude, Cursor, and other AI coding agents. The licence is MIT.

When your agent uses it

  • Underwater scenes
  • Oceans seen from below
  • Diving and shipwreck scenes
  • Schools of fish

Example prompts

  • “rays of light shining through the ocean”
  • “/3d-underwater-god-rays”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 83a47fe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (JavaScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

3D Underwater God Rays loads about 2.5k tokens when it runs. Until then it costs about 180 tokens; SKILL.md has 1,269 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~180
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MengTo/Skills at commit 83a47fe, republished under its MIT licence (© MengTo). 1,269 words, ~2,481 tokens.

Download SKILL.mdSave it as .claude/skills/3d-underwater-god-rays/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
3d-underwater-god-rays
description
Add volumetric underwater god rays to a Three.js scene, marching one drifting swell field along every view ray at half resolution so the light shafts converge on the sun, parallax with the camera and carry rippling caustic streaks, with a shimmering surface underside, a sun that wobbles through the ripples, and the same light dappling fish as they swim through the beams. Use for underwater scenes, oceans seen from below, aquariums, reefs, kelp forests, diving and shipwreck scenes, schools of fish, sunbeams or light shafts through water, caustics, "rays of light shining through the ocean", or watery ripples on a background. Includes a reusable module and the Blue Hour sardine-school demo.

3D Underwater God Rays

Use this when the camera is under the water and the light comes down through it. Reach for a sibling instead in these cases:

  • Sun shafts in air, cut by trees and rooflines: use 3d-sky-rays. Its screen-space radial blur of an occlusion mask is the right tool there. It cannot parallax or carry ripples, so under water keep it only as a low companion for fish shadows (Blue Hour runs it at 0.25).
  • The ocean surface seen from above, with a horizon: use 3d-ultra-realistic-water.
  • Authored shaft planes through one window in a lit interior: use 3d-wood-lighting-scorecard.

Source: extracted from Blue Hour, the living-ocean wallpaper of a Three.js iPhone Duo study. A school of 2,200 Blender sardines turns behind a glass device. The light had to read as sun through water across the whole 38 s camera dolly and on the device's own screen.

Verified stack: Three.js r170, WebGL2, GLSL ShaderMaterials, one HalfFloat render target, and a hand-written ACES pass. No post-processing library.

The mechanism

Sample one drifting swell field across the sun direction, and integrate it along every view ray. Each point in the water is lit by the swell value at its position measured perpendicular to the sun. The shafts are therefore parallel columns in the world. They converge on the sun the way rails converge on a vanishing point, and they slide past the fish when the camera moves. Paint the same shafts in screen space and they stay locked to the lens.

Reuse the working effect

Copy assets/underwater-light.mjs. You pass in your own THREE, and the module does not import a second copy. The demo runs this same module inside Blue Hour's renderer. demo/build.mjs rebuilds it from the Blue Hour sources.

js
import { createUnderwaterLight, LIGHT_GLSL, WATER_GLSL } from './underwater-light.mjs';

// One uniforms object shared by the water, fish and particle materials.
const uniforms = {
  uSunDirection: { value: new THREE.Vector3(.25, .40, -1).normalize() },   // toward the sun
  uTime: { value: 0 },
  uCameraPosition: { value: camera.position },
  uCameraWorld: { value: camera.matrixWorld },
  uInverseProjection: { value: camera.projectionMatrixInverse },
};
const light = createUnderwaterLight(THREE, { uniforms });   // before creating the materials below
light.setSize(innerWidth * dpr, innerHeight * dpr);          // drawing-buffer pixels, again on resize

// Water: a full-screen quad. Declare uSunDirection, uCameraPosition, uTime,
// uShafts and uShaftTexel, then add ${LIGHT_GLSL}${WATER_GLSL} and in main():
//   vec3 sunRay = ray;
//   color += surfaceUnderside(ray, sunRay);     // also bends sunRay through the ripples
//   ...draw your sun with sunRay...
//   color += underwaterShafts(vUv, ray);
// Fish: declare uSunDirection, then add ${LIGHT_GLSL} and multiply the sun key
// by underwaterDapple(worldPosition, uTime).

// Every frame, in this order:
uniforms.uTime.value = time;
camera.updateMatrixWorld();
light.render(renderer);          // the march, into its own half-resolution target
// then the water, the fish, and one tone map at the end

The numbers that shipped

layerconstants
Swell4 sines along (.86, .51), (−.42, .91), (.13, −.99), (−.97, −.24) at ×1, 1.23, 0.87, 1.41; drift 0.29, 0.24, 0.19, 0.15 rad/s; domain warp 0.62
Across the sunscale 1.3, so the main period is about 4.8 world units against a frame about 22 units wide at the school
Shaft focussmoothstep(−0.05, 1, swell)², faded by exp(−0.012 · distance to the surface along the sun)
Caustic webthe swell again at ×2.6 and 1.35× speed, `(1 −
March26 steps, t = 4 + 50·f², weight exp(−0.06t)·(0.08 + f), divided by the weight sum; a stable per-pixel jitter (interleaved gradient noise) instead of temporal noise
Sun blendtotal = mix(total, 0.16, μ^28), where μ = ray·sun
Phase0.7 + 1.1μ^5 + 0.9μ^40; rays below the horizon × mix(0.45, 1, smoothstep(−0.45, 0.35, ray.y))
Gain(0.16, 0.40, 0.47) × 3.6, linear HDR, tone-mapped once at the end
Buffer0.5 × the drawing buffer, HalfFloat, single-sampled (the march is soft, so MSAA buys nothing), upsampled with a 4-tap tent at ½ texel
Surface undersideplane at y = 12; network `(1 −
Fishsun key × 0.62 + 1.5 · shaftLight
The rest of the framesun corona halved to (0.043, 0.095, 0.123)·μ^48; screen-space ray pass cut from 0.82 to 0.25

Rules, each with the failure it prevents

These came from A/B renders of the Blue Hour frame: the same camera, the same frozen fish, one change at a time.

  • Shape the swell into sparse peaks, not ridges. 1 − |swell| makes a web of thin sheets, and a ray that crosses many sheets averages them into flat haze. On a frozen frame the ridge web raised the mean brightness of the water by 20% and halved the contrast between pixel columns, from 0.247 to 0.118. The demo's Ridge web switch shows it.
  • Start the march 4 units out. Starting at 1.5 units, a shaft passing over the camera filled a quarter of the frame with one bright wedge. Weight the samples by exp(−0.06t): the near ones smear least, so they hold the beam edges.
  • Merge the shafts into the sun's glow as the ray points at it. Looking straight up one column, the integral is a single swell value. Where the camera sat between shafts, that left a dark hole on the sun. mix(total, 0.16, μ^28) closes it.
  • Integrate the caustic web inside the march. Sampled 4 times at full resolution instead, the web reads as a pool floor painted over the water. Inside the 26-step march at half resolution, it becomes fine streaks that run along each beam. The demo's Painted on screen switch shows it.
  • Turn down any uniform glow already in the frame. Blue Hour's corona and screen-space ray pass lit the top of the frame evenly. The first shafts barely showed in the composite at about the gain that later shipped. They read only after the corona was halved and the radial pass cut from 0.82 to 0.25, so the shafts carry the light and the gaps stay dark.
  • Judge the gain on the composed page, not the raw canvas. Gain 2.2 looked right on the canvas. On the page, where the canvas sits at 82% opacity under a darkening CSS shade, the same frame showed almost nothing. 3.6 survives the page.
  • Lift the sun above the top edge for full-frame beams. At 21° the sun sits in frame: the convergence point is a glow and the beams are short. Between 30° and 44° it clears the top edge, and the beams fan down the whole frame. The demo's Sun slider sweeps it.
  • Declare each uniform once per shader. LIGHT_GLSL declares its own uniforms (uSurfaceY, uShaftScale, uShaftFloor, uCompare) and expects the host to declare uSunDirection before it. Declaring one twice is a compile error, and the material quietly draws nothing.
Show full SKILL.md (329 more words)Show less

Cost

Under heavy machine load (load average about 60), headless Chrome on ANGLE Metal rendered the whole Blue Hour frame in 6–10 ms at 2048×1440. That frame includes 2,200 instanced sardines, the water, the 1024×720 march, the screen-space ray pass and the tone map. Skipping the march changed the median by less than the run-to-run noise (about ±2 ms) across 5 alternating rounds of 20 frames, so it is not the bottleneck here. If it shows up in your profile, lower the buffer scale or the step count. The shafts are low frequency, so both mostly cost softness, but measure that before you rely on it.

Lifecycle and accessibility

  • Step the simulation at 30 fps, with each step capped at 0.1 s. Blue Hour renders the aquarium into a fixed 2048×1440 canvas (1600×1125 below 800 px) and cover-fits it, so the march cost doesn't scale with the screen.
  • Under prefers-reduced-motion: reduce, hold the frame at t = 0 and re-render only when a control changes. The jitter is stable per pixel, so a still frame doesn't crawl.
  • Stop on document.hidden, and reset the frame clock on visibilitychange so the first frame back doesn't integrate the whole pause.

Verify

  • Orbit the camera: the shafts slide against the fish and still converge on the sun. If they move with the lens, they are painted in screen space.
  • With Ridge web on, the water turns to haze. Back on sparse peaks, you see distinct beams with dark water between them.
  • With Painted on screen on, a pool-floor web covers the water. Inside the march, fine streaks run along each beam.
  • Looking straight at the sun, there is no dark hole.
  • Sweep the sun from 21° to 44°: the convergence point moves off the top edge, and the beams lengthen across the frame.
  • A fish crossing a beam brightens and dims again past it.
  • Reduced motion holds a composed still, the controls still re-render it, and the console is clean at 1440×900 and 390×844.

© MengTo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (assets) in agent-skills/3d/3d-underwater-god-rays of MengTo/Skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/underwater-light.mjs
  • demo/PROMPT.md
  • demo/build.mjs
  • demo/index.html
  • demo/preview.jpg
  • demo/src/ui.css
  • demo/src/ui.html
  • demo/src/ui.js
  • demo/src/water.js

Open the folder on GitHubat commit 83a47fe

Compare with similar skills

3D Underwater God Rays next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

3D Underwater God Rays compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
3D Underwater God Rays this skillMengTo/Skills6.7k—~2.5kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.5k—~2.2kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
Threejs World Generationcalesthio/OpenMontage66k—~2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 1 repo~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.5k GitHub stars~2.2k tokensUpdated 13 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Threejs World Generation

    calesthio/OpenMontage

    Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs.

    66k GitHub stars~2k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • 3Dviz Pro Max Scene Builder

    viettranx/3dviz-pro-max

    Guides building an expressive 3D scene in Three.js or Blender by reasoning through intent, object construction and scientific grounding before using a catalog of recipes and kits.

    709 GitHub stars~2.8k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed

More from MengTo/Skills

All 39 skills in this repo
  • Draws hand-authored SVG spot illustrations in a bold pop-geometric style for design and coding scenes.

    6.7k GitHub stars~5.1k tokensUpdated 4 days ago
    Auto-check passed
  • Draws a slim, long-limbed character acting out one coding or design moment as an outline-free flat SVG card, in a fixed measured palette with confetti and no ground line.

    6.7k GitHub stars~4.9k tokensUpdated 4 days ago
    Auto-check passed
  • Draws flat vector spot illustrations of lanky people doing design and coding things, with solid black as a main fill, for empty states, onboarding and error pages.

    6.7k GitHub stars~5.2k tokensUpdated 4 days ago
    Auto-check passed
  • Draws cozy animal scenes as hand-authored 480x360 SVG cards in a grainy, risograph-like gouache style on hot pink, for empty states, headers and marketing cards.

    6.7k GitHub stars~5.2k tokensUpdated 4 days ago
    Auto-check passed
  • Draws hand-authored SVG spot illustrations in a halftone line style for design and coding scenes.

    6.7k GitHub stars~4.7k tokensUpdated 4 days ago
    Auto-check passed
  • Draws hand-inked cartoon critters and living objects as SVG cards (480x360), each acting out a coding or design idea.

    6.7k GitHub stars~4.6k tokensUpdated 4 days ago
    Auto-check passed

Works with

Questions about 3D Underwater God Rays

What does 3D Underwater God Rays do?

Add volumetric underwater god rays to a Three.js scene, marching one drifting swell field along every view ray at half resolution so the light shafts converge on the sun, parallax with the camera…. 3D Underwater God Rays is an agent skill from MengTo/Skills.js scene, marching one drifting swell field along every view ray at half resolution so the light shafts converge on the sun, parallax with the camera and carry rippling caustic streaks, with a shimmering surface underside, a sun that wobbles through the ripples, and the same light dappling fish as they swim through the beams.

When should I use 3D Underwater God Rays?

3D Underwater God Rays fits situations like: underwater scenes; oceans seen from below; diving and shipwreck scenes; schools of fish.

How do I install 3D Underwater God Rays in Claude Code?

Run `npx skills add MengTo/Skills --skill 3d-underwater-god-rays -a claude-code`. Or copy the skill folder (agent-skills/3d/3d-underwater-god-rays in MengTo/Skills) into .claude/skills/3d-underwater-god-rays in your project. Claude Code loads it when a task matches its description.

How do I install 3D Underwater God Rays in Codex?

Run `npx skills add MengTo/Skills --skill 3d-underwater-god-rays -a codex`. Or copy the skill folder (agent-skills/3d/3d-underwater-god-rays in MengTo/Skills) into .agents/skills/3d-underwater-god-rays in your project. Codex loads it when a task matches its description.

Can I use 3D Underwater God Rays in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MengTo/Skills --skill 3d-underwater-god-rays -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/3d-underwater-god-rays, .gemini/skills/3d-underwater-god-rays, .github/skills/3d-underwater-god-rays and .opencode/skills/3d-underwater-god-rays in your project.

What does 3D Underwater God Rays need to run?

Going by SKILL.md and its folder, 3D Underwater God Rays needs JavaScript for the scripts in its folder. Our summary lists: Node.js.

Does 3D Underwater God Rays access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is 3D Underwater God Rays safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does 3D Underwater God Rays use?

3D Underwater God Rays is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does 3D Underwater God Rays use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to 3D Underwater God Rays?

Skills that share tags, products or a category with 3D Underwater God Rays: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.5k stars) and Threejs Gameplay Systems (valkor-ai/loom, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains 3D Underwater God Rays?

MengTo (a GitHub user) maintains it in MengTo/Skills, which has 6,694 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 6, 2026.

Source: MengTo/Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.