3D Lingo Dictionary > E-K > flat |
![]() ![]() ![]() |
flat
Syntax
member(whichCastmember
).shader(whichShader
).flat member(whichCastmember
).model(whichModel
).shader.flat member(whichCastmember
).model(whichModel
).shaderList{[index
]}.flat
Description
3D #standard
shader property; indicates whether the mesh should be rendered with flat shading (TRUE
) or gouraud shading (FALSE
).
Flat shading uses one color per face of the mesh. The color used for the face is the color of its first vertex. Flat shading is faster than gouraud shading.
Gouraud shading assigns a color to each vertex of a face and interpolates the colors across the face in a gradient. Gouraud shading requires more time and calculation, but creates a smoother surface.
The default value for this property is FALSE
.
Example
This statement sets the flat
property of the shader named Wall to TRUE
. The mesh of a model that uses this shader will be rendered with one color per face.
member("MysteryWorld").shader("Wall").flat = TRUE
See also
mesh (property)
, colors
, vertices
, generateNormals()
![]() ![]() ![]() |