Dolphin, the GameCube and Wii emulator - Forums

Full Version: internal resolution and aa suggestion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Nope. Internal resolution != screen space resolution.

If you follow the code:
1x IR + 4xSSAA:
Internal resolution option sets the internal resolution to 640 x 528. Then SSAA multiplies it by 2 in each direction, changing the internal resolution to 1280 x 1056. The efb is rendered at 1280 x 1056 and scaled to your fullscreen/windowed resolution.

2x IR + no SSAA:
Internal resolution option sets the internal resolution to 1280 x 1056. The SSAA option does not multiply it. The efb is rendered at 1280 x 1056 and scaled to your fullscreen/windowed resolution.

The ONLY difference is the scale code. You can test the options yourself if you don't believe me.

Edit: Looking through the code now. They actually use the same scale code. It's just copy/pasted, lol, no wonder it doesn't look any different.

http://code.google.com/p/dolphin-emu/source/browse/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp

Take a look at lines 183-202, that switch statement. Case 0 is no SSAA, case 1 is 4xSSAA, case 2 is 9xSSAA. Yet what do you see when you look at the code?

Neobrain either doesn't know how to or doesn't care about fixing the issue. I don't care enough to learn hlsl and the d3d9 framework just to fix this one tiny issue. Only other option is if we're lucky and someone else comes along who wants to fix it. For the time being I'm using 4x IR + FXAA, it does a decent job but still not as good as true 4xSSAA did.
that's the thing, they do look slightly different. (1xir4ssaa and 2xir0ssaa) Even though as you said in code, they are the same.
Thanks for the explanation NaturalViolence. Wink

Uh, why is the 4XAA scale code named 1 samples AA? Doesn't that result in.. no AA at all?
Quote:http://code.google.com/p/dolphin-emu/sou...che.cpp#88
http://code.google.com/p/dolphin-emu/sou...he.cpp#119

Try again.

Yes they do use different vertex shaders to get the tex pos but what does that have to do with scaling?

Quote:Uh, why is the 4XAA scale code named 1 samples AA? Doesn't that result in.. no AA at all?

Ding ding ding ding ding ding! (that's supposed to be the sound of a correct answer bell on a game show)
(01-27-2012, 05:11 AM)NaturalViolence Wrote: [ -> ]Yes they do use different vertex shaders to get the tex pos but what does that have to do with scaling?

I'll give you another hint:
http://code.google.com/p/dolphin-emu/source/browse/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp#930

Note that those two lines are being called directly before downscaling the internal EFB buffer to the D3D backbuffer (using one of the vertex shaders I posted, depending on what SSAA mode is enabled).
Could someone please elaborate (or give me some reading links) how does antialias works in practice?

Cause I know the theory of SSAA (NaturalViolence taught me already Tongue) but I can't see how things like texture positions fits in that, isn't the whole AA process made after the scene is rasterized? I mean, it is just about rendering it with a higher res, than using an specific operation to 'fit' it on a smaller bitmap, causing colors on edges to make a smoother transition, right? Or is this things because it is an emulator? isn't the process the same (even considering dolphin's efb?)
Antialiasing is any code which attempts to reduce aliasing, simple as that. There are many many different ways of doing it.

Quote:isn't the whole AA process made after the scene is rasterized?

If it's a post-processing AA method yes.
So.. how is it done in Dolphin? I 've been trying to understand the renderer and DX9 code, but it way too complex, considering I have only basic C++ knowledge
d3d9 backend = SSAA, using a custom shader (because there is no SSAA stuff in the library/framework), this was made because MSAA in d3d9 does not support offscreen rendertargets, which dolphin needs
d3d11 backend = MSAA, using the d3d11 library/framework
openGL backend = MSAA, using the openGL library/framework
Pages: 1 2 3 4 5 6 7