# 3d Sky Rays

Add sun shafts and crepuscular rays to a Three.js or equivalent 3D scene, using scene...

- Repository: https://github.com/MengTo/Skills (7170 stars)
- Category: Media
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add MengTo/Skills --skill 3d-sky-rays -g -a claude-code -y`
Codex: `npx skills add MengTo/Skills --skill 3d-sky-rays -g -a codex -y`
Cursor: `npx skills add MengTo/Skills --skill 3d-sky-rays -g -a cursor -y`
Gemini CLI: `npx skills add MengTo/Skills --skill 3d-sky-rays -g -a gemini-cli -y`

## Description

Add sun shafts and crepuscular rays to a Three.js or equivalent 3D scene, using scene occlusion, a projected sun position, controlled foreground spill, and scalable post-processing. Use for rays of light from the sky, sunlight through trees or roofs, and golden-hour architectural scenes.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 3D Sky Rays

Make the light appear to travel through gaps in the scene. Roof edges and foliage should shape the shafts as the camera moves.

## Fit the existing renderer

Inspect the renderer version, render targets, alpha usage, depth path, tone mapping, and post-processing order. Keep the existing WebGL or WebGPU backend. The shader recipe below describes a WebGL screen-space effect; implement the equivalent in the project's node/render pipeline when using WebGPU.

Use one normalized world-space direction pointing **toward the sun** for the sky, ray source, and directional lighting. If the art direction deliberately offsets the visible sun from the lighting sun, document and control that offset in one place.

## Build an occlusion-aware ray pass

The rest: https://github.com/MengTo/Skills/blob/HEAD/agent-skills/3d/3d-sky-rays/SKILL.md
