← Search

Three.js shaders: GLSL, ShaderMaterial, uniforms, effects
Frontend 🧪 Install ran in our test sandbox · Nov 11, 2026 📌 Pinned version: commit 0e18186
Install test only, on the date shown. This does not guarantee the code is safe.
⚙ Needs: a working Three.js scene…

Three.js shaders: GLSL, ShaderMaterial, uniforms, effects

A short pointer to the Three.js custom-shader reference — GLSL basics, materials, uniforms, common effects

At a glance
What
A short pointer to the Three.js custom-shader reference — GLSL basics, materials, uniforms, common effects
Cost
Free
Needs
a working Three.js scene; no license declared in the source repo — read it yourself before reusing its content
Install
Copy the installer prompt below into your Muse — your agent does the rest.

Version:

Quick answer

Three.js shaders is a free short pointer to the Three.js custom-shader reference, covering GLSL basics, materials, uniforms and common effects. It compares ShaderMaterial and RawShaderMaterial, explains uniform types and updating, varyings, and patterns like texture sampling, vertex displacement, fresnel, noise, gradients, rim lighting and dissolve, plus extending built-in materials.

⌁

Install

Copy the install package below, then paste it into Muse🧪 Install ran in our test sandbox · Nov 11, 2026📌 Pinned version: commit 0e18186

Step 0, before installing anything: read this install prompt, summarize in a few lines what this build does and what this lookup involves, then ask me to confirm before you proceed. Prerequisites: a working Three.js scene; no license declared in the source repo — read it yourself before reusing its content Look up "Three.js shaders: GLSL, ShaderMaterial, uniforms, effects" for me — reference lookup only, the same short-pointer form as the previous version of this prompt. It is @cloudai-x's threejs-shaders reference (SKILL.md alone, no companion files): custom GLSL vertex and fragment shaders, uniforms and varyings, shader chunks, extending built-in materials, instanced attributes, plus the same effects as node materials with TSL on WebGPU, for three.js r186, on WebGL or with WebGPU and TSL. Fetch the SKILL.md from the source repository into a temporary folder, verify it against the fingerprint below, review it for anything suspicious, and report in two or three sentences what the shader reference covers (ShaderMaterial vs RawShaderMaterial, uniforms, output color and tone mapping, common patterns, instancing and custom attributes, extending built-in materials, shader chunks, debugging, WebGPU and TSL) so I can consult it in my own project. Do not copy the guide's content into my project — this is a reference lookup only. Repository: https://raw.githubusercontent.com/cloudai-x/threejs-skills/0e181866f095b5f06d005133876e926515390d95/skills/threejs-shaders/SKILL.md Pinned version: install the code at commit 0e181866f095b5f06d005133876e926515390d95 exactly (Skill Harbor tested this version). Do not substitute a newer version. If this commit is unreachable, stop and tell me. [FINGERPRINTS] SKILL.md at the pinned commit: SHA-256 8dc55ed6cc348abaad60851ae9f3f5ebcc6e3027dd7f7a55acc1832c73f11bca, 26,503 bytes (26,429 characters). If the fetched file does not match, it changed since the review: stop, tell me what you found and let me decide. Updated October 19, 2026: Skill Harbor regenerated this lookup prompt from the current upstream file (SKILL.md nearly doubled, from 14,056 to 26,429 characters). The reference now targets three.js r186 explicitly — the examples use WebGLRenderer, with a dedicated WebGPU and TSL section for WebGPURenderer — and it is rewritten and reorganized rather than merely edited; the old standalone sections on varyings, GLSL built-in functions, common material properties, external shader files and performance tips are gone, replaced by deeper coverage of how shaders actually compile and run today. ShaderMaterial vs RawShaderMaterial is rewritten: every ShaderMaterial compiles as GLSL ES 3.00 (three.js always prepends #version 300 es, WebGL 1 support is gone; texture(), textureLod() and derivatives are core, and texture2D, varying and gl_FragColor survive only as #define aliases), leaving glslVersion unset is the rule (setting THREE.GLSL3 only removes the gl_FragColor alias), and a RawShaderMaterial gets almost no injected declarations, must set glslVersion: THREE.GLSL3 and its own precision and output, and must never receive the built-in matrices through uniforms. New coverage: output color and tone mapping (a color uniform holds linear values converted from sRGB hex, and a ShaderMaterial is only tone-mapped and color-space converted if its fragment shader ends with the tonemapping_fragment and colorspace_fragment includes; a VideoTexture is not sRGB-decoded for ShaderMaterial and must be decoded manually); common patterns consolidated to vertex displacement, Fresnel (with the world-space vs view-space trap spelled out) and dissolve; instanced meshes and custom attributes (instanceMatrix and instanceColor are declared but the shader must apply instanceMatrix, uv1 to uv3 and tangent need your own declarations, and frustumCulled must be turned off when instances move in the shader); extending built-in materials via onBeforeCompile with its exact injection points and customProgramCacheKey; shader chunks (there is no output_fragment chunk — the final output chunk is opaque_fragment); and debugging through renderer.debug.onShaderError. An entirely new WebGPU and TSL section replaces any GLSL-only view: ShaderMaterial, RawShaderMaterial and onBeforeCompile run only under WebGLRenderer (under WebGPURenderer a ShaderMaterial logs that it is not compatible and onBeforeCompile is never called), so the same effects are rebuilt as node materials with TSL — MeshBasicNodeMaterial for unlit effects or the node slots of MeshStandardNodeMaterial (colorNode, opacityNode, emissiveNode, normalNode, positionNode, fragmentNode), uniform() and the built-in time node instead of a hand-fed time uniform, texture() sampling with .discard(), vertex displacement through positionNode built on positionLocal (never positionGeometry), reusable logic as TSL Fn functions compiled to both GLSL and WGSL (glslFn and wgslFn are each single-backend only), varying() to pass values between stages, compute through renderer.compute(), await renderer.init() before any use, and debugging with renderer.debug.getShaderAsync. A long Common Mistakes list documents the recent deprecations and renames (THREE.Timer replacing the Clock deprecated in r183; imports from three/tsl, never three/nodes; varying() renamed from toVarying; uniformArray renamed from uniforms() in r168 and TWO_PI from PI2 in r181; setName() renamed from label() in r179; TextureNode.sample() renamed from uv() in r172; blendScreen, viewportUV and packNormalToRGB replacing screen(), viewportTopLeft and directionToColor(); rangeFog() removed in favor of fog() with rangeFogFactor(); the WebGL 1 extension keys removed in r163; ShaderMaterial opacity needing its own uniform; and MultiplyBlending and SubtractiveBlending requiring premultipliedAlpha). Nothing in the file runs on its own and nothing is sent anywhere: it is a text reference with JavaScript and GLSL examples for your own Three.js project; the previous pin and character count are superseded. 1. Fetch SKILL.md from the repository URL above into a temporary folder, then compare it with the fingerprint from Skill Harbor's review of 2026-10-19 (see [FINGERPRINTS] above). If it does not match, stop and tell me what you found. 2. Safety check: read SKILL.md and review it for anything suspicious (unexpected network calls, shell commands, credential harvesting); STOP on any red flag and tell me. In plain words, confirm from the file: it is a text reference targeting three.js r186 with JavaScript and GLSL examples and no executable code of its own, no scripts and no companion files; it asks for no API key and no secret; its examples run locally in a browser against the three.js library (WebGLRenderer, or WebGPURenderer with TSL in the dedicated section); and it declares no license. 3. Report back in two or three sentences what the shader reference covers (ShaderMaterial vs RawShaderMaterial, uniforms, output color and tone mapping, common patterns such as vertex displacement, Fresnel and dissolve, instancing and custom attributes, extending built-in materials, shader chunks, debugging, WebGPU and TSL, common mistakes), so I can consult it in my own project. Do not copy the guide's content into my project — this is a reference lookup only. GitHub is optional: if I have a GitHub account or the gh CLI, you may use it; otherwise public access is fine. Never require it unless it's in the prerequisites above. Rules: don't touch anything outside the temp folder. If anything looks off, stop and ask me.

