Page 1 of 1

A post-process shader mimicking the 3dfx Voodoo Graphics & 2

Posted: Tue Jan 14, 2014 7:39 pm
by leileilol
This is a project i've been working on.

If you've ever owned an older 3dfx card (pre-Voodoo4) you'll know what this is all about.


Would love to get some actual ordered dither in there...


Some shots:
Image
Image

Re: A post-process shader mimicking the 3dfx Voodoo2

Posted: Thu Jan 16, 2014 8:37 am
by Barnes
mmm 16bit dither?)

Re: A post-process shader mimicking the 3dfx Voodoo2

Posted: Fri Jan 17, 2014 5:20 am
by leileilol
It's more than just that. The shader without the filter is still useful for the psuedo dither for modern cards running in 16bpp, but there's very few DX9 games that even force you to 16bpp so not much application to be had there (unless you use some GL>D3D9 wrapper like GlDirect and you're playing an older GL game such as Q/Q2/H2/SiN/HL etc).... until DXGL gets D3D3-6 working, since many early Direct3D games never gave the choice of 24/32bpp (only a few exceptions, like AvP).

Re: A post-process shader mimicking the 3dfx Voodoo2

Posted: Fri Mar 07, 2014 8:55 pm
by leileilol
I've attempted a GLSL port, unfortunately it doesn't look as convincing as my Cg version. Its 'dither' is even worse.

Image

(also made a cvar that limits the textures to 256x256 and in 15/16bit formats regardless of r_picmip and r_textureBits)

The shaders themselves, and they should go like this:

Pass1: leifx_dither
Pass2: leifx_gamma
Pass3: leifx_filter
Pass4: leifx_filter
Pass5: leifx_filter
Pass6: leifx_filter



Any (clean room!) tips or advice on achieving the ordered dithering in the shader would be appreciated. :)

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Tue Mar 11, 2014 7:32 am
by Eukara
Aww yes.
Gimme dem scanlines.

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Tue Mar 11, 2014 11:07 pm
by jitspoe
I always hated the 3dfx look. I remember when I got my first voodoo (doodoo) card, and I was like, "Why are there weird rainbow colored splotches in the lightmaps? Why is everything so blurry? What's with the scan lines? I thought 3D acceleration was supposed to make the game look better... software mode looked better than this!"

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Thu Mar 13, 2014 11:06 pm
by leileilol
It's more of a 'hardware preservation' kind of thing. Also some people are wacky and think the Voodoo looked better because it eliminated the dithering every other card had (despite some cards supporting 32bpp, that bit depth wasn't available in most early 3d accelerated games as a choice. )

Also remember - 3d accelerator. 3dfx gained the marketshare early because for once it actually lived up to that word. People were willing to compromise image quality for it, despite earlier S3 ViRGE, GLint and Millenium looking cleaner.

RetroArch version




There's also some other shader ideas...

- PowerVR alpha blend texture shader (resample 16x, Nearest texture filter on alpha channel, RGBA4444 the texture AND the modulated alpha)
- ATI Rage error diffusion table dither shader (all cards from Rage to Radeon 7500 had this. 8500 only has it in blending functions)
- Nvidia box 'dither' shader (all cards from Riva TNT up to Geforce7 had this)

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Tue Mar 25, 2014 8:24 pm
by revelator
In 2d the best looking was the matrox g200 and earlier the 4000 chipset by tseng labs. Both Cards rocked with a voodoo :) i still have fond memories of these beating a geforce 1 hehe.

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Wed Mar 26, 2014 1:16 am
by leileilol
That's true if you have a K6-2 system. 3dNow gave 3dfx a nice boost even over the Geforce3 in game performance on those.

I am still working on this shader, i've recently greatly redone the dithering pass. It's still not perfect, but it's awfully close.

I am using the dither matrix table from voodoo.h from the MAME/MESS source, and fortunately that particular bit of code is under a BSD 3 clause license.

Image

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Thu Mar 27, 2014 1:53 am
by revelator
I think i got one of the last sources for the voodoo driver somwhere on my harddrives, not sure if that would help with the dither tables ?.
I think its the one for the XP port if i remember correctly (hacked together from the Linux sources by a voodoo enthusiast).

True the voodoo played really nice with the AMD chips back in the days :) just dont remind me of the Cyrix CPU's from back then hehe :twisted:

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Thu Mar 27, 2014 11:57 pm
by leileilol
I doubt a 3dfx driver source would contain the pixel fragment code that the chips themselves had processed.

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Fri Mar 28, 2014 2:37 am
by revelator
Not as actuall fragment code no (kinda doubt that the voodoo's had shader capabilities) but maybe a hint on how the tables where setup :).

Re: A post-process shader mimicking the 3dfx Voodoo Graphics

Posted: Sun Jul 27, 2014 6:09 pm
by leileilol
HunterK wrote a blog post featuring the shader in action. I also recently committed the new dithering version in the RetroArch common-shaders repository