OAM Software Sprite Rendering Module Overview

# OAM Software Sprite Rendering Module

## Description

This module provides a feature which allows simple rendering of OAMs using a software sprite.

## Advantages to OAM Software Sprite Rendering

Using the OAM Manager for software sprite display has the following advantages.

### Same Usage as OAM

There is an API which can obtain the 2D graphics engine OAM as an argument, making it possible render using the software sprite without having to involve the NITRO 3D graphics engine.

### Avoid OAM Limits

It is possible to avoid limits such as the maximum display number and the greater than 2x maximum display limit.

### Fast Rendering with UV Parameter Caching

The OAM software sprite rendering module usually interprets the OAM attributes for each rendering and calculates the UV parameters. The OAM software sprite rendering module caches this UV parameter to avoid recalculations, which allows for a fast rendering feature.

## Cautions for OAM Software Sprite Rendering

The OAM software sprite rendering module is designed so that even when using the software sprite it can be used in the same manner as the 2D graphics engine OAM. However, due to the differences in hardware features between the 2D and 3D graphics engines, complete compatibility is not possible.

### Differences in Character Data

The format and placement location of character data for OBJ with the 2D graphics engine, and texture data used by the software sprite differs. Therefore, character data for the software sprite separate from the character data for OBJ is required.

### Differences in Affine Matrix Scale

The affine matrix scale used in the 2D graphics engine OBJ carries out a different interpretation from that of the affine matrix scale used with the software sprite (polygon). The matrix set up to magnify two times (zoom in) with the OBJ reduces by one half (zooms out) with the software sprite.

### Mosaic Feature

The mosaic feature can be set to ON and OFF in OBJ units with the OBJ of the 2D graphics engine. However, with the software sprite the mosaic feature can only be set to ON and OFF for the entire software sprite.

### Priority with BG

The priority with BG can be set in OBJ units with the OBJ of the 2D graphics engine. However, with the software sprite the priority can only be specified for the entire software sprite.

### Correction of Texture Sampling Position when Using the Flip Feature

The OAM software sprite rendering module can register the UV value correction function. The texture sampling position for the NITRO 3D graphics engine is fixed for the LCD pixel direction. Therefore, the sampling position will not be correct if the UV increasing direction differs from the pixel direction. OBJ rendering that used the flip feature with the OAM software sprite rendering module can be reproduced by inverting the UV value. Inverting the UV value reverses the UV increasing direction so the UV value needs to be corrected. The UV value increasing direction is different from the pixel direction when using affine conversion as well so correction processing is required. Since it was assumed that the calculation load for correction would be high in such cases, it was determined that it is more realistic to fix this problem on the material side — a method of correction is not supported by G2D.

## See Also

None.

## Revision History

12/06/2004 Initial version.