Writing FXPack Shaders: Difference between revisions

From MXWendler Wiki
Jump to navigation Jump to search
Add section: writing a shader with Claude (bot)
Split into howto + reference; move tables to FXPack Shader Reference; no inline bold (bot)
 
Line 1: Line 1:
<div class="noprint">
{{TOCright}}
==Introduction==
This is a task-oriented guide to writing your own MXWendler effect as an FXPack shader — from a minimal shader to packaging and installing, including how to have Claude write one for you. For the exact naming rules and the full uniform tables, see the companion page [[FXPack Shader Reference]].
</div>
An '''FXPack''' is MXWendler's shader-effect container format. It is a plain ZIP archive with the extension <code>.fxpack</code> that bundles one or more GLSL shader stages together with any auxiliary textures and a readme. Dropping an <code>.fxpack</code> file into the <code>effects/</code> folder makes a new effect available in Preload Preview, the Live Editor and on the Render Output — no recompilation of MXWendler is required.
 
The clever part of the format is the '''interface''': MXWendler scans your shader source for specially-named <code>uniform</code> declarations. Uniforms whose names start with <code>mxw_</code> and end with <code>_mxw</code> are recognised automatically and are either fed a live engine value every frame (time, resolution, input frames …) or turned into a '''UI control''' (a slider or a color picker) that the operator can automate. You never write any C++ or edit MXWendler itself — the shader ''is'' the plugin.
 
This page documents that interface exactly as the loader implements it (see <code>mxw_effect.cpp</code>, <code>mxw_effectbase::setSource()</code>).


See also: [[Effects]] · [[Tutorial Coupling Video with Effects and Audio Signals]]
See also: [[Effects]] · [[Tutorial Coupling Video with Effects and Audio Signals]]


<div class="noprint">
<div class="noprint">
==Package structure==
==Introduction==
</div>
An <code>.fxpack</code> is a ZIP file with this internal layout:
 
MyEffect.fxpack            (a ZIP archive)
├── effects/
│    └── MyEffect.mxf    ← fragment shader (required)
│    └── MyEffect.mxv    ← vertex shader        (optional)
│    └── MyEffect.mxg    ← geometry shader      (optional)
│    └── MyEffect.mxtc    ← tessellation control (optional)
│    └── MyEffect.mxte    ← tessellation eval    (optional)
├── textures/
│    └── myLookup.bmp    ← auxiliary textures  (optional)
└── readme.txt            ← human description    (recommended)
 
