• Advertisement
Sign in to follow this  
  • entries
    223
  • comments
    165
  • views
    79518

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

Sign in to follow this  

334 views



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.
Sign in to follow this  


2 Comments


Recommended Comments

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?

Share this comment


Link to comment
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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement