desmume icon indicating copy to clipboard operation
desmume copied to clipboard

Native Resolution in Hybrid Mode results in distorted small screens

Open Papermanzero opened this issue 6 years ago • 6 comments

The current approach is to render 2D games in native resolution and to use shader to optimise the graphics. However in native resolution (256x192) the small screens in the hybrid layout are completely distorted and unsharp. Even without the shaders (scaleFX) the small screens keep distorted. yoshi s island ds-180325-100420

I tried to change the hybrid layout scale from 1 to 3. If I do that the layout is still the same but the shaders (scaleFX) do not work anymore.

Papermanzero avatar Mar 25 '18 08:03 Papermanzero

Retroarch only accepts a single 2D framebuffer for output, so either the big screen is 3x the pixels or the small screens are 1/3x the pixels. I suppose they could add a callback that lets a core output a partial framebuffer to specific regions using the shader pipeline, disabling the global shader pipeline. But that's a significant investment for one or two cores in specific configurations, and would require special-casing all the video options like aspect ratio and rotation.

Since what you want is so specific, it would be easier to just adapt a shader to your needs.

bearoso avatar Mar 25 '18 16:03 bearoso

I did not know that you are limited with a single framebuffer. But this is general a limitation which could become an issue. DS, 3DS, NGC-GBA, DC-VMU, WiiU, GBA Multiplayer etc. are some examples which would require another framebuffer. I thought the introduced system adhoc feature introduced several framebuffers. Maybe it makes sense to start the discussion with the libretro team.

Papermanzero avatar Mar 26 '18 07:03 Papermanzero

I'm late to the party here, but there is a shader (ds-hybrid-view, in 'handheld'; only slang and cg formats at the moment) that does something like what you're wanting. There's a preset to apply SABR scaling to the big image and put the small image off to the side.

hizzlekizzle avatar Sep 13 '18 01:09 hizzlekizzle

Thanks hizzlekizzle. I opened also a feature request for libretro in general. https://github.com/libretro/libretro-common/issues/55

The VMU feature in reicast also showed that a second framebuffer would be convenient to apply e.g. shaders or scalings for the second frame instance.

Papermanzero avatar Sep 13 '18 07:09 Papermanzero

I asked multi viewports a while back too, don't remember were though.

andres-asm avatar Sep 23 '18 20:09 andres-asm

This is solved with the 'Scale so Small Screen is 1:1 px', right? Only downside is if you use integer scale, it seems to make the main viewport smaller.

jeremynsl avatar Feb 25 '19 16:02 jeremynsl