Renderable::SetAmbientBlendState
Defined in:
Sets the ambient pass blend state.
C4Renderable.h
Prototype
void SetAmbientBlendState(uint32 state);
Parameters
state |
The new ambient pass blend state. |
Description
The SetAmbientBlendState
function sets the blending function used when an object is rendered in the ambient pass. The state
parameter encodes the blending factors and can be constructed using the BlendState
function. The first two parameters of the BlendState
function specify one of the following constants for the source blend factor and the destination blend factor, respectively.
kBlendZero |
Zero. |
kBlendOne |
One. |
kBlendSourceColor |
Source color. |
kBlendDestColor |
Destination color. |
kBlendSourceAlpha |
Source alpha. |
kBlendDestAlpha |
Destination alpha. |
kBlendInvSourceColor |
One minus source color. |
kBlendInvDestColor |
One minus destination color. |
kBlendInvSourceAlpha |
One minus source alpha. |
kBlendInvDestAlpha |
One minus destination alpha. |
BlendState(kBlendOne, kBlendZero)
returns the blend state corresponding to replacement of the destination color by the source color. BlendState(kBlendOne, kBlendOne)
adds the source color to the destination color.There are several predefined constants that can also be passed to the
state
parameter, listed below.
kBlendReplace |
Replace the destination color with the source color. |
kBlendAccumulate |
Add the source color to the destination color. |
kBlendModulate |
Multiply the destination color by the source color. |
kBlendInterpolate |
Interpolate between the source and destination colors using the source alpha. |
kBlendPremultInterp |
Add the source color to the destination color multiplied by the inverse source alpha. |
See Also