Re: Precalculated Z - buffer
From: John Smith (vrbalazs_at_axelero.hu)
Date: 06/08/04
- Previous message: cody: "How to get original Texture size"
- In reply to: Martin Mayer: "Re: Precalculated Z - buffer"
- Next in thread: Martin Mayer: "Re: Precalculated Z - buffer"
- Reply: Martin Mayer: "Re: Precalculated Z - buffer"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Jun 2004 20:59:56 +0200
Hello
> Well, heightfields are not enough for what I intended to do. I need a z -
> value for every pixel of the screen. Using height fields would result in x
*
> y vertices which is probably the total overkill.
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
You can convert your depth-image to any of the formats above (if they dont
already match), and transfer dynamically, so they dont take up systemmem.
> Microsoft should change this z-buffer limitations in upcoming directx
> releases, for example make lockable z-buffers a requirement for
> certification. I think lots of people want z buffer control and could live
> with a performance loss.
I agree. (I dont use LZ in retail stuff, but it's pretty nice for debugging,
and such things)
Balazs Vasvari
- Previous message: cody: "How to get original Texture size"
- In reply to: Martin Mayer: "Re: Precalculated Z - buffer"
- Next in thread: Martin Mayer: "Re: Precalculated Z - buffer"
- Reply: Martin Mayer: "Re: Precalculated Z - buffer"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|