perspective correct texture example
   
Andrew Kieschnick <andrewk@austin.rr.com>

This code is mostly based on code by Marcus Comstedt or Dan Potter.

Notes:
The problem with perspective correct textures in previous 3d examples was that
the PVR seems to want -1/w, not z. This example has a modified version of 
Marcus's matrix.s where transform_coords takes a vector (x, y, z) and outputs
a vector (x, y, z, -1/w). These -1/w values go into vert.z, and that seems to
be all there is to it, except you may want or need to change the value of 
ta_state.zclip in hardware/ta.c - apparently it is actually the far -1/w 
clipping value, or something. The current value is probably too low.

Instructions:

This is a KOS userland program. If you extract it into your KOS userland/ directory, it should build with no trouble.

Once its running, press <START> to exit.

Files:

COPYING		the GPL
Makefile	a Makefile
README		you're reading it
check.h		a 64x64 checkerboard texture
matrix.*	Marcus's sh4 matrix stuff, modified a little bit by me
pct.c		some mix of Dan's / Marcus's / my code (not much of mine)
sincos.h	Marcus's sin and cos stuff
