Float
XML File - Examples - Float (Clickteam Library)
Last edited 2026-04-05
The float parameter allows you to enter an float value into the shader.
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 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).
Example parametr #1:
The first example allows you to enter a variable called "coeff_float" which can be called in the shader. It is a 32-bit float number.
In the shader you should define this variable as float.
<parameter>
<name>Coeff</name>
<variable>coeff_float</variable>
<description>This variable does this...</description>
<type>float</type>
<property>edit</property>
<value>1.5</value>
<preview_value>2.75</preview_value>
</parameter>
Example parametr #2:
The second example allows you to enter a variable called "blend" that you can call in the shader. This is a 32-bit flooat number. However, in the properties window, it's limited to a range of -100.0 to 100.0, but you can still enter a value outside of this range when using the Event Editor.
In the shader you should define this variable as int.
<parameter>
<name>Blend</name>
<variable>blend</variable>
<description>This mode does this when...</description>
<type>float</type>
<property>slider</property>
<value>1.5</value>
<min>-100.0</min>
<max>100.0</max>
<preview_value>50.0</preview_value>
</parameter>
Example parametr #3:
The third example allows you to enter a variable called "test" that you can call in the shader. This is a 32-bit float number. However, in the properties window, it's limited to a range of 1.0 to 4.0, but you can still enter a value outside of this range when using the Event Editor.
In the shader you should define this variable as int.
<parameter>
<name>Test</name>
<variable>test</variable>
<description>This test variable does this...</description>
<type>float</type>
<property>spin</property>
<value>1.0</value>
<min>1.0</min>
<max>4.0</max>
<preview_value>2.0</preview_value>
<delta>0.5</delta>
</parameter>
Created with the Personal Edition of HelpNDoc: Streamline Your CHM Help File Creation with HelpNDoc