I couldn't possibly take anymore. I'm too full.

posted in Perpetual Alpha
Published April 09, 2006
Advertisement


I have the tris being filled. I had a big problem with the edge calculation code that took me a while to figure out. I was using the bresenham line algo that I was using before to work out the edges of the tri. But it would locate more than one edge on each side of the tri on each scanline for lines of certain slopes. It took me a while to figure out what was going on there. Once I figured out that was the problem I wrote up a similar algo to the bresenham that would only ever have one pixel on each scanline and the system worked propperly.

I'm only rendering 2 of the faces of the cube there because, despite how it looks there isn't actually any sorting being done yet and if all 6 faces were being rendered it would just look like a crazy jumble of 4 sided polygons stacked on top of each other.

So my next job should be fairly simple, though from experience those words are the prelude to pain. Sorting the tris. Then I'll have a filled sorted box. After that I'm going to get color gradients working, so I can have per-vertex lighting.
Next Entry GA fun
0 likes 2 comments

Comments

Ravuya
It's starting to shape up pretty well. Any plans on adding vectorization optimization and the like, or are you trying to keep it portable?
April 09, 2006 05:18 PM
Stephen R
No. I don't have any optimizations on the todo list at the moment. The current plan is to add features till its bleeding framerate out its eyes, get to grips propperly with each of the techniques, algos and concepts in there. Then when its hitting low framerates I'll over haul it untill the frame rate is high enough that I can fit more features in.
April 09, 2006 07:11 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement