An NPOT texture is a texture whose dimensions are not powers of 2 (hence the name — Non-Power-Of-Two).
For example, the following textures are NPOT:
And these are POT (power-of-two):
So, POT textures must have the sizes from the following list: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, etc.
Why NPOT texture are bad for real-time 3D?
Older hardware/browsers, which support only WebGL 1.0 standard, do not handle NPOT textures well. For example, you can't use advanced filtering on them. Hence, all such textures will be resized to nearest power-of-two dimensions (e.g 1000x1000 will become 1024x1024). This will result to:
- Increased app loading time, because texture convertion takes time.
- More memory consumption.
- Reduced texture quality.
Newer hardware/browsers do support NPOT textures, however it's still not recommended to use them:
- NPOT textures occupy more GPU memory.
- Rendering of NPOT textures might be significantly slower (on some devices).
- There might be visible texture filtering artifacts (on some devices).
So the general idea behind all these:
Avoid using NPOT textures in Verge3D applications!