3D Lingo Dictionary > A-B > blendConstant

 

blendConstant

Syntax

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 shader's useDiffuseWithTexture property is set to TRUE, the texture blends with the color set by the shader's 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 only works when the shader's blendSource property is set to #constant. See blendSource and blendSourceList for more information.

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