#include <revolution/gx.h> void GXSetZScaleOffset( f32 scale, f32 offset );
scale |
specifies scale value for Z adjustment |
|---|---|
| offset | specifies offset value for Z adjustment |
None.
This function sets scale and offset values that are applied to the depth value of each pixel before it is written into the Z buffer. The Z modification function is:
Zs' = Zs * scale + offset;
where Zs is the result value in screen-space after model-view, projection and viewport transformations.
This function internally adjusts the viewport setting to realize these scaling/offsetting. With this function, you can easily modify depth priorities for each primitive without changing the entire viewport.
The viewport depth parameters are normalized coordinates from 0.0f to 1.0f, thus the offset value should be defined in the same manner.
2006/03/01 Initial version.
CONFIDENTIAL