z buffer question

eviltoon

Senior member
Jun 22, 2001
336
0
0
Simple really. What is it and what does it do? A friend came to be saying that if I get rid of the z buffer I can see a 60% improvement in performance. I've heard this term before but I cannot rember anything about it. I'd like to be able to get back to him on what he said. thanks very much.
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,004
126
The Z-buffer is used to store the depth information for each pixel in a 3D scene. You can't get rid of it unless you use a W-buffer instead (which doesn't really change performance) or if you have a tile based renderer like a Kyro.

To improve performance you can lower the Z-buffer precision from 32/24 bits to 16 bits although the ugly artifacts of doing this are not worth it.
 

Inspirer

Member
Jul 11, 2002
50
0
0
allow me to elaborate that the depth value is used to determine which pixel is on top.

when you have a partial scene drawn and you add a polygon to it, the polygon is drawn one pixel at a time.
if the z of the new pixel is bigger than the z value stored for the same pixel in the Z buffer, the new pixel is not drawn because it's deeper inside the screen.
on the other hand, if the value is smaller, the old pixel is either overwriten by the new or blended with the new one if the new pixel is partialy transparent.
 

Inspirer

Member
Jul 11, 2002
50
0
0
by the way, the kyro does use a Z buffer, just not for the whole scene. it has cache memory that holds z values for a single Tile so the z comparison is extremely fast.
 

Jeff7

Lifer
Jan 4, 2001
41,596
20
81
Originally posted by: eviltoon
Simple really. What is it and what does it do? A friend came to be saying that if I get rid of the z buffer I can see a 60% improvement in performance. I've heard this term before but I cannot rember anything about it. I'd like to be able to get back to him on what he said. thanks very much.

What videocard are you using right now?
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,004
126
by the way, the kyro does use a Z buffer,
It does not have a Z-buffer in the traditional sense like IMRs have.

And I am well-aware that it's doing depth calculations on the tile which is exactly why I made the original comment.