gDPSetRenderMode
Sets the rendering mode of the blender (BL)
Syntax
#include <ultra64.h> /* gbi.h */
gDPSetRenderMode( Gfx *gdl, u32 mode1, u32 mode2 )
gsDPSetRenderMode( u32 mode1, u32 mode2 )
Arguments
Description
Sets the rendering modes of the BL. The BL can render a variety of Z-buffered, anti-aliased primitives. Although N64 supports Z-buffer anti-aliasing, you still need to be careful about the order of rendering with regards to surface and rendering mode. For example, all opaque polygons must be drawn before translucent (semi-transparent) polygons.
List of Rendering Modes
(AA_: Antialiasing, RA_: Simple antialiasing (not as pretty as AA, but somewhat faster), ZB_: Z-buffering)
Rendering type |
G_RM_ [ AA_ | RA_ ] [ ZB_ ] OPA_SURF
|
G_RM_ [ AA ] [ _ZB_ ] XLU_SURF
|
G_RM_ [ ZB_ | AA_ZB_ | RA_ZB_ ] OPA_DECAL
|
G_RM_ [ ZB_ | AA_ZB_ ] XLU_DECAL
|
G_RM_ [ AA_ZB_ | RA_ZB_ ] OPA_INTER
|
G_RM_AA_ZB_XLU_INTER
|
G_RM_AA_ [ ZB_ ] XLU_LINE
|
G_RM_AA_ [ ZB_ ] DEC_LINE
|
G_RM_AA_ [ ZB_ ] TEX_EDGE
Enables conversion within a single pixel to be turned ON/OFF for texture alpha-outlined objects. When normal texture filtering is used, the edge appears blurry. |
G_RM_AA_ZB_TEX_INTER
|
G_RM_AA_ [ ZB_] SUB_SURF
|
G_RM_ [ AA_ ] [ ZB_ ] PCL_SURF
|
G_RM_AA_ [ ZB_ ] OPA_TERR
|
G_RM_AA_ [ ZB_ ] TEX_TERR
|
G_RM_AA_ [ ZB_ ] SUB_TERR
|
G_RM_ [ ZB_ ] CLD_SURF
|
G_RM_ZB_OVL_SURF
|
G_RM_ADD
|
Fog type |
G_RM_FOG_SHADE_A
|
G_RM_FOG_PRIM_A
|
Pass type |
G_RM_PASS
|
No operation type |
G_RM_NOOP
|
A decal surface is a surface that is applied on top of another surface. For example, it can be used to place a surface on an airplane wing. In this case, a pixel is only written when the Z value of the pixel in the frame buffer is the same as the Z value of the pixel being drawn.
An interpenetrating surface is a surface that penetrates and is penetrated by another surface. For intersecting objects, only the first of the two interpenetrating surfaces needs to be set in G_RM_ [ AA_ZB_ | RA_ZB_ ] OPA_INTER or G_RM_ [ AA_ZB_ | RA_ZB_ ] XLU_INTER mode. However, if the second surface is also set, then antialiasing is performed on the portion that intersects.
Opaque lines are supported by setting the alpha value to 1.0.
Decal lines are applied on top of surfaces in the same way as decal surfaces.
For details, see to Section 12.7 "BL - Blender" and Section 15.7 "Blender Modes and Assumptions" in the N64 Programming Manual.
Note
In texture edge mode, if dithering is enabled when you zoom in on, say, a tree object that is extremely close to the viewpoint, then the dither pattern near the edges cannot be filtered. If this phenomenon occurs, it can be worked around with the following kinds of settings:
|
Depth cannot be represented accurately when viewing decal surfaces (surfaces on the same plane) from the perpendicular. This problem can be worked around in the following ways:
|
Although simple antialiasing (RA_) mode is somewhat faster than antialiasing (AA_) mode, the results are not as good. In particular, the lines of internal edges (the junctions between polygons) will appear blurry when texture maps incorporating high-frequency components are used. This kind of problem can be worked around in the following ways:
|
See Also
gDPSetCombineMode, gDPSetCycleType, gDPSetFogColor, gSPSetGeometryMode
Revision History
02/01/99 Completely rewritten