Hacker News new | ask | show | jobs
by qingcharles 1037 days ago
Huh. I never thought about this. One of the advantage of some of these emulators is being able to fix the perspective issue on the texture-mapping, but of course most 90s games were doing the texture-mapping in 2D and the 3D points had already been projected into screen space.

This isn't an easy problem to solve. I can't think of a way you could back figure the Z from the rendered data. The only other solution I can think of is to somehow break the models up into smaller polys as they are loaded into memory. If you break them up the individual triangles will be smaller and the lack of perspective won't show.

1 comments

There actually is a relatively simple, if hacky, way to accomplish this: the emulated GTE can push the Z coordinate (and optionally the full-precision X/Y coordinates) of each processed vertex into a private key-value store, using the rounded X/Y result returned to the game as a key. The emulated GPU can then look up the coordinates provided by the game - assuming they were passed as-is from the GTE, which is the case for the vast majority of games - in the same store to obtain the Z values.

This does not seem to be a new approach, as PC ports of PS1 games used similar tricks all the way back in 2000 [1].

[1] https://news.ycombinator.com/item?id=3581350 https://news.ycombinator.com/item?id=29493242