You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.0 Reported for operating system, platform: Linux, x86
Comments on the original bug report:
On 2013-07-13 07:51:43 +0000, driedfruit wrote:
Created attachment 1225
minimal test case
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.
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.
On 2013-07-13 08:38:11 +0000, driedfruit wrote:
Created attachment 1226
proposed patch
this leaves Software Renderer buggy, as it does it's own clipping later on
I'm leaving this bug open for the software renderer to be fixed post 2.0 release.
You can reproduce it by taking the test case and running:
SDL_RENDER_DRIVER=software ./rect
Thanks!
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86
Comments on the original bug report:
On 2013-07-13 07:51:43 +0000, driedfruit wrote:
On 2013-07-13 08:38:11 +0000, driedfruit wrote:
On 2013-08-01 12:17:34 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: