Re: Trying to understand the VERA FX Polygon Tutorial
Posted: Tue Jun 04, 2024 1:02 pm
You can leave the calculations in C and just make the double loop that "pumps" the data into the VERA data ports assembly and you will see it run nearly as fast as pure assembly.cosmicr wrote: ↑Mon Jun 03, 2024 12:08 am Thanks - you don't need to illustrate. I get what the top point is lol. I want to understand the implementation. I understand everything about coordinates, triangles, pixels, VERA, rasterisation, slopes etc. I do not need an explanation of anything about triangles or the maths involved. Like I said I've already written several polygon rasterisers of my own. I know how the polygon helper works.
The part I was struggling with is the implementation - ie the code. I don't think it's entirely clear. Maybe it just needs better formatting.
It doesn't matter. I've spent some more time on it and I understand it all now and have it working. Thanks for your help!
edit: I forgot to include the screenshot! Here's an animated gif - this is running in C, but it should be a bit faster in assembly. The slope calculation and actual filling loop uses heaps of cycles. I'll probably use this in my Another World port.
quads.gif