/ghibli-threejs:threejs-postprocessing-anime-gradefrom ghibli-threejs
Configures a Ghibli/anime post-processing chain for three.js EffectComposer: RenderPass, half-res GTAO, UnrealBloom with linear-HDR threshold, optional underwater pass, split-tone color grade (gold/peach highlights, teal shadows), OutputPass, and SMAA. Covers bloom threshold math, white-albedo toning, and common artifacts like dark speck/sheets.
Ships in ghibli-threejs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The final look of a Ghibli frame is decided after lighting: soft contact shadows, bloom only on the sunniest tips and halos, warm gold highlights over teal shadows, a gentle vignette, clean edges. This skill gives the pass order that works, the numbers, and the artefacts each wrong choice produces.
Stack: three.js WebGLRenderer + EffectComposer (r186 addons: RenderPass, GTAOPass, UnrealBloomPass, ShaderPass, OutputPass, SMAAPass), composer target HalfFloatType, ACES tone mapping in OutputPass. Works the same in R3F with a manual composer.
Set up post-processing for
{{entry file}}:RenderPass → GTAO (half-res, 8 samples, 8 denoise samples) → UnrealBloom (threshold ≈ 1.05 linear, i.e. ~0.85 on screen) → [underwater pass] → grade (saturation, warmth, gold/peach highlights, teal/cyan mid-shadows, vignette) → OutputPass → SMAA. Composer target HalfFloat. Hide god rays, dust motes, clouds, mist, hover rings and other additive/transparent sheets from the GTAO pass by wrappinggtao.render. Tone pure-white albedos down ~0.6×. Every value in the lil-gui Tune panel. Screenshot sunlit foliage, a white object and a backlit view; report the ms per pass.
Full wiring in references/post-chain.js; grade shader in references/anime-grade.glsl.
RenderPassGTAOPass — half resolution (override setSize to ceil(w/2), ceil(h/2)), samples: 8, denoise samples: 8, rings: 2, radius: 6, radius .35, distanceExponent 1.2, thickness 1.2, blendIntensity .85. Soft contact shadows don't need full res; measured ≈ 8 ms at half-res on a 2.5K frame (early upper bound).UnrealBloomPass(strength .42, radius .55, threshold 1.05).ShaderPass (UV wobble, cyan grade, heavier vignette), disabled above water.ShaderPass — linear HDR, before tone mapping.OutputPass (tone mapping + sRGB).SMAAPass — must come after OutputPass: on HDR input its edge detection prints dark single-pixel specks on bright highlights.float l = dot(col, vec3(.2126,.7152,.0722));
col = mix(vec3(l), col, uSat); // 1.18 day, 1.28 night
col *= vec3(1.+uWarm, 1.+uWarm*.3, 1.-uWarm*.7); // warmth .05
float sh = 1. - smoothstep(0., uSplit, l), hi = smoothstep(uSplit, 1.1, l); // split .35
col *= mix(vec3(1.), uShTint, sh*uSplitAmt); // teal 0x8ec6cf, amount .42
col *= mix(vec3(1.), uMidTint, (1. - sh - hi)*uSplitAmt); // white by day; cool blue at night
col *= mix(vec3(1.), uHiTint, hi*uSplitAmt); // gold/peach 0xffe2bf
Vignette smoothstep(1.05, .3, length((uv-.5)*vec2(1.15,1.))), strength .28. Exposure .9 by day.
Wrap gtao.render: hide everything in an aoHidden list (god-ray cylinders, dust motes, clouds, mist billboards, waterfall sheets, foam, paddy water, petals, hover rings) and an aoOnly list (stars — hidden from AO but still visible to the water's mirror camera), optionally render AO with camera.layers.set(0) so fine foliage on layer 1 is skipped (it already gets dappled sun shadows; this avoids cutout halos and millions of duplicate triangles), then restore.
Every pass runs at the composer's pixel ratio, so cap the pixel count, not just the DPR (a 4K monitor at DPR 1 is still 8.3 M pixels): pr = min(devicePixelRatio, dprCap, sqrt(budget / (w·h))), then renderer.setPixelRatio(pr) and composer.setPixelRatio(pr) on every resize. Budgets that worked, picked once at start-up from the GPU string, core count and memory: strong GPU 4.2 M px / DPR ≤ 2 (raised from 2.3 M / 1.5 for sharpness), mid 1.4 M / ≤ 1.25, weak (phones, old integrated) 0.78 M / ≤ 1. On a strong desktop never let an adaptive resolution scale take the ratio below min(1, pr) — one rendered pixel per CSS pixel. On the weak tier switch GTAO and SMAA off (pass.enabled = false) and keep bloom, grade and OutputPass. The renderer itself runs antialias: false; SMAA is the only AA.
0xffe2bf) or a shadow fill above ~0.2 turn sunlit grass lime.max(x, 1e-3)): Inf/NaN pixels become black specks that bloom spreads.preserveDrawingBuffer returns blank; pixel probes on it prove nothing.gl.finish() + a readPixels of the default framebuffer (not a HalfFloat target — that's INVALID_OPERATION and silently gives CPU time only).threejs-ghibli-toon-shading, threejs-ghibli-night-mode, threejs-webgl-underwater-effect, threejs-webgl-performance-profiling, threejs-headless-visual-verification.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
threejs-postprocessing, anime-grade, bloom, color-grading, gtao, smaa
npx claudepluginhub nicksonthc/ghibli-threejs --plugin ghibli-threejsOther plugins' skills for the same job
31 skills in this plugin
/threejs-blender-glb-pipelineBuilds a reference-image-driven asset pipeline from headless Blender to GLB for a three.js scene — an asset contract (units, axes, grounding, required mesh/material names, budgets, attachment numbers), one parallel subagent per asset group writing craft_<slug>.py generators, preview renders compared against the reference, measured-bounding-box placement in the web scene, Draco compression, and a scored asset quality pass. Use when the user has a reference picture and wants a 3D scene from it, asks to model props/trees/characters in Blender for three.js, export GLBs, fix glTF export issues (vertex-colour alpha, UV flip, axes, custom normals), compress models, or rate and improve every asset in a scene./threejs-boat-buoyancy-steeringFloats a boat (or any buoyant prop) on three.js water with Gerstner waves generated from one JS table that feeds both the GLSL vertex shader and a CPU waveHeight(), four-probe heave/pitch/roll damped springs, an arc-length drift lane that bends round rocks, click-to-steer W/A/S/D rowing with momentum and drag, an autopilot that pursues the lane back, and a chase camera that keeps the orbit. Use when the user wants a drifting or steerable boat, buoyancy, objects bobbing on waves, Gerstner waves on a river/lake, a boat autopilot, or a follow/chase camera behind a vehicle on water.