LeiFX - an approximation of a infamous screen filter

        This web page is dedicated to the development of an experimental shader to recreate the 4x1 linear filter of the once ubiquitous 3dfx Voodoo Graphics and Voodoo2 3d accellerators. Their internal filters are intended to approximate a 24-bit image by filtering a 16-bit image in the buffer (which itself was dithered down from a 24-bit source).  This shader aims to recreate that effect.  This filter is usually tied with a lot of nostalgia for the early 3dfx accelerators mostly because comparably with other cards of the time, it's much brighter and distinctively blurry.  The common complaint about an nVidia card back then (Riva128 & TNT series) and a game such as GLQuake or Quake2 is that it is dark - this is because of the common exposure of 3dfx's default gamma via their MiniGL wrapper.  

        It is my first post-process shader while learning HLSL / cg.  I probably most likely typed in some facepalm-quality stuff in the shader.  I did it because I haven't seen it done, and I wanted to stop waiting for one to exist.

        Currently, the shader is available for the SweetFX + eFX bundle in a prototype form.  It requires a DX9-supporting video card with support for Pixel Shader 3.0.

        The shader code is licensed under the GNU General Public License version 2.


Shader disabledShader enabled
A slashed up picture ( Y  ) cleavage warning, to skip click here):

How does my shader work

Pass 1Apply dots of slightly alternating gamma to fake dither.

Reduce the color depth to 16bpp.

Increase the color depth back to 24bpp.
Pass 2Apply gamma of 1.3 for even lines and 1.2 for odd lines
Pass 3Filter a pixel to the right determined by mean
Pass 4Repeat
Pass 5Repeat
Pass 6Repeat

The shaders

Installing onto SweetFX 1.5.1

        Please don't contact me asking about how to install this! You can find SweetFX somewhere in here.
  1. Download and save leifx_filter.h and leifx_reduct.h into your SweetFX/Shaders/ folder
  2. If you didn't modify SweetFX_D3D9.fx, or isn't a version after 2013-11-09, you can replace it with that one too.
  3. If you didn't modify Main.h for other shaders you can also download that.
  4. Edit SweetFX_Settings.txt and add the following lines after #define USE_CUSTOM        0
    #define USE_LEIFX_REDUCT  1 //[0 or 1] Reduce to 16bpp with dither
    #define USE_LEIFX_FILTER  1 //[0 or 1] Filter the image

  5. Ran you're game, !!?
Tips when using:


    This shader is far from perfect. It is only an approximation of what those video cards once did. It's not the exact process and algorithm they used.  I didn't extensively reverse engineer the cards or even use VGA capturing for analysis.