CREDITS.txt
author Sam Lantinga <slouken@libsdl.org>
Thu, 01 Aug 2013 09:15:36 -0700
changeset 7563 c128ed448c30
parent 7238 daff4d9cedc6
child 7618 d381f183aa07
permissions -rw-r--r--
Fixed bug 1968 - SDL_RenderCopy stretch loses proportion on viewport boundaries for 3D renderers

driedfruit

SDL_RenderCopy clips dstrect against the viewport. Then it adjusts the
srcrect by "appropriate" amount of pixels. This amount is actually
wrong, quite a lot, because of the rounding errors introduced in the "*
factor / factor" scale.

real_srcrect.x += (deltax * real_srcrect.w) / dstrect->w;
real_srcrect.w += (deltaw * real_srcrect.w) / dstrect->w;

For example:

I have a 32 x 32 srcrect and a 64 x 64 dstrect. So far the
stretching is done perfectly, by a factor of 2.

Now, consider dstrect being clipped against the viewport, so it becomes
56 x 64. Now, the factor becomes 1.75 ! The adjustment to "srcrect"
can't handle this, cause srcrect is in integers.

And thus we now have incorrect mapping, with dstrect not being in the
right proportion to srcrect.

The problem is most evident when upscaling stuff, like displaying a 8x8
texture with a zoom of 64 or more, and moving it beyond the corners of
the screen. It *looks* really really bad.

Note: RenderCopyEX does no such clipping, and is right to do so. The fix would be to remove any such clipping from RenderCopy too. And then fix the software renderer, because it has the same fault, independently of RenderCopy.

[attached patch]
this leaves Software Renderer buggy, as it does it's own clipping later on
slouken@7222
     1
slouken@7222
     2
Simple DirectMedia Layer CREDITS
slouken@7222
     3
Thanks to everyone who made this possible, including:
slouken@7222
     4
slouken@7222
     5
* Cliff Matthews, for giving me a reason to start this project. :)
slouken@7222
     6
 -- Executor rocks!  *grin*
slouken@7222
     7
slouken@7222
     8
* The Linux Fund, C Magazine, Educational Technology Resources Inc.,
slouken@7222
     9
  Gareth Noyce, Jesse Pavel, Keith Kitchin, Jeremy Horvath, Thomas Nicholson,
slouken@7222
    10
  Hans-Peter Gygax, the Eternal Lands Development Team, Lars Brubaker,
slouken@7222
    11
  and Phoenix Kokido for financial contributions
slouken@7222
    12
slouken@7222
    13
* Edgar "bobbens" Simo for his force feedback API development during the
slouken@7222
    14
  Google Summer of Code 2008
slouken@7222
    15
slouken@7222
    16
* Aaron Wishnick for his work on audio resampling and pitch shifting during
slouken@7222
    17
  the Google Summer of Code 2008
slouken@7222
    18
slouken@7222
    19
* Holmes Futrell for port of SDL to the iPhone and iPod Touch during the
slouken@7222
    20
  Google Summer of Code 2008
slouken@7222
    21
slouken@7222
    22
* Szymon "Wilku" Wilczek for adding support for multiple mice and tablets
slouken@7222
    23
  during the Google Summer of Code 2008
slouken@7222
    24
slouken@7222
    25
* Marty Leisner, Andrew, Will, Edgar Simo, Donny Viszneki, Andrea Mazzoleni,
slouken@7222
    26
  Dmytro Bogovych, and Couriersud for helping find SDL 1.3 bugs in the great
slouken@7222
    27
  SDL Bug Hunt of January 2009!
slouken@7222
    28
slouken@7222
    29
* Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of
slouken@7222
    30
  January 2009!
slouken@7222
    31
slouken@7222
    32
* Luke Benstead for OpenGL 3.0 support
slouken@7222
    33
slouken@7238
    34
* Gaëtan de Menten for writing the PHP and SQL behind the SDL website
slouken@7238
    35
slouken@7238
    36
* Tim Jones for the new look of the SDL website
slouken@7238
    37
slouken@7238
    38
* Ryan Gordon for helping everybody out and keeping the dream alive. :)
slouken@7238
    39
slouken@7238
    40
* Mattias Engdegård, for help with the Solaris port and lots of other help
slouken@7238
    41
slouken@7238
    42
* Eric Wing, Max Horn, and Darrell Walisser for unflagging work on the Mac OS X port
slouken@7238
    43
slouken@7238
    44
* David Carré, for the Pandora port
slouken@7238
    45
slouken@7238
    46
* Couriersud for the DirectFB driver
slouken@7238
    47
slouken@7238
    48
* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation
slouken@7238
    49
slouken@7238
    50
* Arne Claus, for the 2004 winning SDL logo,
slouken@7238
    51
  and Shandy Brown, Jac, Alex Lyman, Mikkel Gjoel, #Guy, Jonas Hartmann,
slouken@7238
    52
  Daniel Liljeberg,  Ronald Sowa, DocD, Pekka Jaervinen, Patrick Avella,
slouken@7238
    53
  Erkki Kontilla, Levon Gavalian, Hal Emerich, David Wiktorsson,
slouken@7238
    54
  S. Schury and F. Hufsky, Ciska de Ruyver, Shredweat, Tyler Montbriand,
slouken@7238
    55
  Martin Andersson, Merlyn Wysard, Fernando Ibanez, David Miller,
slouken@7238
    56
  Andre Bommele, lovesby.com, Francisco Camenforte Torres, and David Igreja
slouken@7238
    57
  for other logo entries.
slouken@7238
    58
slouken@7238
    59
* Bob Pendleton and David Olofson for being long time contributors to
slouken@7238
    60
  the SDL mailing list.
slouken@7238
    61
slouken@7238
    62
* Everybody at Loki Software, Inc. for their great contributions!
slouken@7238
    63
slouken@7238
    64
 And a big hand to everyone else who gave me appreciation, advice,
slouken@7238
    65
 and suggestions, especially the good folks on the SDL mailing list.
slouken@7238
    66
slouken@7238
    67
THANKS! :)
slouken@7238
    68
slouken@7238
    69
  -- Sam Lantinga			<slouken@libsdl.org>
slouken@7238
    70