Sign in to follow this  
Hexed

Scan Conversion

Recommended Posts

Many articles I read on scan conversion suggest that the polygon to be scan converted should be broken down into a top and bottom half. Are there any other methods that do not require this step? Are they unbearably inefficient? Thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hexed
Are there any other methods that do not require this step?

not that im aware of. the outline of a triangle simply is a piecewise function. nothing to be done about it. you may be able to include this fact into your code in some other way, but taking such considerations out of the innermost loop by splitting the triangle beforehand sounds like a good idea to me.
Quote:

Are they unbearably inefficient?

i think the question you should be asking is: is splitting it in two halves unbearably inefficient?

Share this post


Link to post
Share on other sites
Quote:
i think the question you should be asking is: is splitting it in two halves unbearably inefficient?


Maybe so. The equation to calculate the "dividing" point consists of one addition, two subtractions, one multiply, and one divide. Most (80%?) polys passed to this functions are probably going to be general (not flat topped or bottomed), and in a complex scene that would add up pretty quickly.

Share this post


Link to post
Share on other sites

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

Sign in to follow this