threejs-procedural-materials

threejs-procedural-materials is a skill for Codex from linegel/threejs-complete-set-of-skill. It costs 73 tokens per session (1,940 once invoked), scanned A, original, ISC.

A guide for creating procedural physically based materials in Three.js, a JavaScript 3D graphics library, using its WebGPU rendering system.

In plain words
What is it for?
It supports building shared material systems, choosing texture-mapping methods, handling detailed normals and highlights, and connecting material data to Three.js rendering.
Why use it?
It helps keep color, surface detail, reflections, coordinates, filtering, and changing material states consistent across a 3D scene.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: $skill-name invocation.

Good fit It supports building shared material systems, choosing texture-mapping methods, handling detailed normals and highlights, and connecting material data to Three.js rendering.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/linegel/threejs-complete-set-of-skill/threejs-procedural-materials
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add linegel/threejs-complete-set-of-skill --skill threejs-procedural-materials
Clone the repo
git clone --depth 1 https://github.com/linegel/threejs-complete-set-of-skill

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threejs-procedural-materials

README.md
[![agentmods](https://agentmods.dev/badge/skills/linegel/threejs-complete-set-of-skill/threejs-procedural-materials/github.svg)](https://agentmods.dev/skills/linegel/threejs-complete-set-of-skill/threejs-procedural-materials)
Your own site
<a href="https://agentmods.dev/skills/linegel/threejs-complete-set-of-skill/threejs-procedural-materials"><img src="https://agentmods.dev/badge/skills/linegel/threejs-complete-set-of-skill/threejs-procedural-materials/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for threejs-procedural-materials

Your own site · 80×15
<a href="https://agentmods.dev/skills/linegel/threejs-complete-set-of-skill/threejs-procedural-materials"><img src="https://agentmods.dev/badge/skills/linegel/threejs-complete-set-of-skill/threejs-procedural-materials.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,940 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.01940
Opus 5 $0.00036 $0.00970
Sonnet 5 $0.00015 $0.00388
Haiku 4.5 $0.00007 $0.00194

Measured 11d ago against content hash aaaad45d3aef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

threejs-procedural-materials scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (examples/filtered-height-normal.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/threejs-procedural-materials/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Procedural Materials

Build a cause graph, not a collection of channel effects:

stable coordinates -> structural causes -> identity weights
  -> causal modifiers -> filtered microstructure
  -> NodeMaterial PBR slots -> final-image owner

Use MeshStandardNodeMaterial for standard opaque/emissive PBR and MeshPhysicalNodeMaterial only when its extra lobes or transport properties are part of the surface. Keep Three.js lighting, environment, shadows, and energy handling by assigning node slots instead of replacing the whole fragment output.

For multi-system scenes, $threejs-choose-skills is an optional coordinator. Fields own shared scalar/vector causes, geometry owns silhouettes, water owns surface/transport, and the final-image pipeline owns tone mapping and display conversion. Consume each dynamic or cross-system cause with declared units, coordinate/frame convention, producer and consumer owners, revision, spatial/temporal support and filter, validity domain, error bound, update cadence, and staleness rule. A visual material state does not become another simulation owner.

Initialize and gate the renderer before allocating storage, dispatching compute-written cause maps, or compiling storage-backed material branches:

await renderer.init();
if (renderer.backend.isWebGPUBackend !== true) {
  throw new Error('Native WebGPU is required for procedural material GPU branches.');
}
const { features, limits } = renderer.backend.device;

Select sampled/storage bindings, writable formats, and filtering from those initialized features and limits.

1. Freeze coordinates, causes, and identities

Choose UV, object, world, radial, or generated-texture space from the physical or authored cause. Record scale in meters or declared art units. Mixing spaces is valid only for distinct causes, such as world-height wetness over object-space grain.

Define normalized material identity weights and a response bundle per identity:

linear base reflectance
roughness alpha and metal/dielectric endpoint
resolved height/normal spectrum plus removed variance
causal modifiers such as wetness, wear, heat, or coverage
semantic/material ID and diagnostic color

Read the full file on GitHub · 199 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 199 lines · 73 tokens per session scan A aaaad45d3aef

Subscribe to this mod's changes

threejs-procedural-materials is a skill published in the GitHub repository linegel/threejs-complete-set-of-skill (6 stars, last pushed 1mo ago), licensed ISC. It adds 73 tokens to every session and 1,940 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.