3ds-sdl not quite pixel perfect

Post Reply
23_Skidoo
Posts: 1
Joined: Thu May 23, 2019 6:14 am

3ds-sdl not quite pixel perfect

Post by 23_Skidoo » Thu May 23, 2019 7:06 am

Dev Environment: Using 3ds-sdl package version 1.2.15-8 on Ubuntu 16.04, installed via dkp-pacman.
Exec Environment: 2ds xl, running up-to-date fw+Luma3ds+homebrew launcher.
Issue: There is noticeable blur for all graphics when viewed on the device physically. Affects top screen or bottom in single screen mode, with no scaling applied. Possibly shows up in dual screen mode (have not tested), but not in top or bottom console (which is not handled by SDL).

Steps to reproduce are as follows :-
Badda wrote: With my code, I simply want to display a png-image on the screen, no scaling involved. However, the image shown on the screen with the code below always comes out blurry, the colors are off and there are some strange artefacts. Here the code:

Code: Select all

SDL_Init(SDL_INIT_VIDEO);
SDL_Surface *screen = SDL_SetVideoMode(400, 240, 24, SDL_HWSURFACE);
SDL_Surface *image = IMG_Load ( "/image.png" );
SDL_BlitSurface ( image, NULL, screen, NULL );
SDL_Flip(screen);
The image below shows the original png-image within the grey box on the left (enlarged - each black stripe is one pixel wide, original dimensions are 11x11px) and what the screen shows after executing the code above on the right. I checked the pixel data of both image and screen surface - they both look good. Seems like the issue occurrs when the screen surface is rendered to the physical 3DS screen - there are probably some unneccessary filters applied. What can I do to get the image on the screen "as is"?

Image
Not sure what environments are being used by Badda in his example. Based on the fact that we are both seeing the same thing using the portlib 3ds-sdl, I suspect there is an issue in the n3ds video driver, perhaps some slight offset in coordinates in the texture quad or possible arithmetic error when calculating scaling.

WinterMute
Site Admin
Posts: 1403
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: 3ds-sdl not quite pixel perfect

Post by WinterMute » Sun Jun 02, 2019 2:51 pm

This is fixed now, thanks to Badda's PRs to our 3DS SDL branch. The 3DS packages have been updated accordingly.

Thanks for reporting, it's very much appreciated.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest