Dolphin, the GameCube and Wii emulator - Forums

Full Version: How does Dolphin support visual features such as AA??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If the original game was not intended to have those features, how does Dolphin allow things like pixel lighting, DX11, Anti-aliasing etc. ? Also do those features even work? I mean, DX11 sounds hard to believe.
Dolphin emulates the hardware of the GC/Wii. The main three chips it has to emulate are the cpu (the video games are programs that contain instructions and data that are processed by this chip, the program outputs gpu machine code and audio opCodes), the gpu (runs the gpu machine code provided by the program to draw the images that are sent to your display), and the dsp (runs the audio opCodes output by the program to create the audio signal that gets sent to your speakers).

For everything the real hardware can do dolphin has a function that does the equivalent with our hardware. d3d9, openGL, d3d11 are apis, which are libraries full of functions that our gpus support. In other words to emulate the GC/Wii gpu dolphin has plugins that contain functions for every function supported on the real hardware (well all the ones we've been able to emulate so far anyways). Each of these functions contains code from one of those libraries. So the functions in the d3d11 plugin contain code from the d3d10/10.1/11 libraries. The d3d9 plugin and openGL plugin have most of the same functions but they are made with code from the d3d9 and openGL libraries.

These functions do not need to do the same thing as the real function. So for example when the game issues a function that is supposed to render a 640 x 528 image we can create a function that renders a 1280 x 1056 image instead and call that function.

Or in moron terms:
The game says "hey! Fill this 640 x 528 framebuffer with pixels!"
Dolphin says "ok" then fills a 1280 x 1056 framebuffer with pixels. The game doesn't know what we're doing.

Anti-aliasing is an extra function not supported by the real hardware but it still works. I won't get into how MSAA works unless you really want to know because it's semi-complex. SSAA simply renders the scene at a higher internal resolution then blends (downscales) the pixels down to a lower resolution.
well... i did not understand that but i'll take your word for it XD nice!!!
Quote:Or in moron terms:
The game says "hey! Fill this 640 x 528 framebuffer with pixels!"
Dolphin says "ok" then fills a 1280 x 1056 framebuffer with pixels. The game doesn't know what we're doing.

^Tell me you at least understood that.

Not exactly sure what you don't understand about it, well let's just say Dolphin can't add any information not already in the game (except it does supports custom textures,) but upping the resolution or doing AA, it's not like you can't do that with any given geometry. Now since I'm no expert on graphical effects such as pixel lightning etc., but let's say for example if Dolphin have the information for a pixel of the image for what angle a polygon is viewed, what shaders/fog etc. are in place, you can make it do whatever is possible to do with the info you have, and the game doesn't even need to know about it.
(Some games does want to know some of these things though, in-game screenshots in SSBB for example turns out like noise)
In very simple words:

The GC/Wii readed the game and generated graphics from it using some settings based on its limitations. Dolphin "reads" the game like them, but he can generate the graphics in any way he is told/taught to.

I still prefer NaturalViolence's one, tough Tongue