Re: [AD] Bug in clip3d_f() / polygon3d_f()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


OK, OK I give up :-)

Ben Davis wrote :
> 
> Did you read my suggestion for a complete replacement for the docs?

Yes !

> I *think* it clarifies why texels aren't shared when they look as if they are.
> It all comes down to the difference between continuous (float, sort of) and
> discrete (int) maths.

It does clarify but I would like to suggest some things. See the end of
this mail.

> 
> With regards to your suggested modification, bear in mind the following.
> 
> Suppose you have three consecutive vertices with the following texture
> coordinates (0,0) , (32,16) , (48,48) and similar screen coordinates. Say
> this is the right-hand edge of the polygon, and we can assume the left edge
> is such that these coordinates will be traversed in two segments.
> 
> In the first segment, the coordinates (0,0) will remain the same, and
> (32,16) will become (33,17).
> In the second segment, (32,16) will remain the same and (48,48) will become
> (49,49).
> 
> So you'll get a discontinuity between the two segments. 

You are right :-(

George Foot wrote :
> 
> I thought of this too, but in some ways texturing is more like
> blitting.  However, with blitting you specify the width of the
> area, not the coordinate of the bottom-right corner, so it's not
> so comparable.

Well, this should be underlined in docs.

> -- I think this is better:
> 
>     du = (right_u - left_u) / (scanline_width-1)

Ooops ! scanline_width is not the actual width of the scanline but
actual_width - 1 (to prevent overdrawing). The name scanline_width was
not well chosen :-(

SUGGESTIONS for DOCS :
OK I agree with both of you now, you convinced me ;-) So I think we
should tell the main ideas of our discussion in the docs in order to
convince every people who might have thought like me. Here are IMHO the
main ideas :
- (u,v) indicate the top left corner (of course :-)
- this convention has been chosen because texturing is in some ways like
blitting.
- vertices can be shared between polygons and this convention is the
only way to keep continuity between polys.
- and of course all the ideas of Ben's docs...

Well, this is my last mail of the year. See you in 2001. Merry Christmas
to all of you...

	Bertrand.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/