Make "plasma_tunnel.elf" work.
Posted on 2005-10-24 00:00:00
Fixed the STQ texture coordinates problem. Apparently, S and T were to be divided by Q to give "normal" texture coordinates.


Screenshot #000039


I've been trying to find out how to accomodate both high and low z values in the z-buffer. The projection matrix set by glOrtho didn't help much, so I crafted my own projection matrix that won't touch the z value given to glVertex. But it all comes down to a precision problem... The z values I need to give to OpenGL must be in the range of [-1, 1] and the z values I receive from the GS are in the range of [0, 0xFFFFFFFF]. Very small numbers divided by 0x7FFFFFFF don't give much and maybe they get rounded somehow and get assimilated to 0. Well, for now "CubeMastah" is broken. I'll investigate a bit more and try to find a viable solution.

I've thought a lot about the recompiler and came to the conclusion that I'll need to improve its design really soon. I haven't come up with another idea yet, so I'll keep thinking about it.

After I find a solution for the z buffering problem, I'll be able to move to another demo.