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
Render to a small texture, then scale up to the screen size
To be honest, I thought this is what SDL_RenderSetLogicalSize() did, but
actually it scales up each object that you draw with SDL_RenderCopy().
This is necessary because on some GPUs, scaling up can cause a sprite to
bleed into an adjacent frame in the spritesheet texture.
This shouldn't happen with nearest neighbor scaling, but it nevertheless
does happen on some GPUs such as my laptop's embedded Intel GPU. On this
GPU I saw a one pixel wide strip on the top and left of every sprite
that showed the neighboring sprite frame. The strip was one pixel wide
in my screen's pixels, not the logical resolution's pixels. Rendering
everything to a 320x240 texture and then scaling up the whole texture at
once makes strange bugs like this impossible.
0 commit comments