Shader Vc_Txt_Sp_Dxw
- Last UpdatedApr 02, 2025
- 2 minute read
The Vc_Txt_Sp_Dxw shader has the following characteristics.
|
Vc |
Vertex Colored |
|
Txt |
Textured |
|
Sp |
Specular |
|
Dxw |
DXWater |
Explanation
-
Multiplies the Texture for Vertex Color and N.L illumination using water normals.
-
Adds the specular.
-
Uses the normal map to calculate lighting and to disrupt the texture.
-
Supports only one light, which is managed as omnidirectional without range.
-
If the reflection is activated, it disturbs the reflection and blends it with the original texture, then adds specular.
Notes
-
Even if the water is an animated texture (szWaterTextureID), you can still use another animated texture for the surface (szAnimatedTexture).
-
The quantity of polygons in the mesh affects only the calculation on the lights and consequently the application of the specular. It does not affect the processing or the quality of the water.
Code example
This is an example of Vc_Txt_Sp_Dxw shader.
$Shader
{
szName = Vc_Txt_Sp_Dxw
szLight = Omni001
szWaterTextureID = Water01
fBumpiness = 0.3
}
Input Data
Vertex Color
-
If there is a valid Radiosity solution on this object, the vertex color is taken from the solution.
-
If a Radiosity solution is not present or invalid, or if the bWireframe parameter is active, the vertex color is taken from the properties of the mesh. Therefore, the vertex color will be the color of the mesh.
Texture
-
Material ® DiffuseMap
-
UV Channel 1
Water Texture Coords
-
UV Channel 2.
-
Map coordinates of the water normal map.
-
Useful to give two different tiles; one to the texture and one to the bump texture.
Specular Color
-
Material ® SpecularColor
Specular Intensity
-
Material ® SpecularHilights ® SpecularLevel
-
Increases the intensity and the size of the highlight.
Specular Glossiness
-
Material ® SpecularHilights ® Glossiness
-
Increasing this value increases the "shininess" of the object, so there will be a narrower highlight.
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.
szWaterTextureID
-
ID of the animated texture used as normal water map. See DXWater Animated Texture.
fBumpiness
-
Value of "phase shift" of the reflection.
-
A value of 0.15 may be sufficient.
-
Default: 0.0
-
Range: [0..1]
szLight
-
Name of the light that will illuminate the object. If not specified, the result will be unpredictable.
fReflectivity
Level of reflectance of the material.
-
Default: -1.0 (reflectance off)
-
Range: -1, [0..1] (1 = completely reflective)
szReflectionTexture
-
ID of the ReflectionTexture to use if the fReflectivity parameter is active.
-
Default: Null.