People who do emulation are, quite simply, the very, very best of us.
My other take away is: just don't bother getting an Nvidia card if you can avoid it.
People who do emulation are, quite simply, the very, very best of us.
My other take away is: just don't bother getting an Nvidia card if you can avoid it.
If anyone is interested in checkout out the massive ubershdaers, I've stashed a copy here:
https://gist.github.com/phire/25181a9bfd957ac68ea8c74afdd9e9...
Also - does this generalise to other rendering pipelines for other devices do you think?
The main difference with ubershaders is skip the shader generation/compilation and directly interpret the raw shader binary .
> Also - does this generalise to other rendering pipelines for other devices do you think?
Modern shader cores are more or less Turing complete, so you should be able to do the same on any other rendering pipeline which fits into 'opengl pipeline model', including other modern GPUs.Though, while it might be possible to run modern shaders in this manor, it won't run fast enough, because you will have to spill some (or even a lot) of the shader's state to the host GPU's main memory.
Ubershaders work well for dolphin because the entire mutable state of the GameCube's pixelshaders fit into the available registers, with plenty of space left over. I assume it will work well for other DirectX 8 or even DirectX 9 era GPUs.
Making it correct is much more difficult than making it at all. I'd be shocked if their emulator got the basics correct in every detail. Example: Texture wrapping occurs by taking the UV texcood modulo the texture size. But since a texcoord can be negative, your modulo operation has to account for that at the boundary between positive and negative, or else you end up with truncated texels.
It doesn't sound like they were really writing a rasterizer, but it's the same concept.
Is that the fmod(fmod(a, b) + b, b) thing, or something else? I still wish that was the default behaviour in more languages…
http://chrishecker.com/images/9/97/Gdmtex2.pdf page 21 has a correct FloorDivMod function.