Re: Precalculated Z - buffer

From: John Smith (vrbalazs_at_axelero.hu)
Date: 06/08/04

  • Next message: stereotypical: "xfile failed to load!?"
    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


  • Next message: stereotypical: "xfile failed to load!?"

    Relevant Pages

    • Re: convolution using a gaussian kernel
      ... I dont cheat.I didnt claim I made a discovery with that code,I was ... Eitan Hirsch wrote: ... I have a gaussian kernel with variance sigma and ... Suppose I want to calculate the new pixel in location ...
      (comp.soft-sys.matlab)
    • Re: TBitmap - how to copy an "object"
      ... > i'm trying to copy an "object" of one color out of a TBitmap, ... > the problem i got is that i dont know when a pixel belongs to ... If you know where to start, you can search outwards in all directions ... from the starting pixel, adding neighbouring pixels to your region ...
      (comp.lang.pascal.delphi.misc)
    • Re: Heathrow losing customers due to 1 bag rule
      ... a picture as an SLR sized lens whatever the pixel count ... of the camera. ... too many people are hooked on pixel counts, they dont seem to realise ...
      (rec.travel.europe)