Re: [AD] DO_PARALLELOGRAM_MAP again

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


On Thu, 2010-09-16 at 12:35 -0400, Pavel Sountsov wrote:
> 
> Hmm... well, to answer that I'd need to know the GPU implementation 
> range. I think 4096 is the largest bitmap size I remember being 
> supported.
> 
> But anyway, I was thinking of three things:
> 
> First, I haven't looked at whether I use the floating point "correctly" 
> (in terms of avoiding adding floating point numbers of vastly different 
> magnitudes) in the triangle drawer.
> 

Well, it seems the output isn't the same pixel-by-pixel for the "scaled
rotated 5" test, but the dis-similarity is 9 when we usually accept
something like 20 between sw/hw for considering a test as passed.

The test is:

al_clear_to_color(firebrick)
al_draw_scaled_rotated_bitmap(allegro, 50, 50, 320, 240,
   200.0, 3.0, -2.0, 0)
al_draw_pixel(320, 240, cyan)

The output from Mesa's software OpenGL:

http://allefant.com/tests/run%20on%202010-09-19%2015:27/test%20scaled%20rotate%205%20%5Bhw%5D.png

The output from A5 software drawer (after Peter's commits to use the triangle drawer):

http://allefant.com/tests/run%20on%202010-09-19%2015:27/test%20scaled%20rotate%205%20%5Bsw%5D.png

The cyan pixel is at 320/240 which is the center used for rotation and
scaling. It's supposed to be on a pixel crossing (50/50) so it seems the
A5 one is slightly off in the x direction... a single pixel in the input
is now a 200 x 3 rectangle but the dot is like 10 pixel inside of that.
I think we can live with that if it's caused by floating point accuracy
issues and therefore there would be no obvious fix.

-- 
Elias Pschernig <elias.pschernig@xxxxxxxxxx>





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