|
| ▲ | flohofwoe 3 days ago | parent | next [-] |
| I assume parent means "import" as in "asset pipeline import", not importing at game start. Using hardware-compressed texture formats will actually speed up loading time since you can dump them directly into a 3D API texture without decoding. |
|
| ▲ | charlie90 3 days ago | parent | prev | next [-] |
| i did some casual testing before of a png vs a compressed texture and its like 20x faster, so yes a big difference. most of the speedup is from not needing to calculate mipmaps since they are already precalculated. |
|
| ▲ | midnightclubbed 3 days ago | parent | prev | next [-] |
| If you’re compressing at load-time it can be a lot. You can do a quick and dirty compress to BC1-3 (assuming you are on PC) in a few tens of milliseconds but quality will be suboptimal, higher quality will likely take a few seconds per texture and going to BC6 takes even longer but will look much better. |
| |
| ▲ | Dylan16807 3 days ago | parent [-] | | > higher quality will likely take a few seconds per texture It takes that long to do a good compression on the format that interpolates 2 colors for each 4x4 block? Huh. | | |
| ▲ | midnightclubbed 3 days ago | parent | next [-] | | It’s not entirely trivial (if you care about texture quality) you’re choosing 2 endpoints in 3d space that can be linearly interpolated to values that best fit 16 points in 3d space. I may have been a little off with saying seconds per texture but it’s definitely non trivial amounts of time. And ects (mobile) and BC7 are certainly still not something you want to compress to at game load-time. Some comparisons of texture compression speeds for various formats (from 2020 but on a 12core i9):
https://www.aras-p.info/blog/2020/12/08/Texture-Compression-... | |
| ▲ | exDM69 2 days ago | parent | prev | next [-] | | It's an open ended optimization problem. You can get bad results very quickly but on high quality settings it can take minutes or hours to compress large textures. And the newer compression formats have larger block sizes from 8x8 to even 12x12 pixels. ASTC and BC7 are a different beast to the early texture compression formats. You can get pretty awesome image quality at 2 bits per pixel (and slightly less awesome at less than a bit per pixel). | | | |
| ▲ | hrydgard 3 days ago | parent | prev [-] | | BC1-3 are like that, but BC7 is far, far more complex. The search space is huge. |
|
|
|
| ▲ | cout 3 days ago | parent | prev [-] |
| I have no idea how things are done today but in the opengl 1.x era multiple textures would sometimes be stored in a single image, so to get a different texture you would pick different texture coords. |