There are a few gamecube games like, Resident Evil 4, that play in 16:9 with letter boxing to fill out the 4:3 screen. I was playing Resident Evil 4 again today and was disappointed that Dolphin doesn't have an option to zoom the image to fill my monitor, and I couldn't find any solution online. So I wrote a post-processing shader to help with this. Maybe some day Dolphin will support this effect natively, but until then this is a quick and easy solution!
Just copy and paste the code below into a .gsl file in your "Dolphin Emulator/Shaders" folder, then enable the shader under Graphics > Enhancements > Post-Processing Effects (it will be called whatever you named the file).
The way this works is by simply stretching the image along the vertical axis. Forcing 16:9 aspect ratio in the Dolphin settings will stretch the image horizontally, so as long as the vertical stretch matches the horizontal stretch the original aspect ratio will be preserved, and the image will fill the screen horizontally.
I'm sure there's room for improvement, but this was simple and worked.
Comparison screenshots.
Just copy and paste the code below into a .gsl file in your "Dolphin Emulator/Shaders" folder, then enable the shader under Graphics > Enhancements > Post-Processing Effects (it will be called whatever you named the file).
Code:
// For games that are 16:9 and letterboxed to fit a 4:3 screen, this shader will
// help by zooming the image in to fill a widescreen monitor.
//
// To use, set the aspect ratio to force 16:9 in the graphics option, then
// enable this shader in Post-Processing Effects.
void main() {
float2 coords = GetCoordinates() - float2(0.5, 0.5);
float2 new_coords = float2(coords.x, coords.y*3/4);
float2 sample_coords = new_coords + float2(0.5, 0.5);
SetOutput(SampleLocation(sample_coords));
}
The way this works is by simply stretching the image along the vertical axis. Forcing 16:9 aspect ratio in the Dolphin settings will stretch the image horizontally, so as long as the vertical stretch matches the horizontal stretch the original aspect ratio will be preserved, and the image will fill the screen horizontally.
I'm sure there's room for improvement, but this was simple and worked.
Comparison screenshots.