Notes:
* The effect '''name''' shown in the MXWendler UI is taken from the <code>.fxpack</code> file name, not from the file inside.
* Inside <code>effects/</code> the loader picks the '''first''' file matching each stage extension, so the base name is free — but matching it to the pack name keeps things tidy.
* At most '''one file per shader stage'''. A minimal effect is just a single <code>.mxf</code> fragment shader.
* Auxiliary textures live in a <code>textures/</code> sub-folder and are wired up through sampler uniforms (see [[#Auxiliary textures|Auxiliary textures]]).
 
<div class="noprint">
==Shader stages and file extensions==
</div>
Each GLSL pipeline stage is a separate file, identified by extension:
 
{| class="wikitable"
! Extension !! Stage !! Required
|-
| <code>.mxv</code> || Vertex shader || no
|-
| <code>.mxf</code> || '''Fragment shader''' || '''yes''' (the workhorse)
|-
| <code>.mxg</code> || Geometry shader || no
|-
| <code>.mxtc</code> || Tessellation control shader || no
|-
| <code>.mxte</code> || Tessellation evaluation shader || no
|}
 
Most effects are pure image processing and only need the fragment shader. If a tessellation stage is present, MXWendler switches the geometry to <code>GL_PATCHES</code> automatically.
 
Target GLSL version is '''120''' (<code>#version 120</code>) for maximum cross-platform / macOS compatibility. Higher versions work on desktop GL but may be skipped on older macOS.
 
<div class="noprint">
==The interface: mxw_..._mxw uniforms==
</div>
The loader tokenises your source, strips comments, and inspects every <code>uniform</code> declaration. A uniform participates in the MXWendler interface only if its name '''starts with <code>mxw_</code> and contains <code>_mxw</code>'''. Everything else is a normal private uniform you set yourself inside the shader.
 
Which kind of interface a uniform becomes is decided by its GLSL '''type''' and by how many underscores its name contains:
 
{| class="wikitable"
! Type !! Underscore count !! Meaning
|-
| <code>sampler2D</code> || – || Input texture (video frame, feedback, or aux image)
|-
| <code>float</code> || 2 || A live engine value (time, resolution …)
|-
| <code>float</code> || 6 || A '''slider''' UI control
|-
| <code>vec4</code> || 7 || A '''color picker''' UI control
|}
 
;Number encoding
Because GLSL identifiers cannot contain <code>.</code> or <code>-</code>, numeric values baked into uniform names are encoded:
* <code>x</code> stands for the decimal point → <code>0x5</code> = <code>0.5</code>, <code>100x0</code> = <code>100.0</code>
* a leading <code>n</code> means negative → <code>n0x5</code> = <code>-0.5</code> (slider ranges only)
 
<div class="noprint">
==Live engine values (global uniforms)==
</div>
</div>
Declare a <code>float</code> uniform named <code>mxw_<value>_mxw</code> and MXWendler updates it every frame:
An FXPack is a plain ZIP archive (extension <code>.fxpack</code>) holding one or more GLSL shader stages plus any auxiliary textures. Drop it into MXWendler's <code>effects/</code> folder and it becomes a new effect in Preload Preview, the Live Editor and on the Render Output no recompilation needed. The shader ''is'' the plugin.
 
{| class="wikitable"
! Uniform !! Value supplied each frame
|-
| <code>mxw_millis_mxw</code> || Wall-clock time in milliseconds — use for animation
|-
| <code>mxw_maxU_mxw</code> || Input texture width in pixels
|-
| <code>mxw_maxV_mxw</code> || Input texture height in pixels
|-
| <code>mxw_reciprocalU_mxw</code> || 1 / width (multiply texcoords by this to normalise to 0..1)
|-
| <code>mxw_reciprocalV_mxw</code> || 1 / height
|-
| <code>mxw_viewportsizeX_mxw</code> || Render viewport width in pixels
|-
| <code>mxw_viewportsizeY_mxw</code> || Render viewport height in pixels
|-
| <code>mxw_footagesizeX_mxw</code> || Source footage width in pixels
|-
| <code>mxw_footagesizeY_mxw</code> || Source footage height in pixels
|-
| <code>mxw_footageframelength_mxw</code> || Number of frames in the source footage
|-
| <code>mxw_framenumber_mxw</code> || Current footage frame number
|-
| <code>mxw_framecounterenvironment_mxw</code> || Global engine frame counter
|-
| <code>mxw_outputLuminance1x1_mxw</code> || Average luminance of the output (1×1 reduction)
|}
 
Declaring an unknown <code>mxw_..._mxw</code> float with two underscores is an error and the shader will fail to load.
 
;Coordinate system important
MXWendler binds video frames as '''rectangle textures''', so <code>gl_TexCoord[0].xy</code> arrives in '''pixels''' (0…width, 0…height), '''not''' normalised 0…1. Use the reciprocal/max uniforms to convert. The standard helpers used throughout the stock effects are:
 
<syntaxhighlight lang="glsl">
uniform float mxw_reciprocalU_mxw;
uniform float mxw_reciprocalV_mxw;
uniform float mxw_maxU_mxw;
uniform float mxw_maxV_mxw;


// pixel coords -> 0..1
MXWendler feeds your shader live values and builds UI sliders/color pickers from specially-named uniforms (<code>mxw_..._mxw</code>). This guide shows the workflow; the [[FXPack Shader Reference]] lists every available uniform.
vec2 normalizedTc(vec2 tc) {
    return tc * vec2(mxw_reciprocalU_mxw, mxw_reciprocalV_mxw);
}
// 0..1 -> pixel coords (needed before texture2D lookups)
vec2 unNormalizedTc(vec2 tc) {
    return tc * vec2(mxw_maxU_mxw, mxw_maxV_mxw);
}
</syntaxhighlight>
 
<div class="noprint">
==Input textures (samplers)==
</div>
Video input arrives through <code>sampler2D</code> uniforms. The name selects ''which'' frame:
 
{| class="wikitable"
! Uniform pattern !! Delivers
|-
| <code>mxw_tex_plus_0_mxw</code> || The '''current''' input frame (the normal case)
|-
| <code>mxw_tex_plus_N_mxw</code> || The frame N steps in the '''future''' (look-ahead)
|-
| <code>mxw_tex_minus_N_mxw</code> || The frame N steps in the '''past''' — enables trails / motion blur / temporal feedback
|-
| <code>mxw_tex_render_prefinalfx_minus_N_mxw</code> || Feedback of the render output (before final FX), N frames back
|-
| <code>mxw_accum_buffer_N_mxw</code> || Multi-Render-Target accumulation buffer N (advanced ping-pong)
|}
 
Sample any of them with <code>texture2D(sampler, pixelCoords)</code> where the coordinates are in ''pixels'' (use <code>unNormalizedTc()</code> if you computed a 0..1 coordinate). Requesting past/future frames (<code>minus</code>/<code>plus</code> with N&gt;0) tells the engine to keep a rolling history of frames for this effect.
 
<div class="noprint">
==UI controls==
</div>
===Sliders===
A <code>float</code> uniform with '''six''' underscores becomes an operator-facing, automatable slider:
 
uniform float mxw_vertslider_<Label>_<lo>_<hi>_<default>_mxw;
 
* <code>vertslider</code> — the widget type (currently the only slider type)
* <code>&lt;Label&gt;</code> — a '''single-token''' name shown in the UI (no spaces/underscores; use CamelCase)
* <code>&lt;lo&gt; &lt;hi&gt;</code> — slider range (encoded numbers, may be negative with <code>n</code>)
* <code>&lt;default&gt;</code> — start value
 
Example — a "Resolution" knob from 0.1 to 10.0 starting at 0.5:
 
<syntaxhighlight lang="glsl">
uniform float mxw_vertslider_Resolution_0x1_10x0_0x5_mxw;
</syntaxhighlight>
 
;The Master convention
By convention almost every stock effect exposes a '''Master''' slider (0…1, default 1) and uses it to cross-fade between the untouched input and the processed result, so the effect can be dialled in smoothly and automated:
 
<syntaxhighlight lang="glsl">
uniform float mxw_vertslider_Master_0x0_1x0_1x0_mxw;
...
gl_FragColor = mix(
    texture2D(mxw_tex_plus_0_mxw, gl_TexCoord[0].xy),  // original
    processedColor,                                    // your result
    mxw_vertslider_Master_0x0_1x0_1x0_mxw);            // dry/wet
</syntaxhighlight>
 
Following this convention is strongly recommended — it makes your effect behave like the built-ins.
 
===Color pickers===
A <code>vec4</code> uniform with '''seven''' underscores becomes a color picker (RGBA):
 
uniform vec4 mxw_colorcontrol_<Label>_<r>_<g>_<b>_<a>_mxw;
 
Each component is an encoded number in 0…1. Example — a tint control defaulting to opaque dark blue:
 
<syntaxhighlight lang="glsl">
uniform vec4 mxw_colorcontrol_Tint_0x0_0x1_0x25_1x0_mxw;  // rgba = (0.0, 0.1, 0.25, 1.0)
</syntaxhighlight>
 
<div class="noprint">
==Auxiliary textures==
</div>
To ship a fixed lookup image (gradient, mask, logo, LUT strip …) with your effect, place the file in the <code>textures/</code> folder of the ZIP and reference it with a sampler whose name encodes the file name. The '''last''' underscore before <code>_mxw</code> separates the extension:
 
textures/myGradient.bmp  ⇄  uniform sampler2D mxw_tex_myGradient_bmp_mxw;
textures/mixred.bmp      ⇄  uniform sampler2D mxw_tex_mixred_bmp_mxw;
 
Rules:
* Pattern: <code>mxw_tex_&lt;basename&gt;_&lt;ext&gt;_mxw</code> maps to <code>textures/&lt;basename&gt;.&lt;ext&gt;</code>.
* The base name must '''not''' start with <code>plus</code>, <code>minus</code>, <code>render</code> or <code>accum</code> — those prefixes are reserved for the frame samplers above.
* A missing texture file makes the effect fail to load.


<div class="noprint">
<div class="noprint">
==A minimal fragment shader==
==A minimal fragment shader==
</div>
</div>
The smallest useful effect — a brightness knob that fades to the original via Master:
The smallest useful effect — a brightness knob that fades to the original via a Master slider:


<syntaxhighlight lang="glsl">
<syntaxhighlight lang="glsl">
Line 240: Line 38:
}
}
</syntaxhighlight>
</syntaxhighlight>
Two things to remember (both explained in the [[FXPack Shader Reference]]): a slider is a <code>float</code> uniform with exactly six underscores whose name encodes label/range/default, and texture coordinates arrive in pixels, not 0..1.


<div class="noprint">
<div class="noprint">
Line 287: Line 87:


Because an <code>.fxpack</code> is just a ZIP, you can inspect or fork any of the 130+ bundled effects: copy one, rename to <code>.zip</code>, unzip, edit the <code>.mxf</code>, re-zip. The bundled <code>ag_*</code> effects are an excellent library of worked examples.
Because an <code>.fxpack</code> is just a ZIP, you can inspect or fork any of the 130+ bundled effects: copy one, rename to <code>.zip</code>, unzip, edit the <code>.mxf</code>, re-zip. The bundled <code>ag_*</code> effects are an excellent library of worked examples.
<div class="noprint">
==Rules and gotchas==
</div>
* Interface uniforms are matched by name, so '''spelling and underscore count matter'''. A slider needs exactly 6 underscores; a color picker exactly 7; a live value exactly 2.
* Labels are single tokens — no spaces or underscores inside <code>&lt;Label&gt;</code>.
* Encode decimals with <code>x</code> and negatives with a leading <code>n</code>. <code>-0.5</code> → <code>n0x5</code>.
* '''Do not''' declare the same interface uniform in two stages of one effect (e.g. <code>mxw_millis_mxw</code> in both the vertex and fragment shader). Declare it in one stage and pass the value on — this is also faster.
* Commented-out uniforms are ignored (comments are stripped before scanning), so you can safely park declarations behind <code>//</code> or <code>/* */</code>.
* Texture coordinates are in '''pixels''', not 0..1 — normalise with <code>mxw_reciprocalU/V_mxw</code> and un-normalise before every <code>texture2D</code> lookup.
* Target <code>#version 120</code> for portability.


<div class="noprint">
<div class="noprint">
Line 349: Line 138:
* If the effect fails to load, MXWendler logs the reason (unknown uniform, wrong underscore count, missing aux texture). Paste that message back to Claude and ask it to fix it.
* If the effect fails to load, MXWendler logs the reason (unknown uniform, wrong underscore count, missing aux texture). Paste that message back to Claude and ask it to fix it.
* To evolve a look, keep the conversation going: ''"add a Speed slider 0..5 default 1"'', ''"make the edges wrap instead of clamp"'', ''"tint the result with a color picker"''. Because the rules stay in context, Claude keeps emitting valid interface uniforms.
* To evolve a look, keep the conversation going: ''"add a Speed slider 0..5 default 1"'', ''"make the edges wrap instead of clamp"'', ''"tint the result with a color picker"''. Because the rules stay in context, Claude keeps emitting valid interface uniforms.
* For temporal effects (trails, motion blur, feedback) tell Claude it may also request past frames with <code>uniform sampler2D mxw_tex_minus_N_mxw;</code> (N = frames back) — see [[#Input textures (samplers)|Input textures]].
* For temporal effects (trails, motion blur, feedback) tell Claude it may also request past frames with <code>uniform sampler2D mxw_tex_minus_N_mxw;</code> (N = frames back) — see [[FXPack Shader Reference#Input textures (samplers)|Input textures]].
* Ask for an inline comment on each slider so the resulting shader stays self-documenting.
* Ask for an inline comment on each slider so the resulting shader stays self-documenting.


Line 355: Line 144:
Because every bundled effect is a plain ZIP, you can point [https://www.anthropic.com/claude-code Claude Code] (or any agent) at the <code>effects/</code> folder and ask it to unzip an existing <code>ag_*</code> effect, study the <code>.mxf</code>, and generate a variation — a fast way to build a family of related looks from a proven starting point.
Because every bundled effect is a plain ZIP, you can point [https://www.anthropic.com/claude-code Claude Code] (or any agent) at the <code>effects/</code> folder and ask it to unzip an existing <code>ag_*</code> effect, study the <code>.mxf</code>, and generate a variation — a fast way to build a family of related looks from a proven starting point.


'''Tip:''' always give the shader a quick visual check in Preload Preview before using it on the Render Output. Claude gets the interface and the maths right the vast majority of the time, but only your eyes can confirm the ''look''.
Tip: always give the shader a quick visual check in Preload Preview before using it on the Render Output. Claude gets the interface and the maths right the vast majority of the time, but only your eyes can confirm the ''look''.
 


[[Category:Effects]]
[[Category:Effects]]
[[Category:Reference]]

Latest revision as of 16:31, 8 August 2026

Template:TOCright This is a task-oriented guide to writing your own MXWendler effect as an FXPack shader — from a minimal shader to packaging and installing, including how to have Claude write one for you. For the exact naming rules and the full uniform tables, see the companion page FXPack Shader Reference.

See also: Effects · Tutorial Coupling Video with Effects and Audio Signals

An FXPack is a plain ZIP archive (extension .fxpack) holding one or more GLSL shader stages plus any auxiliary textures. Drop it into MXWendler's effects/ folder and it becomes a new effect in Preload Preview, the Live Editor and on the Render Output — no recompilation needed. The shader is the plugin.

MXWendler feeds your shader live values and builds UI sliders/color pickers from specially-named uniforms (mxw_..._mxw). This guide shows the workflow; the FXPack Shader Reference lists every available uniform.

A minimal fragment shader

The smallest useful effect — a brightness knob that fades to the original via a Master slider:

#version 120

// input frame
uniform sampler2D mxw_tex_plus_0_mxw;

// dry/wet
uniform float mxw_vertslider_Master_0x0_1x0_1x0_mxw;

// user control: brightness 0..2, default 1
uniform float mxw_vertslider_Brightness_0x0_2x0_1x0_mxw;

void main(void)
{
    vec2 tc  = gl_TexCoord[0].xy;               // pixel coordinates
    vec4 src = texture2D(mxw_tex_plus_0_mxw, tc);

    vec4 processed = vec4(src.rgb * mxw_vertslider_Brightness_0x0_2x0_1x0_mxw, src.a);

    gl_FragColor = mix(src, processed, mxw_vertslider_Master_0x0_1x0_1x0_mxw);
}

Two things to remember (both explained in the FXPack Shader Reference): a slider is a float uniform with exactly six underscores whose name encodes label/range/default, and texture coordinates arrive in pixels, not 0..1.

Worked example: a time-animated distortion

This annotated version of the stock ag_Sine effect shows the coordinate helpers, a user slider and the Master mix working together:

#version 120

uniform sampler2D mxw_tex_plus_0_mxw;                          // current frame
uniform float     mxw_vertslider_Master_0x0_1x0_1x0_mxw;       // dry/wet
uniform float     mxw_vertslider_Resolution_0x1_10x0_0x5_mxw;  // user knob

uniform float mxw_reciprocalU_mxw;
uniform float mxw_reciprocalV_mxw;
uniform float mxw_maxU_mxw;
uniform float mxw_maxV_mxw;

vec2 normalizedTc(vec2 tc)   { return tc * vec2(mxw_reciprocalU_mxw, mxw_reciprocalV_mxw); }
vec2 unNormalizedTc(vec2 tc) { return tc * vec2(mxw_maxU_mxw, mxw_maxV_mxw); }

void main(void)
{
    vec2 tc = normalizedTc(gl_TexCoord[0].xy);   // -> 0..1
    tc = tc * 2.0 - 1.0;                         // -> -1..1

    vec2 xy = abs(tc) * mxw_vertslider_Resolution_0x1_10x0_0x5_mxw;
    vec2 val = fract(vec2(xy.x + sin(xy.y), xy.y + sin(xy.x)));

    vec4 processed = texture2D(mxw_tex_plus_0_mxw, unNormalizedTc(val));

    gl_FragColor = mix(texture2D(mxw_tex_plus_0_mxw, gl_TexCoord[0].xy),
                       processed,
                       mxw_vertslider_Master_0x0_1x0_1x0_mxw);
}

Packaging and installing

  1. Put your shader(s) in an effects/ folder and any images in a textures/ folder.
  2. Add a readme.txt describing what the effect does.
  3. ZIP those folders together (the folders must be at the root of the archive).
  4. Rename the resulting archive to YourEffectName.fxpack.
  5. Copy it into MXWendler's effects/ directory. It appears in the effect list on next start.

Because an .fxpack is just a ZIP, you can inspect or fork any of the 130+ bundled effects: copy one, rename to .zip, unzip, edit the .mxf, re-zip. The bundled ag_* effects are an excellent library of worked examples.

Writing a shader with Claude

Large-language-model assistants such as Claude are very good at GLSL, and the FXPack interface is simple enough that Claude can write a complete, working effect in one go — provided you give it the MXWendler-specific rules, which it cannot know on its own. The trick is to paste the interface contract into the prompt, then describe the look you want.

A ready-to-use prompt

Copy this block into Claude, fill in the last line, and it will produce a valid .mxf:

You are writing a fragment shader for MXWendler's FXPack effect format. Follow these rules exactly:

- Target GLSL "#version 120".
- The current video frame is a sampler2D declared as:
      uniform sampler2D mxw_tex_plus_0_mxw;
- Texture coordinates from gl_TexCoord[0].xy are in PIXELS (0..width, 0..height), NOT 0..1,
  because the frame is a rectangle texture. Convert with these engine uniforms/helpers:
      uniform float mxw_reciprocalU_mxw; // 1/width
      uniform float mxw_reciprocalV_mxw; // 1/height
      uniform float mxw_maxU_mxw;        // width
      uniform float mxw_maxV_mxw;        // height
      vec2 normalizedTc(vec2 tc)   { return tc * vec2(mxw_reciprocalU_mxw, mxw_reciprocalV_mxw); } // ->0..1
      vec2 unNormalizedTc(vec2 tc) { return tc * vec2(mxw_maxU_mxw, mxw_maxV_mxw); }               // ->pixels
  Always pass PIXEL coordinates to texture2D().
- Animate with time in milliseconds:  uniform float mxw_millis_mxw;
- Expose user controls as sliders. A slider is a float uniform with EXACTLY 6 underscores:
      uniform float mxw_vertslider_<Label>_<lo>_<hi>_<default>_mxw;
  <Label> is a single CamelCase token (no spaces/underscores). Numbers encode '.' as 'x'
  and a leading 'n' for negative:  0.5 -> 0x5,  100.0 -> 100x0,  -0.5 -> n0x5.
- Optional RGBA color picker = vec4 with EXACTLY 7 underscores:
      uniform vec4 mxw_colorcontrol_<Label>_<r>_<g>_<b>_<a>_mxw;
- Always include a Master dry/wet slider and cross-fade to the original at the end:
      uniform float mxw_vertslider_Master_0x0_1x0_1x0_mxw;
      gl_FragColor = mix(texture2D(mxw_tex_plus_0_mxw, gl_TexCoord[0].xy), processed,
                         mxw_vertslider_Master_0x0_1x0_1x0_mxw);
- Do not use any uniforms other than the ones above and your own private ones.
- Output nothing but the shader code.

Now write the effect: <DESCRIBE THE LOOK YOU WANT, e.g. "a horizontal chromatic-aberration
glitch whose strength pulses with time, with a Strength slider 0..20 default 5">

Turning Claude's output into an FXPack

  1. Save Claude's code as effects/MyEffect.mxf.
  2. Optionally add textures/ images and a readme.txt.
  3. ZIP the folders and rename to MyEffect.fxpack (see Packaging and installing).
  4. Drop it into MXWendler's effects/ folder and restart.

Iterating

  • If the effect fails to load, MXWendler logs the reason (unknown uniform, wrong underscore count, missing aux texture). Paste that message back to Claude and ask it to fix it.
  • To evolve a look, keep the conversation going: "add a Speed slider 0..5 default 1", "make the edges wrap instead of clamp", "tint the result with a color picker". Because the rules stay in context, Claude keeps emitting valid interface uniforms.
  • For temporal effects (trails, motion blur, feedback) tell Claude it may also request past frames with uniform sampler2D mxw_tex_minus_N_mxw; (N = frames back) — see Input textures.
  • Ask for an inline comment on each slider so the resulting shader stays self-documenting.

Using Claude Code on the effect library

Because every bundled effect is a plain ZIP, you can point Claude Code (or any agent) at the effects/ folder and ask it to unzip an existing ag_* effect, study the .mxf, and generate a variation — a fast way to build a family of related looks from a proven starting point.

Tip: always give the shader a quick visual check in Preload Preview before using it on the Render Output. Claude gets the interface and the maths right the vast majority of the time, but only your eyes can confirm the look.