Restrictions of PlayStation 2 RenderWare Graphics
[Restrictions]
In this section we describe the restrictions of PlayStation2
RenderWare Graphics.
RenderWare Graphics is not thread-safe and nor is the heap
which is uses. It is possible (though by no means trivial, and
currently not supported) to perform file loading asynchronously
with loading screens if the loading screens are displayed using
non-RenderWare code.
The RenderWare Graphics VSYNC interrupt routine modifies the
display environment registers to switch the displayed frame buffer.
If user code wishes to update these registers it should do so when
it knows that no flips are pending or with interrupts
disabled.
rwplcore.h contains METROWERKS-specific optimization pragmas.
These are used when building the RenderWare Graphics libraries, as
they produce quick code. If you are using conflicting optimization
pragmas in your application define RWSUPPRESSOPTIMIZATIONPRAGMAS
before including rwplcore.h (or rwcore.h). The
enumsalwaysinton pragma is necessary and should
not be removed (to avoid clashes between structure sizes in the
libraries and the app).
The scratchpad is used by RenderWare Graphics during the
memory-intensive process of the creation of DMA packets to send to
the VIF1 and the GIF. The rule is that, from RwCameraClear or RwCameraBeginUpdate (which ever
comes first), RenderWare will start using the scratchpad. It may
continue to do so until RwCameraShowRaster has been called.
RenderWare does not attempt to save and restore the contents of the
scratchpad, and just assumes that it has full access to it, thus
any data present may be overwritten.
The VU0 vector processor is used by RenderWare Graphics in
certain situations, so it is important that you arrange your usage
of VU0 to avoid conflicts. For further details, see Potential conflicts in VU0
usage.
There is only 4MB of RAM available to the GS rasterization
chip. This memory must be shared between textures, framebuffers and
a z-buffer. A texture cache is implemented such that if all
textures currently in use will fit into this RAM at the same time
then no texture uploads need occur during rendering.
Interlaced video modes with half-height buffers (see rwVIDEOMODEINTERLACE
and rwVIDEOMODEFFINTERLACE) can be
used to create the appearance of a full-height image. This uses
less GS RAM than full-height buffers. The drawbacks to this are
that fast-moving objects may exhibit 'comb-like' visual artefacts
and that the application must render consistently above 60Hz. If
the application drops below 60Hz then the apparent resolution of
the displayed image will halve. This is usually very
noticeable.
The alpha-blending modes available to the GS rasterization chip
are non-standard. See PlayStation 2 alpha-blending modes
for further details.
The fill-rate of the GS rasterizer may be seriously adversely
affected in many situations. See PlayStation 2 fill-rate
considerations for further details. Back-face culling will
reduce fill-rate (typically to about half) at the expense of a
small increase in VU1 processing time. When performing clipping
back-face culling will tend to decrease VU1 processing time.
Avoid tiling textures too much. Large UV ranges in polygons
decrease fillrate (it can be faster to tesselate polygons) and
eventually decrease the accuracy of UVs (causing texture 'swimming'
on polygons in high perspective). The hardware is such that it is
better to tile from -4 to +4 than from 0 to +8.
RpMipmapKL is a
RwTexture plugin
which is necessary to achieve good trilinear texture filtering. The
GS hardware does not calculate texel coverage (the ratio of texel
size to pixel size within a projected triangle) so a mipmap Level
Of Detail (LOD) bias 'K' needs to be set on a per texture basis.
Another value 'L', denoting the slope of the texture with respect
to the camera's view direction, may also be specified on a
per-texture basis. See RpMipmapKL Plugin
Overview for further details.
Palettized texture rasters (both 4 and 8 bit) are held in a
PlayStation 2-specific format which facilitates optimization of
their upload to the GS and shrinks their footprint in GS RAM. When
rasters of this type are locked, their pixels are rearranged into
the standard "flat" format for easy access. When rasters are
unlocked, their pixels are rearranged back into the native format.
This means that locking and unlocking such rasters is likely to be
very slow. Note also that palettes are not reverted to a
standard format when a raster is locked.
The rwFOGTYPEEXPONENTIAL and
rwFOGTYPEEXPONENTIAL2 fog types are not supported on
PlayStation 2. Additionally, fog color does not contain an alpha
value (any passed in to RwRenderStateSet will be
ignored).
The PlayStation 2 skinning pipelines have a limit of 64
matrices that can be used during rendering. Models requiring more
than this limit need to be 'split'. See RpSkin Plugin Overview for
more details.