DDS textures
Blitz3D Forums/Blitz3D Programming/DDS textures
| ||
Can someone tell me what's the point of DDS textures (especially in Blitz) as opposed to png/jpg/bmp? |
| ||
From what I've learned in these forums: Faster execution, loading time Lower quality |
| ||
DDS is a compressed format so takes up less space in vram. |
| ||
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. |
| ||
You can also save your own mips with DDS meaning you can overcome B3Ds crappy filtering and get much clearer texturing in the distance. |
| ||
Also, you have nicer (more rounded) smoothing of masked texture edges. |
| ||
And you can't use TextureBuffer() function for DDS textures ;) ps. compressed... |
| ||
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? |
| ||
..actually a significant increase in framerate, and with mipmaping set nicely, even faster.. |
| ||
Really good stuff to know. If it's significant, I may test the FPS by converting my 2048 * 2048 Terrain Bitmap to DDS. |
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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? |
| ||
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 |