<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mxwendler.net/index.php?action=history&amp;feed=atom&amp;title=Writing_FXPack_Shaders</id>
	<title>Writing FXPack Shaders - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mxwendler.net/index.php?action=history&amp;feed=atom&amp;title=Writing_FXPack_Shaders"/>
	<link rel="alternate" type="text/html" href="https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;action=history"/>
	<updated>2026-08-09T09:11:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;diff=6126&amp;oldid=prev</id>
		<title>Admin: Split into howto + reference; move tables to FXPack Shader Reference; no inline bold (bot)</title>
		<link rel="alternate" type="text/html" href="https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;diff=6126&amp;oldid=prev"/>
		<updated>2026-08-08T14:31:19Z</updated>

		<summary type="html">&lt;p&gt;Split into howto + reference; move tables to FXPack Shader Reference; no inline bold (bot)&lt;/p&gt;
&lt;a href=&quot;https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;amp;diff=6126&amp;amp;oldid=6124&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;diff=6124&amp;oldid=prev</id>
		<title>Admin: Add section: writing a shader with Claude (bot)</title>
		<link rel="alternate" type="text/html" href="https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;diff=6124&amp;oldid=prev"/>
		<updated>2026-08-08T13:23:38Z</updated>

		<summary type="html">&lt;p&gt;Add section: writing a shader with Claude (bot)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:23, 8 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l298&quot;&gt;Line 298:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 298:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Texture coordinates are in &amp;#039;&amp;#039;&amp;#039;pixels&amp;#039;&amp;#039;&amp;#039;, not 0..1 — normalise with &amp;lt;code&amp;gt;mxw_reciprocalU/V_mxw&amp;lt;/code&amp;gt; and un-normalise before every &amp;lt;code&amp;gt;texture2D&amp;lt;/code&amp;gt; lookup.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Texture coordinates are in &amp;#039;&amp;#039;&amp;#039;pixels&amp;#039;&amp;#039;&amp;#039;, not 0..1 — normalise with &amp;lt;code&amp;gt;mxw_reciprocalU/V_mxw&amp;lt;/code&amp;gt; and un-normalise before every &amp;lt;code&amp;gt;texture2D&amp;lt;/code&amp;gt; lookup.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Target &amp;lt;code&amp;gt;#version 120&amp;lt;/code&amp;gt; for portability.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Target &amp;lt;code&amp;gt;#version 120&amp;lt;/code&amp;gt; for portability.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;div class=&quot;noprint&quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Writing a shader with Claude==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Large-language-model assistants such as [https://claude.ai Claude] are very good at GLSL, and the FXPack interface is simple enough that Claude can write a complete, working effect in one go — &#039;&#039;provided you give it the MXWendler-specific rules&#039;&#039;, which it cannot know on its own. The trick is to paste the interface contract into the prompt, then describe the look you want.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===A ready-to-use prompt===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Copy this block into Claude, fill in the last line, and it will produce a valid &amp;lt;code&amp;gt;.mxf&amp;lt;/code&amp;gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;You are writing a fragment shader for MXWendler&#039;s FXPack effect format. Follow these rules exactly:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Target GLSL &quot;#version 120&quot;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- The current video frame is a sampler2D declared as:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform sampler2D mxw_tex_plus_0_mxw;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Texture coordinates from gl_TexCoord[0].xy are in PIXELS (0..width, 0..height), NOT 0..1,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  because the frame is a rectangle texture. Convert with these engine uniforms/helpers:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform float mxw_reciprocalU_mxw; // 1/width&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform float mxw_reciprocalV_mxw; // 1/height&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform float mxw_maxU_mxw;        // width&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform float mxw_maxV_mxw;        // height&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      vec2 normalizedTc(vec2 tc)   { return tc * vec2(mxw_reciprocalU_mxw, mxw_reciprocalV_mxw); } // -&amp;gt;0..1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      vec2 unNormalizedTc(vec2 tc) { return tc * vec2(mxw_maxU_mxw, mxw_maxV_mxw); }               // -&amp;gt;pixels&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  Always pass PIXEL coordinates to texture2D().&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Animate with time in milliseconds:  uniform float mxw_millis_mxw;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Expose user controls as sliders. A slider is a float uniform with EXACTLY 6 underscores:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform float mxw_vertslider_&amp;lt;Label&amp;gt;_&amp;lt;lo&amp;gt;_&amp;lt;hi&amp;gt;_&amp;lt;default&amp;gt;_mxw;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &amp;lt;Label&amp;gt; is a single CamelCase token (no spaces/underscores). Numbers encode &#039;.&#039; as &#039;x&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  and a leading &#039;n&#039; for negative:  0.5 -&amp;gt; 0x5,  100.0 -&amp;gt; 100x0,  -0.5 -&amp;gt; n0x5.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Optional RGBA color picker = vec4 with EXACTLY 7 underscores:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform vec4 mxw_colorcontrol_&amp;lt;Label&amp;gt;_&amp;lt;r&amp;gt;_&amp;lt;g&amp;gt;_&amp;lt;b&amp;gt;_&amp;lt;a&amp;gt;_mxw;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Always include a Master dry/wet slider and cross-fade to the original at the end:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      uniform float mxw_vertslider_Master_0x0_1x0_1x0_mxw;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;      gl_FragColor = mix(texture2D(mxw_tex_plus_0_mxw, gl_TexCoord[0].xy), processed,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                         mxw_vertslider_Master_0x0_1x0_1x0_mxw);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Do not use any uniforms other than the ones above and your own private ones.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- Output nothing but the shader code.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Now write the effect: &amp;lt;DESCRIBE THE LOOK YOU WANT, e.g. &quot;a horizontal chromatic-aberration&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;glitch whose strength pulses with time, with a Strength slider 0..20 default 5&quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Turning Claude&#039;s output into an FXPack===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Save Claude&#039;s code as &amp;lt;code&amp;gt;effects/MyEffect.mxf&amp;lt;/code&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Optionally add &amp;lt;code&amp;gt;textures/&amp;lt;/code&amp;gt; images and a &amp;lt;code&amp;gt;readme.txt&amp;lt;/code&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# ZIP the folders and rename to &amp;lt;code&amp;gt;MyEffect.fxpack&amp;lt;/code&amp;gt; (see [[#Packaging and installing|Packaging and installing]]).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Drop it into MXWendler&#039;s &amp;lt;code&amp;gt;effects/&amp;lt;/code&amp;gt; folder and restart.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Iterating===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* 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.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* To evolve a look, keep the conversation going: &#039;&#039;&quot;add a Speed slider 0..5 default 1&quot;&#039;&#039;, &#039;&#039;&quot;make the edges wrap instead of clamp&quot;&#039;&#039;, &#039;&#039;&quot;tint the result with a color picker&quot;&#039;&#039;. Because the rules stay in context, Claude keeps emitting valid interface uniforms.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* For temporal effects (trails, motion blur, feedback) tell Claude it may also request past frames with &amp;lt;code&amp;gt;uniform sampler2D mxw_tex_minus_N_mxw;&amp;lt;/code&amp;gt; (N = frames back) — see [[#Input textures (samplers)|Input textures]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Ask for an inline comment on each slider so the resulting shader stays self-documenting.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Using Claude Code on the effect library===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Because every bundled effect is a plain ZIP, you can point [https://www.anthropic.com/claude-code Claude Code] (or any agent) at the &amp;lt;code&amp;gt;effects/&amp;lt;/code&amp;gt; folder and ask it to unzip an existing &amp;lt;code&amp;gt;ag_*&amp;lt;/code&amp;gt; effect, study the &amp;lt;code&amp;gt;.mxf&amp;lt;/code&amp;gt;, and generate a variation — a fast way to build a family of related looks from a proven starting point.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;Tip:&#039;&#039;&#039; 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 &#039;&#039;look&#039;&#039;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Effects]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Effects]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Reference]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Reference]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;diff=6122&amp;oldid=prev</id>
		<title>Admin: Create developer guide: how to write FXPack shaders (bot)</title>
		<link rel="alternate" type="text/html" href="https://wiki.mxwendler.net/index.php?title=Writing_FXPack_Shaders&amp;diff=6122&amp;oldid=prev"/>
		<updated>2026-08-08T13:12:27Z</updated>

		<summary type="html">&lt;p&gt;Create developer guide: how to write FXPack shaders (bot)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Introduction==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;FXPack&amp;#039;&amp;#039;&amp;#039; is MXWendler&amp;#039;s shader-effect container format. It is a plain ZIP archive with the extension &amp;lt;code&amp;gt;.fxpack&amp;lt;/code&amp;gt; that bundles one or more GLSL shader stages together with any auxiliary textures and a readme. Dropping an &amp;lt;code&amp;gt;.fxpack&amp;lt;/code&amp;gt; file into the &amp;lt;code&amp;gt;effects/&amp;lt;/code&amp;gt; folder makes a new effect available in Preload Preview, the Live Editor and on the Render Output — no recompilation of MXWendler is required.&lt;br /&gt;
