Hello I’m new to Retroarch and it seems pretty great for NES games (using NEStopia core) but there’s something technical I would like to know about how the shader pipeline works.
Basically I want to know whether the shaders get applied to the game’s framebuffer BEFORE or AFTER the framebuffer has already been resized/stretched to suit the chosen aspect ratio?
My current thought process is that shaders wouldn’t work properly if they were operating on the framebuffer after it has already been stretched/resized to fill the screen aspect.
For instance the CRT shaders scanlines need to align with each row of pixels, and on my system the scanlines do in fact align with the game’s rows of pixels. So I’m thinking the shader pipeline must be taking place BEFORE all the aspect ratio stuff, then once all shader passes are complete, that final framebuffer gets handed downstream for final aspect ratio scaling by the emulator/retroarch? Is my understanding correct here?
Another example is the “interpolation/sharp-bilinear-2x-prescale” shader. On my system it is able to achieve non-integer scaling while keeping the image sharp like nearest-neighbour scaling but without the associated aliasing or shimmering that you would normally get when nearest-neighbour scaling to a non-integer resolution. It seems this would only work if it has access to the game’s native framebuffer prior to any scaling, then the shader it does nearest neighbour 2x integer scaling which fills most of my screen, then finally does a small amount of bilinear (soft) upscaling to fill the screen and correct the aspect ratio. The thing is I can only conceive this working like this if the shader pipeline is done BEFORE aspect ratio scaling/resizing. But I’m not 100% sure this is the case.
I don’t like it when things “just work” and I have no idea why. I must know!
Thanks