Shader that does nothing BUT enforce native game aspect ratio

I’m wondering if there’s a shader that only enforces a game/core’s native aspect ratio even though retroarch is set to output full screen

I’ve found several border shaders that do this, but I’m looking for a shader that does this and nothing else.

Hopefully I can append or preappend this with whatever I want? Sorry for noob question.

I don’t know of any that do just that, but you could achieve the same thing by using the imgborder shader and feeding it a fully transparent png image.

1 Like

Hmm… really. I’ve tried that but I’m not sure my understanding of the imgborder settings is up to snuff. It seems I can only define a specific aspect ratio in that. I need it to use the game’s/core’s. If I set it to not enforce, it just shows full screen like if there were no shader.

If you’ve got any direction on how, id be grateful.

ah, yeah, i didn’t realize you meant using the core/game’s native aspect literally. No shaders have access to that information. They only know the number of input pixels and output pixels. This doesn’t tell you the aspect ratio of those pixels, so cores with non-square pixels (that is, a lot of them, notably S/NES) will end up with the wrong aspect.

1 Like

blur_fill seems to actually do it somehow. but its doing so much other stuff i don’t need. But whats in the viewport is a native aspect nearest-neighbor image.

1 Like

And yeah i know the non square deal. I’m willing to give that up for this use case. But i have some systems like wonderswan that are much wider than others. So i need something that reads the source.

An option to see the original resolution, in Main Menu » Settings » Video » Scaling, activate Interger Scale and Aspect Ratio in 1:1 PAR.

1 Like

@BarbuDreadMon

Since you already imlpemented the rotation uniform, how hard would it be to do the same for aspect ratio? Is it even doable?

1 Like

No reason it wouldn’t be doable, however tasks have been piling up and i don’t really have time for this one. Note that unlike what i did for rotation, it might be important to add some kind of define usable by the shader to detect if the feature exists or not, for the sake of retrocompatibility with older retroarch.

2 Likes

Indeed, I always think that we could “inject” a define describing the retroarch version number, or the build date somehow.

#ifdef RARCH_VERSION
  if (RARCH_VERSION > xxx) {
     [..]
1 Like

Just made this PR.

If/when it will be merged, shaders will be able to set the aspect they get from the core even if the scaling is set to full.

3 Likes