Scott Le Grand you wrote this more than a decade ago on AA. I have - TopicsExpress



          

Scott Le Grand you wrote this more than a decade ago on AA. I have a Jag programming tips and tricks collection I want to add it to. But from the context of the thread and the post I am not sure if its a Blitter optimization suggestion for drawing triangles or if its an optimization suggestion for Blitter emulation on the PC. Sounds like a blitter optimization trick but I want to be sure: *************************** heres an immediate optimization to recover actual triangles (and even textures) from single scanline blitter commands. When you issue the first blitter command, save the left and right starting positions. Do the same when you issue the last blitter command. Every time the increment from one scanline to the next changes in magnitude, sign, or both, save that vertex too. Voila, youve just recovered an intact polygon from a bunch of individual commands. Now triangulate the sucker and send it to the 3D hardware of your choice (there are some minor complications that could arise here, but get 99% of the polygons working before worrying about this). If youre texture mapping, note the source pointer to the texture in memory, and its width, and round its height off to the nearest power of 2 that contains all the texture coordinates of the vertices you just collected. Now create a texture and fill it with all that data: converting it to RGB while youre at it. Now hash that textures source pointer and width, save the height, and now you can recognize it quickly on the next and all subsequent frames. The only trick now is to make sure those textures stay current by setting page faults whenever their memory range is touched in order to alert one to refresh that texture from jaguar memory the next time its used. If youre not texture mapping, well then just grab the CRY colors from the vertices and convert them directly to RGB and off ya go. Isnt it fun to mess with the mind of old code and hardware? ******************* Any insight you could give me on this would be great.
Posted on: Mon, 17 Nov 2014 22:11:18 +0000

Trending Topics



Recently Viewed Topics




© 2015