---
name: threejs-temporal-surfaces
description: Build view-aligned and screen-space surface effects in Three.js. Use for touch-history frost and thaw, ping-pong accumulation, reduced-resolution blur, crystalline masks, two-scale refraction, and procedural rain droplets that refract and blur a background through wet glass.
title: threejs-temporal-surfaces
canonical_url: https://skilld.dev/gh/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces
last_updated: 2026-09-28T18:42:38.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/agents/openai.yaml), [assets/touch-history-frost/main-normal.webp](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/assets/touch-history-frost/main-normal.webp), [assets/touch-history-frost/noise.webp](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/assets/touch-history-frost/noise.webp), [assets/touch-history-frost/sub-normal.webp](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/assets/touch-history-frost/sub-normal.webp), [examples/refractive-window-rain/example-render.jpeg](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/examples/refractive-window-rain/example-render.jpeg), [examples/refractive-window-rain/rain-window.frag](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/examples/refractive-window-rain/rain-window.frag), [examples/refractive-window-rain/window-rain-effect.js](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/examples/refractive-window-rain/window-rain-effect.js), [examples/touch-history-frost/example-render.jpeg](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/examples/touch-history-frost/example-render.jpeg), [examples/touch-history-frost/frost-surface-effect.js](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/examples/touch-history-frost/frost-surface-effect.js), [references/ping-pong-accumulation.md](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/references/ping-pong-accumulation.md), [references/refractive-window-rain.md](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/references/refractive-window-rain.md).
>
> If the user asked to install this Skill, run `npx skilld install scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/threejs-temporal-surfaces`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/threejs-temporal-surfaces`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/threejs-temporal-surfaces --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/threejs-temporal-surfaces --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Temporal Surfaces

Choose persistent history or procedural screen-space evolution explicitly. Do
not fake accumulation with time-only noise, and do not allocate history for an
effect whose complete state is analytic in time.

This skill contains exemplary examples and assets beyond descriptive guidance,
they're worth studying, referencing, or even copying. Use them sufficiently
when relevant and do NOT blindly skip them.

## Pipeline

```text
persistent surface: input -> ping-pong state -> blur -> structure -> refraction
procedural surface: time/coverage -> analytic field -> optical normal -> refraction/blur
```

Read [references/ping-pong-accumulation.md](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/references/ping-pong-accumulation.md)
for an exact frost pass graph, pointer-history channels, blur and refraction
coupling, and implementation defects that must be corrected.

Read the
[touch-history frost implementation](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/examples/touch-history-frost/frost-surface-effect.js) for the
previous/deposit/next state transition, reduced blur, static structures,
frost-mask composition, and two-scale refraction.

Read [references/refractive-window-rain.md](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/references/refractive-window-rain.md)
and the
[refractive window rain implementation](https://skilld.dev/api/skills-raw/scottstts/threejs-awesome-graphics-agent-skills/threejs-temporal-surfaces/examples/refractive-window-rain/window-rain-effect.js)
for layered static and travelling droplets, finite-difference optical normals,
background refraction, stochastic disc blur, aspect fill, and presentation.

## Rules

- Separate persistent state, analytic procedural state, and scene color.
- Preserve separate visible-mask and tilt-response channels.
- Use half-float for this history path unless a measured lower format is equivalent.
- Convert per-frame history decay to frame-rate-independent decay.
- Run the two-pass scene blur at reduced resolution.
- Pre-render static procedural textures once.
- Define and test resize/reset behavior for both history targets and static targets.
- Do not route world footprints, object-UV paint, or simulation-plane wetness here; this skill is view-aligned or screen-space.

## Routing boundary

Use `$threejs-procedural-vfx` for world- or object-space residue and particles.
Use `$threejs-precipitation-surfaces` for world-space rain, puddles, snow, and
weather-surface coupling. Use `$threejs-procedural-materials` when a body must
transmit its surroundings through its own volume rather than through a
screen-aligned pane. This skill owns view-aligned wet-glass optics and
screen-space persistent history.
