3 ms·
>Before the GPU adds an entry to the raster of pixel colors, it compares the distance of that pixel from the camera with the number in that location in the Z-bu
by rasz 3y ago
>Before the GPU adds an entry to the raster of pixel colors, it compares the distance of that pixel from the camera with the number in that location in the Z-buffer. If the current distance is less than the one already found there, it knows that the pixel in question should be overwritten in the main raster and that the Z-buffer raster should be updated with that pixel’s new distance from the camera. Ditto if the Z-buffer contains a null value, indicating no object has yet been drawn at that pixel. But if the current distance is larger than the (non-null) number already found there, the GPU simply moves on without doing anything more
Surprisingly not the way 3dfx works. Voodoo 1/2 (no idea about V3, but I wouldnt be surprised) will calculate, texture and gourad shade every single triangle being pushed thru it and only then in the last step decide if it passes Z-buffer/alpha test or not. There is no speed difference between drawing 1000 triangles in random order vs sorted front to back. Speed difference when turning off Z-buffering/alpha is minimal, you only skip the logic deciding between storing or skipping write to framebuffer.
There was so much easy optimization left on the floor when first 3dfx cards were being designed!
My favorite obligatory 3dfx fall/Nvidia killer mode timeline:
Riva 128 (April 1997) to TNT (June 15, 1998) took 14 months, TNT2 (March 15, 1999) 8 month, GF256 (October 11, 1999) 7 months, GF2 (April 26, 2000) 6 months, | 3dfx dies here |, GF3 (February 27, 2001) 9 months, GF4 (February 6, 2002) 12 months, FX (March 2003) 13 months, etc ...
- Tuna-Fish 3y agoInterestingly, the way nVidia achieved this is that they were one of the first successful users of RTL simulation. They would design their chips to work in simulation, and then instantly order a full production batch without any physical test articles. This was thought to be entirely insane at the time. The reason they did this, was that for the first few generations of their chips, the company was constantly near bankruptcy and they simply could not afford the payroll for the time it would take to get test samples out and debugged. So they just placed their trust in an unproved technology and prayed. If the simulations would have failed and anything before GeForce had bugs you couldn't work around in drivers (and they all had a lot of bugs), the company would have likely gone under.