User Guide

701
useDiffuseWithTexture
Syntax
member(whichCastmember).shader(whichShader).useDiffuseWithTexture
Description
3D standard shader property; allows you to get or set whether the diffuse color is used to
modulate the texture (TRUE) or not (FALSE).
When set to
TRUE, this property works in conjunction with the blendFunction and
blendConstant properties: when blendFunction is set to #blend, the diffuse color is weighed
with the texture color to determine the final color. For example, if
blendFunction is set to
#blend, and
blendConstant is set to 100.0, the final color is the pure texture color. If we change
blendConstant to 0.0, the final color is the diffuse color. If we change blendConstant to 10.0,
the final color is 10% texture color, and 90% diffuse color.
The default value for this property is
FALSE.
All shaders have access to the
#standard shader properties; in addition to these standard shader
properties shaders of the types #engraver, #newsprint, and #painter have properties unique to
their type. For more information, see
newShader.
Example
In this example, the shaderList of the model MysteryBox contains six shaders. Each shader has
a texture list which contains up to eight textures. The
diffuseColor property of the cast member
(Level2) is set to rgb(255, 0, 0). The
blendFunction property of all six shaders is set to #blend,
and the blendConstant property of all six shaders is set to 80. This statement sets the
useDiffuseWithTexture property of all shaders used by MysteryBox to TRUE. A little bit of
red will be blended into the surface of the model. This property is affected by the settings of the
blendFunction, blendFunction
List
, blendSource, blendSourceList, blendConstant, and blendConstant
List
properties.
member("Level2").model("MysteryBox").shaderlist.useDiffuseWith\
Texture = TRUE
See also
blendFunction, blendConstant
useFastQuads
Syntax
the useFastQuads
Description
Global property; when set to TRUE, Director uses a faster, less precise method for calculating quad
operations. Fast quads calculations are good for simple rotation and skew sprite effects. The
slower, default quad calculation method available in Director provides more visually pleasing
results when using quads for distortion and other arbitrary effects. Defaults to
FALSE.
Simple sprite rotation and skew operations always use the fast quad calculation method, regardless
of this setting. Setting
the useFastQuads to TRUE will not result in an increase in the speed of
these simple operations.