Shader Vc_Sp_Lit
- Last UpdatedApr 02, 2025
- 2 minute read
The Vc_Sp_Lit shader has the following characteristics.
|
Vc |
Vertex Colored |
|
Sp |
Specular |
|
Lit |
Dynamically Lit |
Explanation
-
Applies lighting in real time to the object and multiplies it by the vertex color, then adds specular.
-
Supports two lights, which are managed as omnidirectional without range.
Colors
-
ColorD = Vertex Color * (AmbientColor + NLuci (diffuse_term * DiffuseColor * LightColor))
-
ColorS = NLuci (specular * LightColor)
-
Final color = ColorD + ColorS
Code example for one light
This is an example of Vc_Txt_Em_Fr shader with one light.
$Shader
{
szName = Vc_Sp_Lit
szLight = Omni001
}
Code example for two lights
This is an example of Vc_Txt_Em_Fr shader with two lights.
$Shader
{
szName = Vc_Sp_Lit
szLight = Omni_Rossa
szLight = Omni_X
}
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.
Ambient Color
-
Material ® AmbientColor
Diffuse Color
-
Material ® DiffuseColor
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.
Light Color
-
Light ® Color
-
Color for every light
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.
szLight
-
Name of the light that will illuminate the object. If not specified, the result will be unpredictable.