XML File
XML File (Clickteam Library)
Last edited 2026-04-05
The .XML file is used to link effect/shader files to Clickteam Fusion.
This file can contain basic information about who created the effect, what the effect does, its parameters, and so on.
All text should be in ASCII standard, i.e. special characters will not display correctly in Fusion, for example: ą, ę, ł, ó, ń, ż, ь, ф, э, any emoticons, etc.
Tag list for effect information:
|
Type |
Tag |
Description |
|
xml |
<name> |
This tag specifies the name your effect should be displayed under. Without this tag, the effect will display a filename ending in .FX, for example: ExampleShader.fx |
|
xml |
<description> |
This tag specifies what description should appear under your effect. It should include what the effect does. If you're using LLM descriptions, check for zero-width spaces and other inconsistencies. Don't assume LLM knows what it's talking about. |
|
xml |
<author> |
This tag displays who created the shader. Enter your name or nickname here. If your effect is partially based on someone else's work, you should also include credit for that person(s). |
|
xml |
<copyright> |
This tag identifies the author's copyright notice. |
|
xml |
<company> |
This tag displays information about the company. (If you're not in one, don't add this tag.) |
|
xml |
<website> |
This tag should contain information about your website; you can also insert a link to your GitHub here. (Optional but recommended) |
|
xml |
<email> |
This tag should contain a valid email address to contact the author. (Optional but recommended) |
|
xml |
<dx8> |
This tag should contain "yes" or "no" if your effect works under Direct3D 8 (the .FX file must be written in assembler). (You can also indicate that it supports by inserting "1", another number sets it as "no") It is not recommended to write the effect for D3D8 because it further limits the D3D9 effect, making it impossible to create advanced effects. |
|
xml |
<PSVersion> |
If your effect is running in D3D8, the "Ps" column doesn't display the required pixel shader. Set this tag to "1.1" if your effect uses ps.1.1, "1.2" if ps.1.2, etc., to display the information. If your effect doesn't run in D3D8, set it to "auto". |
|
xml |
<VSVersion> |
Similar to <PSVersion>, but there is no separate category for "Vs" (Vertex Shader) in the shader list. |
|
xml |
<BackgroundTexture> |
If your effect should use a background texture, set the tag to "1", otherwise set it to "0". |
|
xml |
<zbuffer> |
If your shader uses Z-Buffer (aka. "DEPTH", "VS_DEPTH"), set this to "1" so that the shader can use the buffer, otherwise set it to "0". (Currently only works for D3D9) |
|
xml |
<sourcecode> |
In this tag, you can place the entire D3D8/D3D9 code, so instead of having .XML and .FX files, you can have only the .XML file. Example:
|
Details for <BackgroundTexture>:
For Direct3D 8 (Windows):
When set to 0; Access to the self texture at index 0 and the white texture at index 1 to 15 is provided;
When set to 1; Access to the self texture at index 0, the white texture at index 1, and the background texture at index 2 to 15 is provided.
For Direct3D 9 and Direct3D 11 (Windows):
When set to 0, Register 0 is reserved for the self texture, each subsequent register is reserved for additional textures that can be imported from an .XML file.
When set to 1, Register 0 is reserved for the self texture, Register 1 is reserved for the background texture, each subsequent register is reserved for additional textures that can be imported from an .XML file.
For OpenGL ES (Android, iOS, macOS):
When set to 0; the texture named "imgTexture" is reserved for the self texture.
When set to 1; the texture named "imgTexture" is reserved for the self texture. The texture named "bckgTexture" is reserved for the background texture.
Tag list for parametrs:
|
Type |
Tag |
Description |
Value |
|
xml |
<parametr> |
This tag defines a new parameter that the shader allows to be modified. |
(None) |
|
xml |
<name> |
In this tag, it specifies the name of the parameter. |
(Any* Characters must be from the ASCII table) |
|
xml |
<code> |
||
|
xml |
<variable> |
Declaration of the variable name that you will refer to in the shader. |
|
|
xml |
<description> |
Description of what a given parameter does in the shader. |
|
|
xml |
<type> |
The type that your variable specifies |
int for Intergers or Flags; float for Floats; int_float4 for Colors; image for Texture; |
|
xml |
<property> |
This tag determines how data is entered into the variable. |
edit for entering a number like a textbox (only when <type> is int or float); spin for entering a number that you can add or subtract with the arrows (only when <type> is int or float); slider for a slider where you can change the number (only when <type> is int or float); checkbox for a bool variable, i.e. 0 or 1 (only when <type> is int); color for RGBA color variable (only when <type> is int_float4); image for texture variable (only when <type> is image); |
|
xml |
<value> |
The tag specifies what default value the parameter should have. |
32-bit number (only when <type> is int, float or int_float4); |
|
xml |
<preview_value> |
The tag sets a preview value only in the effects selection window. |
|
|
xml |
<min> |
Specifies the minimum value that can be set in the Properties window (this does not work when setting the value from the Event Editor); It also requires that the <property> tag be either slider or spin. |
32-bit number (only when <type> is int or float); |
|
xml |
<max> |
Specifies the maximum value that can be set in the Properties window (this does not work when setting the value from the Event Editor); It also requires that the <property> tag be either slider or spin. |
|
|
xml |
<delta> |
Specifies the step value when changing the value via arrows when <type> is float and <property> is spin. |
32-bit number (only when <type> is float); |
Details for the <type> tag:
int_float4 - integer value that contains 4 values between 0 and 255, used for RGBA color values. These values are transformed to a float4 variable, that contains 4 floating point values between 0 and 1 (1 corresponds to 255). This parameter type is generally used with the COLOR property type.
image - the value is the name of a graphic file in the Effects directory. This file is loaded when the user sets up the shader in the properties, and then the image is stored in the MFA file, the user can modify it with the Clickteam Fusion 2.5 picture editor. The IMAGE property type can be used only with the IMAGE variable type (and reciprocally).
Tag list for sampler:
For Direct3D 9 and Direct3D 11 it is possible to set how the sampler/texture should be rendered (antialiasing only, texture looping, etc.)
|
Type |
Tag |
Description |
Value |
|
xml |
<sampler> |
In this tag it declares the sampler settings for how the texture should be rendered |
(None) |
|
xml |
<index> |
In this tag, set the texture index value as you have it in the shader; 0 for Self texture; 1, 2, 3 for separate, etc. |
(Unsigned 32-Bit integer value) |
|
xml |
<filter> |
The tag specifies how pixels are to be interpolated between each other. |
point for Nearest-Point Sampling / Pixelated (only for Direct3D 9 and Direct3D 11); linear for Bilinear Filtering / Antialiasing (only for Direct3D 9 and Direct3D 11); anisotropic for Anisotropic Filtering (only for Direct3D 9); |
|
xml |
<addressU> |
This tag specifies how the graphics card should interpret U' (X axis for texCoord) which is outside the range of 0 to 1. |
clamp for stretched values outside the range 0 to 1; wrap for looping values outside the range 0 to 1; mirror for looping values outside the range 0 to 1 and mirroring; border for using the color from the <bordercolor> tag when the coordinate is outside the range of 0 to 1; |
|
xml |
<addressV> |
This tag specifies how the graphics card should interpret V' (Y axis for texCoord) which is outside the range of 0 to 1. |
|
|
xml |
<addressW> |
This tag specifies how the graphics card should interpret W' (Z axis for texCoord) which is outside the range of 0 to 1. |
|
|
xml |
<bordercolor> |
The color that will be used when texCoord goes outside the range of 0 to 1; |
(Unsigned 32-Bit integer value) Same rule as int_float4; |
Example code:
<effect>
<!-- Information about the effect: -->
<name>Template</name>
<description>This shader does...</description>
<author>Name / Nickname</author>
<company>My Company</company>
<copyright>Copyright @ 2026 My Company</copyright>
<website>www.example.com/i-love-foxes/</website>
<email>someone@somewhere.com</email>
<PSVersion>auto</PSVersion>
<VSVersion>auto</VSVersion>
<dx8>0</dx8>
<zbuffer>0</zbuffer>
<BackgroundTexture>0</BackgroundTexture>
<!-- Effect parametrs: -->
<parameter>
<name>Coeff</name>
<variable>coeff</variable>
<description>This variable does this...</description>
<type>float</type>
<property>edit</property>
<value>1.0</value>
<preview_value>2.0</preview_value>
</parameter>
<parameter>
<name>My checkbox!</name>
<variable>check</variable>
<description>This checkbox does this...</description>
<type>int</type>
<property>checkbox</property>
<value>0</value>
</parameter>
<!-- Sampler settings: -->
<sampler>
<index>0</index>
<filter>point</filter>
<addressU>wrap</addressU>
<addressV>wrap</addressV>
</sampler>
</effect>
Created with the Personal Edition of HelpNDoc: Add an Extra Layer of Security to Your PDFs with Encryption