DDS textures

Blitz3D Forums/Blitz3D Programming/DDS textures

John Blackledge(Posted 2008) [#1]
Can someone tell me what's the point of DDS textures (especially in Blitz) as opposed to png/jpg/bmp?


Moraldi(Posted 2008) [#2]
From what I've learned in these forums:
Faster execution, loading time
Lower quality


Stevie G(Posted 2008) [#3]
DDS is a compressed format so takes up less space in vram.


Matty(Posted 2008) [#4]
As Stevie G says - compressed format which takes up less space in vram, as opposed to jpg/png compression which does not remain compressed in vram.


Vorderman(Posted 2008) [#5]
You can also save your own mips with DDS meaning you can overcome B3Ds crappy filtering and get much clearer texturing in the distance.


Beaker(Posted 2008) [#6]
Also, you have nicer (more rounded) smoothing of masked texture edges.


MikhailV(Posted 2008) [#7]
And you can't use TextureBuffer() function for DDS textures ;)

ps. compressed...


Tom(Posted 2008) [#8]
If my memory serves me right, you should get a slight increase in framerate when using DDS formats. I guess the hardware can decompress faster than it can read the uncompressed version?


Naughty Alien(Posted 2008) [#9]
..actually a significant increase in framerate, and with mipmaping set nicely, even faster..


Zeotrope(Posted 2008) [#10]
Really good stuff to know.

If it's significant, I may test the FPS by converting my 2048 * 2048 Terrain Bitmap to DDS.


Pongo(Posted 2008) [#11]
Quick question about the mipmaps. I've heard this before about getting better filtering results in blitz.

Do you leave the lower res versions completely out of the mipmap? Any particular tips for this? And yes, (before anyone asks) the actual texture has plenty of resolution, it's the filtering that's blurring everything for me.


I've been wanting to sharpen up my textures for a while. and this is something I've been meaning to look into.


John Blackledge(Posted 2008) [#12]
All good news it would seem - thanks for all the replies.

Sharpening - does this just happen because they are DDS, or do the Filters need tweaking?

Mikhail - thanks, warning noted.


Ross C(Posted 2008) [#13]
I don't think, because of compression, DDS is great for things like terrains and skyboxes. I haven't tested this, but i would imagine the compression artifacts (although very small), may produce results that you don't want. Mis-matching seams and such.


Mustang(Posted 2008) [#14]
For very smooth color gradients .DDS is not the best - it might produce visible banding (simple skyboxes etc). Otherwise it's the default choice for everything. You might also leave full-screen menu backgrounds uncompressed because speed is not needed but HQ visuals are.


John Blackledge(Posted 2008) [#15]
Ah, so the sharpening Pongo mentioned is more general, not about DDS.

Thanks for the warnings, I'll test DDS against PNG which I've found best so far.
But is the bottom line here the idea that DDS are handled better memory-wise?
Or is it that they are just held and used while compressed in memory, as opposed to JPG, PNG which are loaded compressed but decompressed into memory?


Tom(Posted 2008) [#16]
They are held compressed in memory, hardware on the GPU can decompress in realtime.

My original usage tips:
If your texture does not have an alpha use mode DXT1
If your texture has a 1 bit mask, use mode DXT1a
If your texture has a smooth gradient alpha, use mode DXT5