Re: Precalculated Z - buffer

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Martin Mayer (martin.mayer_at_gmx.de)
Date: 06/09/04


Date: Wed, 9 Jun 2004 12:09:07 +0200


> With ps1.4/2.0 hardware, you can use the texdepth/oDepth method. This
> way you only have to upload the "zbuffer" image as a texture, and after
some
> "black muxing magic" in the pixel shader, you can output the depth.
>
> On older hw, you have to fall back to the XYZ vertex method.
>
> With an 1024x768 buffer, it comes down to (approx, not counting pitch):
>
> PS1.4/2.0 HW: 1572864 bytes (16bit depth) 3145728 (24bit depth)*
> Legacy HW: 9437184 bytes (any bitdepth)
>
> * : 24bit textures are rarely supported, so i used 32bpp

The pixel shader would be a nice way of doing it. The Problem is that my
application has also to run on older cards ( legacy HW, GeForce 1 onwards )
and I think the XYZ vertex method won't work that well. There are 9MB of
vertex buffers that would have to be rendered for one screen. I think this
would kill the frame rate since I have to update more often than just once.
For example for scrolling ( like used in 2D ) and I would have to rerender
all the 9MB of vertex data for every frame while scrolling.

>
> I agree. (I dont use LZ in retail stuff, but it's pretty nice for
debugging,
> and such things)
>

:)