🔒 Security, provenance and what this touches
🧭 What this touches
Based on the install prompt we scanned, this skill does not run commands, make third-party network calls, install packages, write files, or ask for API keys.
Install prompt analysis · 2026-10-13
🔒 Security and provenance
📌 Pinned version: commit 0e18186 · 2026-10-19
🧪 Install ran in our test sandbox · Nov 11, 2026
👁 Observed during the install test · Nov 11, 2026 : no network contact
🔎 Last checked · Nov 19, 2026 : no change detected in the files linked by this install prompt
Skill Harbor never reviews the code of a listed skill. These are dated facts about the install prompt and our install test, not a safety certification. Review a skill yourself before you install it. How we verify
Wanna be extra careful?

The install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?

How to check a skill before installing →

✓

Verification certificate

Dated facts about what was checked for this listing, and how. This is not a safety certification.

Pinned version
0e18186 · 2026-10-19
Sandbox install test
Install ran in our test sandbox · Nov 11, 2026
Creator identity
Not verified
Fingerprint watch
Last checked · Nov 19, 2026 : no change detected in the files linked by this install prompt
Install prompt analysis
2026-10-13 : No commands, network calls, packages, file writes or API keys detected.

Skill Harbor never reviews the code of a listed skill. These are dated facts about the install prompt and our install test, not a safety certification. Review a skill yourself before you install it. How we verify

?

Questions

How do I install a skill?

Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the skill up for you — no manual configuration.

Where does my money go?

Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.

What does the ✓ next to a creator’s name mean?

It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a skill before installing it.