Shader Txt_Rfr_AnimBm (Legacy)
- Last UpdatedApr 02, 2025
- 2 minute read
The Txt_Rfr_AnimBm shader has the following characteristics.
|
Txt |
Textured |
|
Rfr_AnimBm |
Screen Refraction with Animated Bump Distortion |
Explanation
The shader mixes the Texture texture with the refraction. This is calculated in realtime and "out of phase" following the normals of the szAnimatedTextureForBump multiplied by fBumpiness.
Code example
This is an example of Txt_Rfr_AnimBm shader.
$Shader
{
szName = Txt_Rfr_AnimBm
fRefractivity = 0.75
fBumpiness = 0.2
szAnimatedTextureForBump = _Example_AnimBump
}
Input Data
Texture
-
Material ® DiffuseMap
-
UV Channel 1
Bump Texture
-
UV Channel 2
-
UV for the animated bump texture (szAnimatedTextureForBump).
Parameters
bObjectSpace
-
Explicitly indicates whether this mesh will be exported to Object Space or World Space, regardless of export parameters.
-
If this parameter is not present, the export parameters will be used, otherwise they will be overridden by this value.
-
Default: The export parameters are used.
-
Range: True / False.
fTransparency
-
Transparency level of the mesh.
-
Default: 0.0
-
Range: [0..1] (1 = completely transparent)
bDoubleFace
-
Duplicate the faces by flipping the verse.
-
Default: False.
-
Range: True / False.
szAnimatedTexture
-
Indicates that the texture will be animated using the specified Animated Texture ID.
-
Default: Null.
szAnimatedTextureForBump
-
Indicates the Animated Texture ID that will be used for the bump effect. Through this animated texture, it is possible to vary the refraction effect.
-
The offset value in X and Y is given by the intensity of the Red component of the texture, so it is possible to obtain a gradient offset if the pixel value is not [0,1] but [0..1].
fRefractivity
-
Level of refraction of the material.
-
Using a value of zero (0) does not disable the effect; the shader works the same way, so there is no performance gain.
-
Default: 1.0
Range: [0..1] (1 = completely reflective)
fBumpiness
-
Value of "phase shift" of the reflection.
-
A value of 0.15 may be sufficient.
-
Default: 0.0
-
Range: [0..1]
fTextureSize
-
The texture size used for refraction. This value is relative to the size of the back buffer.
-
Default: 1.0 (1 = identical size to the back buffer)
-
Range: [0..1]