Any guide or tips for using rite texture compression on different platform for optimization?
Select Compressed
and the build pipeline will select the best compression for the target platform.
DXT5 for high profile? DXT1 for Reach
DXT1 is for textures with no alpha channel. DXT5 allows alpha values. The difference between Reach and HiDef graphics profiles is that Reach requires the textures to be a power of two (POT) in width and height, but not necessarily square.
The texture compression selected by the content build pipeline is
- Desktop (Windows DirectX, DesktopGL): DXT1 for fully opaque textures, DXT5 for textures with alpha, specialized DXT3 for SpriteFont textures.
- iOS: PVR, with fallback to 16-bit (Bgr565 or Bgra4444) if the textures is NPOT (not power-of-two) and square.
- Android: ETC1 for fully opaque textures with fallback to Bgr565 for NPOT (due to PowerVR chipsets in some Android device), Bgra4444 for textures with alpha
Out of curiosity, how much of a difference does this make? It’s mainly for space-saving right?
Yup it is. I’m sorry but I cannot give you numbers right now (maybe someone else can), but as far as I understand it saves mem on the GPU which is a great thing.
And since the algorithm is supported by the GPU itself, it’s really very fast.
But of course you have quality loss (not much really) since it’s not lossless.
Just found these:
https://blogs.msdn.microsoft.com/shawnhar/2008/10/28/texture-compression/
Texture compression typically has savings of 8:1 to 4:1 depending on the specific compression used. It saves a few things. File size on disk. Less data to load. Less memory used on the GPU. Fewer GP texture cache misses at render time. There is some loss in quality, but that’s a trade-off for the other benefits.
Ah, so actually if there’s a lot of texture swapping going on this could increase performance.
Thanks guys. I was actually unaware of how this worked. I had mistakenly assumed that on your video card its all the same.
is there any better texture compression format for normal map? For unity they use DXTnm. i found this link just for sharing.
https://blogs.msdn.microsoft.com/shawnhar/2008/10/30/dxt-compression-for-normalmaps/
MonoGame could support DXTnm fairly easily, because the compression tool that’s used for DXT compression supports DXTnm (see ApiDocumentation · castano/nvidia-texture-tools Wiki · GitHub).
DXTnm requires special handling when sampling the normal though, so we’d have to clearly document that.
@11110 If you’re interested in the feature, feel free to open an issue on GitHub