Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: dxt3 or dxt5?

  1. #1
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    dxt3 or dxt5?

    speaking about texture formats, ive been using dxt5 for most of my textures instead of dxt3 (my thinking being interpolated alpha should look better than linear alpha)
    but!
    A/ is this correct (for most texture cases)
    B/ i believe there is no performance difference between the two (but perhaps there is) has anyone tested?
    zed

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    626

    Re: dxt3 or dxt5?

    Last time I asked it turned out that there's no performance difference between dxtc3 and dxtc5. Looks like dxtc3 is a relic of the past. People told me that it came for implementation easiness but now that the transistors are there they are pretty much the same.
    Someone also told me that thare are some cases in which dxtc3 looks better than dxtc5 but in general they raccomanded me to just stay with dxtc5.
    So, what you do sounds fine to me.

    EDIT: removed quote.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,576

    Re: dxt3 or dxt5?

    DXT3 is hardly a "relic of the past". It is a viable way of handling alpha in cases where DXT5 does a poor job.

    DXT3 just takes a straight 4-bit-per-pxiel alpha, which, while imprecise, is effectively what you asked for. Any artifacts are in degree. DXT5 does the standard ST3C algorithm on the alpha pixels, which may not be appropriate for the edges between 1.0 alpha and 0.0 alpha.

    If you're using alpha as a pure mask thing (with some blending at the edges), DXT3 is the method that will always give you exactly what you want.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    626

    Re: dxt3 or dxt5?

    What you said is undoubtly true but recognizing those situations requires some work - in most cases choosing dxtc5 is just fine.
    I managed to pull out the old dxtc3 vs dxtc5 thread: here .

  5. #5
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    Re: dxt3 or dxt5?

    ok done some testing myself
    time in seconds 512x512textures drawn at 768x768 (linear filtering)

    in seconds
    4.496 rgba8
    4.218 dxt3
    4.216 dxt5
    4.028 dxt1a
    4.019 dxt1

    from multiple tests its seems dxt5 is always marginally faster than dxt3 (which does sorta feel right)

    btw/ the nvidia dds or photoshop seems to have troubles with dxt1a

  6. #6
    Junior Member Regular Contributor
    Join Date
    Oct 2003
    Location
    Hamburg, Germany
    Posts
    117

    Re: dxt3 or dxt5?

    The naming for the DXT formats is unintuitive. This may be easier to understand:

    - DXT3 is for high frequency alpha (masks, patterns)
    - DXT5 is for low frequency alpha (clouds)

    - if you use DXT3 for clouds, you'll see banding, because of the 4 bit resolution

    - if you use DXT5 for patterns, the shape is not preserved inside a 4x4 pixel block

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •