660
Chapter 14: Properties
blendFunction
Usage
member(
whichCastmember
).shader(
whichShader
).blendFunction
member(
whichCastmember
).model(
whichModel
).shader.blendFunction
member(
whichCastmember
).model(
whichModel
).shaderList{[
index
]}.\
blendFunction
Description
3D
#standard
shader property; indicates the type of blending used by 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
blendFunctionList
property to control blending in those texture layers.
The
blendFunction
property can have the following values:
#multiply
multiplies the RGB values of the texture layer by the color being used for blending
(see above).
#add
adds the RGB values of the texture layer to the color being used for blending, and then
clamps to 255.
#replace
prevents the texture from being blended with the color set by the shader’s
diffuse
property.
#blend
combines the colors of the texture layer with the color being used for blending in the ratio
set by the
blendConstant
property.
The default value of this property is
#multiply
.
Example
In this example, the shader list of the model named MysteryBox contains six shaders. This
statement sets the
blendFunction
property of the second shader to
#blend
. This enables the
settings of the
blendSource
,
blendSource
List,
blendConstant
, and
blendConstantList
properties.
member("Level2").model("MysteryBox").shaderList[2].\
blendFunction = #blend
See also
blendConstant
,
blendConstantList
,
blendFunctionList
,
blendSource
,
blendSourceList
,
useDiffuseWithTexture
,
diffuse
,
diffuseColor
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...