KTX-Software
KTX-Software copied to clipboard
`ktx create` should warn about images that exceed common GPU maximum texture dimensions
This stems from issue #373. Two things needs to be done:
- Remove the artificial size limits in the JPEG decoder.
- Due to GPU texture size limits, ktx should exit with an error if no --resize or --scale option is specified and the size is greater than 16,384 and it should issue a warning if the size is > 16,384 after a --resize or --scale. It should not automatically resize. Some users may want to resize to a different size having not been aware until warned that the image was so large.
Question: should toktx
allow texture sizes > 32768. I doubt any GPU supports texture sizes larger than that.
NVIDIA GeForce 10xx and newer supports 32,768 1D and 32,768x32,768 2D textures, so why is the proposed limit 16,384?
Available VRAM gets bigger with each new GPU generation, so max texture dimensions would follow. toktx
should issue a warning on dimensions above 16,384 as it's likely the most popular limitation atm.
why is the proposed limit 16,834?
Because that is the limit on the majority of GPUs atm. The error is intended to be a hard warning that hey you need to look at this. If you've explicitly indicated the size you want then it turns into a warning. It needs an additional way to override other than resize or scale for use in the case of keeping the size as is.
@lexaknyazev does ktx create
have size limits or size warnings? Its reference page does not indicate anything.
The original spec for ktx create
does not have the warning. Seems reasonable to add it.
Thanks @lexaknyazev.