User Guide

658 Chapter 14: Properties
blendConstant
Usage
member(whichCastmember).shader(whichShader).blendConstant
member(whichCastmember).model(whichModel).shader.blendConstant
member(whichCastmember).model(whichModel).shaderList{[index]}.\
blendConstant
Description
3D #standard shader property; indicates the blending ratio used for the first texture layer of
the shader.
If the shaders
useDiffuseWithTexture property is set to TRUE, the texture blends with the
color set by the shaders
diffuse property. If useDiffuseWithTexture is FALSE, white is used
for blending.
Each of the other texture layers blends with the texture layer below it. Use the
blendConstantList property to control blending in those texture layers.
The
blendConstant property works only when the shaders blendSource property is set to
#constant. For more information, see blendSource and blendSourceList.
The range of this property is 0 to 100; the default is 50.
Example
In this example, the shader list of the model named MysteryBox contains six shaders. This
statement sets the
blendConstant property of the second shader to 20. This property is affected
by the settings of the
blendFunction, blendFunctionList, blendSource, and
blendSourceList properties.
member("Level2").model("MysteryBox").shaderList[2].\
blendConstant = 20
See also
blendConstantList, blendFunction, blendFunctionList, blendSource,
blendSourceList, useDiffuseWithTexture, diffuse, diffuseColor
blendConstantList
Usage
member(whichCastmember).shader(whichShader).blendConstantList
member(whichCastmember).model(whichModel).shader.blendConstant\
List{[index]}
member(whichCastmember).model(whichModel).shaderList{[index]}.\
blendConstantList{[index]}
Description
3D #standard shader property; indicates the ratio used for blending a texture layer of the shader
with the texture layer below it.
The shaders texture list and the blend constant list both have eight index positions. Each index
position in the blend constant list controls blending for the texture at the corresponding index
position in the texture list. You can set all index positions of the list to the same value at one time
by not specifying the optional
index parameter. Use the index parameter to set the list one index
position at a time.