RenderWare V2.1

Previous Page Index Next Page

RwBool

RwSetDepthCueType(RwDepthCueType type)

Description

Specifies the type of depth cueing that will be used. Depth cueing is always applied from the depth cue distance to the far clipping plane. The rate at which the depth cueing is applied is determined by this function.

Arguments

type The depth cue type.

Comments

Not all depth cueing types are available on all devices. The software renderers only support rwLINEAR.

The color of the output pixel (P) is derived from the input pixel (p) and the depth cue color (d) as follows.

P = (1-f)p + fd

The depth cue factor (f) is derived from the distance from the camera (x) as follows:
n = depth cue distance and c = far clipping plane distance

(x < n) f ==0.0;

(x > c) f==1.0

for (n < x < c), f depends on the depth cue type as follows:

Define the normalized distance (s) from n to c as follows

s = (x -n)/(c -n)

• rwLINEAR f =s

• rwEXPONENTIAL f =2-2/2s

• rwEXPONENTIALSQUARED f =2-2/2s*2

See Also

RwCreateDepthCueColor()

RwCreateDepthCueColorStruct()

RwDestroyDepthCueColor()

RwSetDepthCueColor()

RwGetDepthCueDistance()

RwSetDepthCueDistance()

RwGetDepthCueType()