Homebrew SF2DLib smooth scaling?

UraKn0x

Official senpai
OP
Member
Joined
Mar 20, 2014
Messages
370
Trophies
0
XP
735
Country
France
Hello everyone!

I am currently writing a VN interpreter (for cs2-based VNs, think about the Grisaia series for example) for 3DS, and I have encountered a problem: the image files are meant to be used with a PC screen resolution, so I have to downscale them to fit on the 3DS screen.
The problem is, the built-in scaling functions in SF2DLib makes the result pixelated (see spoiler below).
AJMgpXZ.png
It seems it takes only one pixel out of N when I downscale and does no interpolation. Is there a way to fix it directly with the lib (ie is there any way to do this with the GPU), or will I have to do it in software?

If I have to do it in software, could you recommend a downscaling algorithm which is a good compromise between speed and quality?

Thanks in advance!
 
Last edited by UraKn0x,

UraKn0x

Official senpai
OP
Member
Joined
Mar 20, 2014
Messages
370
Trophies
0
XP
735
Country
France
use
PHP:
sf2d_texture_set_params(yourTexturePointerHere, GPU_TEXTURE_MAG_FILTER(GPU_LINEAR) | GPU_TEXTURE_MIN_FILTER(GPU_LINEAR));
once for every texture you want to change the filter
Thanks! Are there any other filters, like bicubic? Because I've tried GPU_BICUBIC and it doesn't compile...

EDIT: Nevermind, I've found it. They are all in ctrulib/include/3ds/gpu/enums.h
 
Last edited by UraKn0x,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Lol