&lt;br /&gt;
The clever part of the format is the &amp;#039;&amp;#039;&amp;#039;interface&amp;#039;&amp;#039;&amp;#039;: MXWendler scans your shader source for specially-named &amp;lt;code&amp;gt;uniform&amp;lt;/code&amp;gt; declarations. Uniforms whose names start with &amp;lt;code&amp;gt;mxw_&amp;lt;/code&amp;gt; and end with &amp;lt;code&amp;gt;_mxw&amp;lt;/code&amp;gt; are recognised automatically and are either fed a live engine value every frame (time, resolution, input frames …) or turned into a &amp;#039;&amp;#039;&amp;#039;UI control&amp;#039;&amp;#039;&amp;#039; (a slider or a color picker) that the operator can automate. You never write any C++ or edit MXWendler itself — the shader &amp;#039;&amp;#039;is&amp;#039;&amp;#039; the plugin.&lt;br /&gt;
&lt;br /&gt;
This page documents that interface exactly as the loader implements it (see &amp;lt;code&amp;gt;mxw_effect.cpp&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mxw_effectbase::setSource()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
See also: [[Effects]] · [[Tutorial Coupling Video with Effects and Audio Signals]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Package structure==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An &amp;lt;code&amp;gt;.fxpack&amp;lt;/code&amp;gt; is a ZIP file with this internal layout:&lt;br /&gt;
&lt;br /&gt;
 MyEffect.fxpack            (a ZIP archive)&lt;br /&gt;
 ├── effects/&lt;br /&gt;
 │     └── MyEffect.mxf     ← fragment shader (required)&lt;br /&gt;
 │     └── MyEffect.mxv     ← vertex shader        (optional)&lt;br /&gt;
 │     └── MyEffect.mxg     ← geometry shader      (optional)&lt;br /&gt;
 │     └── MyEffect.mxtc    ← tessellation control (optional)&lt;br /&gt;
 │     └── MyEffect.mxte    ← tessellation eval    (optional)&lt;br /&gt;
 ├── textures/&lt;br /&gt;
 │     └── myLookup.bmp     ← auxiliary textures   (optional)&lt;br /&gt;
 └── readme.txt             ← human description    (recommended)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The effect &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039; shown in the MXWendler UI is taken from the &amp;lt;code&amp;gt;.fxpack&amp;lt;/code&amp;gt; file name, not from the file inside.&lt;br /&gt;
* Inside &amp;lt;code&amp;gt;effects/&amp;lt;/code&amp;gt; the loader picks the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; file matching each stage extension, so the base name is free — but matching it to the pack name keeps things tidy.&lt;br /&gt;
* At most &amp;#039;&amp;#039;&amp;#039;one file per shader stage&amp;#039;&amp;#039;&amp;#039;. A minimal effect is just a single &amp;lt;code&amp;gt;.mxf&amp;lt;/code&amp;gt; fragment shader.&lt;br /&gt;
* Auxiliary textures live in a &amp;lt;code&amp;gt;textures/&amp;lt;/code&amp;gt; sub-folder and are wired up through sampler uniforms (see [[#Auxiliary textures|Auxiliary textures]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Shader stages and file extensions==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Each GLSL pipeline stage is a separate file, identified by extension:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Extension !! Stage !! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;.mxv&amp;lt;/code&amp;gt; || Vertex shader || no&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;.mxf&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;Fragment shader&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;yes&amp;#039;&amp;#039;&amp;#039; (the workhorse)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;.mxg&amp;lt;/code&amp;gt; || Geometry shader || no&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;.mxtc&amp;lt;/code&amp;gt; || Tessellation control shader || no&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;.mxte&amp;lt;/code&amp;gt; || Tessellation evaluation shader || no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Most effects are pure image processing and only need the fragment shader. If a tessellation stage is present, MXWendler switches the geometry to &amp;lt;code&amp;gt;GL_PATCHES&amp;lt;/code&amp;gt; automatically.&lt;br /&gt;
&lt;br /&gt;
Target GLSL version is &amp;#039;&amp;#039;&amp;#039;120&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;#version 120&amp;lt;/code&amp;gt;) for maximum cross-platform / macOS compatibility. Higher versions work on desktop GL but may be skipped on older macOS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==The interface: mxw_..._mxw uniforms==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
The loader tokenises your source, strips comments, and inspects every &amp;lt;code&amp;gt;uniform&amp;lt;/code&amp;gt; declaration. A uniform participates in the MXWendler interface only if its name &amp;#039;&amp;#039;&amp;#039;starts with &amp;lt;code&amp;gt;mxw_&amp;lt;/code&amp;gt; and contains &amp;lt;code&amp;gt;_mxw&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;. Everything else is a normal private uniform you set yourself inside the shader.&lt;br /&gt;
&lt;br /&gt;
Which kind of interface a uniform becomes is decided by its GLSL &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039; and by how many underscores its name contains:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! Underscore count !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;sampler2D&amp;lt;/code&amp;gt; || – || Input texture (video frame, feedback, or aux image)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; || 2 || A live engine value (time, resolution …)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; || 6 || A &amp;#039;&amp;#039;&amp;#039;slider&amp;#039;&amp;#039;&amp;#039; UI control&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;vec4&amp;lt;/code&amp;gt; || 7 || A &amp;#039;&amp;#039;&amp;#039;color picker&amp;#039;&amp;#039;&amp;#039; UI control&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Number encoding&lt;br /&gt;
Because GLSL identifiers cannot contain &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;, numeric values baked into uniform names are encoded:&lt;br /&gt;
* &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; stands for the decimal point → &amp;lt;code&amp;gt;0x5&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;100x0&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
* a leading &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; means negative → &amp;lt;code&amp;gt;n0x5&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;-0.5&amp;lt;/code&amp;gt; (slider ranges only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Live engine values (global uniforms)==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Declare a &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; uniform named &amp;lt;code&amp;gt;mxw_&amp;lt;value&amp;gt;_mxw&amp;lt;/code&amp;gt; and MXWendler updates it every frame:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Uniform !! Value supplied each frame&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_millis_mxw&amp;lt;/code&amp;gt; || Wall-clock time in milliseconds — use for animation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_maxU_mxw&amp;lt;/code&amp;gt; || Input texture width in pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_maxV_mxw&amp;lt;/code&amp;gt; || Input texture height in pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_reciprocalU_mxw&amp;lt;/code&amp;gt; || 1 / width (multiply texcoords by this to normalise to 0..1)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_reciprocalV_mxw&amp;lt;/code&amp;gt; || 1 / height&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_viewportsizeX_mxw&amp;lt;/code&amp;gt; || Render viewport width in pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_viewportsizeY_mxw&amp;lt;/code&amp;gt; || Render viewport height in pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_footagesizeX_mxw&amp;lt;/code&amp;gt; || Source footage width in pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_footagesizeY_mxw&amp;lt;/code&amp;gt; || Source footage height in pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_footageframelength_mxw&amp;lt;/code&amp;gt; || Number of frames in the source footage&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_framenumber_mxw&amp;lt;/code&amp;gt; || Current footage frame number&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_framecounterenvironment_mxw&amp;lt;/code&amp;gt; || Global engine frame counter&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_outputLuminance1x1_mxw&amp;lt;/code&amp;gt; || Average luminance of the output (1×1 reduction)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Declaring an unknown &amp;lt;code&amp;gt;mxw_..._mxw&amp;lt;/code&amp;gt; float with two underscores is an error and the shader will fail to load.&lt;br /&gt;
&lt;br /&gt;
;Coordinate system — important&lt;br /&gt;
MXWendler binds video frames as &amp;#039;&amp;#039;&amp;#039;rectangle textures&amp;#039;&amp;#039;&amp;#039;, so &amp;lt;code&amp;gt;gl_TexCoord[0].xy&amp;lt;/code&amp;gt; arrives in &amp;#039;&amp;#039;&amp;#039;pixels&amp;#039;&amp;#039;&amp;#039; (0…width, 0…height), &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; normalised 0…1. Use the reciprocal/max uniforms to convert. The standard helpers used throughout the stock effects are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
uniform float mxw_reciprocalU_mxw;&lt;br /&gt;
uniform float mxw_reciprocalV_mxw;&lt;br /&gt;
uniform float mxw_maxU_mxw;&lt;br /&gt;
uniform float mxw_maxV_mxw;&lt;br /&gt;
&lt;br /&gt;
// pixel coords -&amp;gt; 0..1&lt;br /&gt;
vec2 normalizedTc(vec2 tc) {&lt;br /&gt;
    return tc * vec2(mxw_reciprocalU_mxw, mxw_reciprocalV_mxw);&lt;br /&gt;
}&lt;br /&gt;
// 0..1 -&amp;gt; pixel coords (needed before texture2D lookups)&lt;br /&gt;
vec2 unNormalizedTc(vec2 tc) {&lt;br /&gt;
    return tc * vec2(mxw_maxU_mxw, mxw_maxV_mxw);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Input textures (samplers)==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Video input arrives through &amp;lt;code&amp;gt;sampler2D&amp;lt;/code&amp;gt; uniforms. The name selects &amp;#039;&amp;#039;which&amp;#039;&amp;#039; frame:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Uniform pattern !! Delivers&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_tex_plus_0_mxw&amp;lt;/code&amp;gt; || The &amp;#039;&amp;#039;&amp;#039;current&amp;#039;&amp;#039;&amp;#039; input frame (the normal case)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_tex_plus_N_mxw&amp;lt;/code&amp;gt; || The frame N steps in the &amp;#039;&amp;#039;&amp;#039;future&amp;#039;&amp;#039;&amp;#039; (look-ahead)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_tex_minus_N_mxw&amp;lt;/code&amp;gt; || The frame N steps in the &amp;#039;&amp;#039;&amp;#039;past&amp;#039;&amp;#039;&amp;#039; — enables trails / motion blur / temporal feedback&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_tex_render_prefinalfx_minus_N_mxw&amp;lt;/code&amp;gt; || Feedback of the render output (before final FX), N frames back&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mxw_accum_buffer_N_mxw&amp;lt;/code&amp;gt; || Multi-Render-Target accumulation buffer N (advanced ping-pong)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sample any of them with &amp;lt;code&amp;gt;texture2D(sampler, pixelCoords)&amp;lt;/code&amp;gt; where the coordinates are in &amp;#039;&amp;#039;pixels&amp;#039;&amp;#039; (use &amp;lt;code&amp;gt;unNormalizedTc()&amp;lt;/code&amp;gt; if you computed a 0..1 coordinate). Requesting past/future frames (&amp;lt;code&amp;gt;minus&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;plus&amp;lt;/code&amp;gt; with N&amp;amp;gt;0) tells the engine to keep a rolling history of frames for this effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==UI controls==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
===Sliders===&lt;br /&gt;
A &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; uniform with &amp;#039;&amp;#039;&amp;#039;six&amp;#039;&amp;#039;&amp;#039; underscores becomes an operator-facing, automatable slider:&lt;br /&gt;
&lt;br /&gt;
 uniform float mxw_vertslider_&amp;lt;Label&amp;gt;_&amp;lt;lo&amp;gt;_&amp;lt;hi&amp;gt;_&amp;lt;default&amp;gt;_mxw;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;vertslider&amp;lt;/code&amp;gt; — the widget type (currently the only slider type)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;Label&amp;amp;gt;&amp;lt;/code&amp;gt; — a &amp;#039;&amp;#039;&amp;#039;single-token&amp;#039;&amp;#039;&amp;#039; name shown in the UI (no spaces/underscores; use CamelCase)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;lo&amp;amp;gt; &amp;amp;lt;hi&amp;amp;gt;&amp;lt;/code&amp;gt; — slider range (encoded numbers, may be negative with &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt;default&amp;amp;gt;&amp;lt;/code&amp;gt; — start value&lt;br /&gt;
&lt;br /&gt;
Example — a &amp;quot;Resolution&amp;quot; knob from 0.1 to 10.0 starting at 0.5:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
uniform float mxw_vertslider_Resolution_0x1_10x0_0x5_mxw;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;The Master convention&lt;br /&gt;
By convention almost every stock effect exposes a &amp;#039;&amp;#039;&amp;#039;Master&amp;#039;&amp;#039;&amp;#039; 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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
uniform float mxw_vertslider_Master_0x0_1x0_1x0_mxw;&lt;br /&gt;
...&lt;br /&gt;
gl_FragColor = mix(&lt;br /&gt;
    texture2D(mxw_tex_plus_0_mxw, gl_TexCoord[0].xy),  // original&lt;br /&gt;
    processedColor,                                    // your result&lt;br /&gt;
    mxw_vertslider_Master_0x0_1x0_1x0_mxw);            // dry/wet&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following this convention is strongly recommended — it makes your effect behave like the built-ins.&lt;br /&gt;
&lt;br /&gt;
===Color pickers===&lt;br /&gt;
A &amp;lt;code&amp;gt;vec4&amp;lt;/code&amp;gt; uniform with &amp;#039;&amp;#039;&amp;#039;seven&amp;#039;&amp;#039;&amp;#039; underscores becomes a color picker (RGBA):&lt;br /&gt;
&lt;br /&gt;
 uniform vec4 mxw_colorcontrol_&amp;lt;Label&amp;gt;_&amp;lt;r&amp;gt;_&amp;lt;g&amp;gt;_&amp;lt;b&amp;gt;_&amp;lt;a&amp;gt;_mxw;&lt;br /&gt;
&lt;br /&gt;
Each component is an encoded number in 0…1. Example — a tint control defaulting to opaque dark blue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
uniform vec4 mxw_colorcontrol_Tint_0x0_0x1_0x25_1x0_mxw;  // rgba = (0.0, 0.1, 0.25, 1.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Auxiliary textures==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
To ship a fixed lookup image (gradient, mask, logo, LUT strip …) with your effect, place the file in the &amp;lt;code&amp;gt;textures/&amp;lt;/code&amp;gt; folder of the ZIP and reference it with a sampler whose name encodes the file name. The &amp;#039;&amp;#039;&amp;#039;last&amp;#039;&amp;#039;&amp;#039; underscore before &amp;lt;code&amp;gt;_mxw&amp;lt;/code&amp;gt; separates the extension:&lt;br /&gt;
&lt;br /&gt;
 textures/myGradient.bmp   ⇄   uniform sampler2D mxw_tex_myGradient_bmp_mxw;&lt;br /&gt;
 textures/mixred.bmp       ⇄   uniform sampler2D mxw_tex_mixred_bmp_mxw;&lt;br /&gt;
&lt;br /&gt;
Rules:&lt;br /&gt;
* Pattern: &amp;lt;code&amp;gt;mxw_tex_&amp;amp;lt;basename&amp;amp;gt;_&amp;amp;lt;ext&amp;amp;gt;_mxw&amp;lt;/code&amp;gt; maps to &amp;lt;code&amp;gt;textures/&amp;amp;lt;basename&amp;amp;gt;.&amp;amp;lt;ext&amp;amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The base name must &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; start with &amp;lt;code&amp;gt;plus&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;minus&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;render&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;accum&amp;lt;/code&amp;gt; — those prefixes are reserved for the frame samplers above.&lt;br /&gt;
* A missing texture file makes the effect fail to load.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==A minimal fragment shader==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
The smallest useful effect — a brightness knob that fades to the original via Master:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
#version 120&lt;br /&gt;
&lt;br /&gt;
// input frame&lt;br /&gt;
uniform sampler2D mxw_tex_plus_0_mxw;&lt;br /&gt;
&lt;br /&gt;
// dry/wet&lt;br /&gt;
uniform float mxw_vertslider_Master_0x0_1x0_1x0_mxw;&lt;br /&gt;
&lt;br /&gt;
// user control: brightness 0..2, default 1&lt;br /&gt;
uniform float mxw_vertslider_Brightness_0x0_2x0_1x0_mxw;&lt;br /&gt;
&lt;br /&gt;
void main(void)&lt;br /&gt;
{&lt;br /&gt;
    vec2 tc  = gl_TexCoord[0].xy;               // pixel coordinates&lt;br /&gt;
    vec4 src = texture2D(mxw_tex_plus_0_mxw, tc);&lt;br /&gt;
&lt;br /&gt;
    vec4 processed = vec4(src.rgb * mxw_vertslider_Brightness_0x0_2x0_1x0_mxw, src.a);&lt;br /&gt;
&lt;br /&gt;
    gl_FragColor = mix(src, processed, mxw_vertslider_Master_0x0_1x0_1x0_mxw);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Worked example: a time-animated distortion==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
This annotated version of the stock &amp;#039;&amp;#039;ag_Sine&amp;#039;&amp;#039; effect shows the coordinate helpers, a user slider and the Master mix working together:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;glsl&amp;quot;&amp;gt;&lt;br /&gt;
#version 120&lt;br /&gt;
&lt;br /&gt;
uniform sampler2D mxw_tex_plus_0_mxw;                          // current frame&lt;br /&gt;
uniform float     mxw_vertslider_Master_0x0_1x0_1x0_mxw;       // dry/wet&lt;br /&gt;
uniform float     mxw_vertslider_Resolution_0x1_10x0_0x5_mxw;  // user knob&lt;br /&gt;
&lt;br /&gt;
uniform float mxw_reciprocalU_mxw;&lt;br /&gt;
uniform float mxw_reciprocalV_mxw;&lt;br /&gt;
uniform float mxw_maxU_mxw;&lt;br /&gt;
uniform float mxw_maxV_mxw;&lt;br /&gt;
&lt;br /&gt;
vec2 normalizedTc(vec2 tc)   { return tc * vec2(mxw_reciprocalU_mxw, mxw_reciprocalV_mxw); }&lt;br /&gt;
vec2 unNormalizedTc(vec2 tc) { return tc * vec2(mxw_maxU_mxw, mxw_maxV_mxw); }&lt;br /&gt;
&lt;br /&gt;
void main(void)&lt;br /&gt;
{&lt;br /&gt;
    vec2 tc = normalizedTc(gl_TexCoord[0].xy);   // -&amp;gt; 0..1&lt;br /&gt;
    tc = tc * 2.0 - 1.0;                         // -&amp;gt; -1..1&lt;br /&gt;
&lt;br /&gt;
    vec2 xy = abs(tc) * mxw_vertslider_Resolution_0x1_10x0_0x5_mxw;&lt;br /&gt;
    vec2 val = fract(vec2(xy.x + sin(xy.y), xy.y + sin(xy.x)));&lt;br /&gt;
&lt;br /&gt;
    vec4 processed = texture2D(mxw_tex_plus_0_mxw, unNormalizedTc(val));&lt;br /&gt;
&lt;br /&gt;
    gl_FragColor = mix(texture2D(mxw_tex_plus_0_mxw, gl_TexCoord[0].xy),&lt;br /&gt;
                       processed,&lt;br /&gt;
                       mxw_vertslider_Master_0x0_1x0_1x0_mxw);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Packaging and installing==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
# Put your shader(s) in an &amp;lt;code&amp;gt;effects/&amp;lt;/code&amp;gt; folder and any images in a &amp;lt;code&amp;gt;textures/&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
# Add a &amp;lt;code&amp;gt;readme.txt&amp;lt;/code&amp;gt; describing what the effect does.&lt;br /&gt;
# ZIP those folders together (the folders must be at the root of the archive).&lt;br /&gt;
# Rename the resulting archive to &amp;lt;code&amp;gt;YourEffectName.fxpack&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Copy it into MXWendler&amp;#039;s &amp;lt;code&amp;gt;effects/&amp;lt;/code&amp;gt; directory. It appears in the effect list on next start.&lt;br /&gt;
&lt;br /&gt;
Because an &amp;lt;code&amp;gt;.fxpack&amp;lt;/code&amp;gt; is just a ZIP, you can inspect or fork any of the 130+ bundled effects: copy one, rename to &amp;lt;code&amp;gt;.zip&amp;lt;/code&amp;gt;, unzip, edit the &amp;lt;code&amp;gt;.mxf&amp;lt;/code&amp;gt;, re-zip. The bundled &amp;lt;code&amp;gt;ag_*&amp;lt;/code&amp;gt; effects are an excellent library of worked examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;&lt;br /&gt;
==Rules and gotchas==&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* Interface uniforms are matched by name, so &amp;#039;&amp;#039;&amp;#039;spelling and underscore count matter&amp;#039;&amp;#039;&amp;#039;. A slider needs exactly 6 underscores; a color picker exactly 7; a live value exactly 2.&lt;br /&gt;
* Labels are single tokens — no spaces or underscores inside &amp;lt;code&amp;gt;&amp;amp;lt;Label&amp;amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Encode decimals with &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; and negatives with a leading &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;-0.5&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;n0x5&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Do not&amp;#039;&amp;#039;&amp;#039; declare the same interface uniform in two stages of one effect (e.g. &amp;lt;code&amp;gt;mxw_millis_mxw&amp;lt;/code&amp;gt; in both the vertex and fragment shader). Declare it in one stage and pass the value on — this is also faster.&lt;br /&gt;
* Commented-out uniforms are ignored (comments are stripped before scanning), so you can safely park declarations behind &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/* */&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Texture coordinates are in &amp;#039;&amp;#039;&amp;#039;pixels&amp;#039;&amp;#039;&amp;#039;, not 0..1 — normalise with &amp;lt;code&amp;gt;mxw_reciprocalU/V_mxw&amp;lt;/code&amp;gt; and un-normalise before every &amp;lt;code&amp;gt;texture2D&amp;lt;/code&amp;gt; lookup.&lt;br /&gt;
* Target &amp;lt;code&amp;gt;#version 120&amp;lt;/code&amp;gt; for portability.&lt;br /&gt;
&lt;br /&gt;
[[Category:Effects]]&lt;br /&gt;
[[Category:Reference]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>