SDL_RenderCopy scaling artifacts |
SDL_RenderCopy scaling artifacts |
tjpalmer
|
mbabuskov wrote: Are you sure you set hints before texture was created? Which hints did you try? Linear, nearest?
Thanks so much for the reply. I had missed the need to set it before the texture is created. However, as I somewhat feared (though I still wanted to try it), this won't help. Linear doesn't have the stray pixels, but I really want nearest, because linear blurs. (Linear still has edge issues, too, at the very ends of the texture, although I think I know how to deal with that by putting a transparent edge in my texture.) I've tried scaling manually myself on CPU now, too. It looks just right, but it's too slow. (Current implementation is step by float, and truncate. Could look at optimizing.) I've considered all kinds of hacks (CPU scale to not full but still integer fraction of screen/window size, many other things, ...), but maybe I should just bite the bullet and go to GL and shaders. That's a bunch of extra work and learning curve, but I suspect I could get it to do the simple scaling that I want. Any other easy fixes I should try first? |
|||||||||||
|
SDL_RenderCopy scaling artifacts |
tjpalmer
|
mbabuskov wrote: Won't or didn't?
Didn't achieve the effect I need. Default seems to be nearest (and is shown in my earlier screenshot), which is what I want, if not for the artifacts. Here's what I want (from my manual C++ scaling code), nearest sans artifacts: And here is what linear does: |
|||||||||||
|
SDL_RenderCopy scaling artifacts |
Jonny D
|
Can you post the code you're using to render this?
Jonny D On Wed, Mar 4, 2015 at 3:06 PM, tjpalmer wrote:
|
|||||||||||||
|