Textures use mipmap by default. But do I need image files with power of 2 dimensions? Does it need to be square (1024x1024)? Can it be rectangular as well (1024x512)?
If I use a texture atlas (large image file containing multiple textures), do I need the atlas file with PoT dimensions? Or do I need the individual textures with PoT dimensions? Both?
If I manipulate
Texture, is Babylon.js smart enough to correctly use mipmapping?
Why is mipmapping not used in GUI?
- It can be rectangular. BJS will make it work even on weblg1 by rescaling textures for you
- of course
- GUI is using canvas2D not webgl
Hello your majesty
Sorry I don’t understand, how can 2 be none, if I need rectangular PoT for 1?
Cause Babylon will rescale for you under the hood so it should not impact you to use NPOT
So I don’t need PoT images for both cases (1 and 2)?
In other words, I can always use NPoT images and BJS will still be able to use mipmapping.
Does it depend on the platform, browser, or WebGL version?
Babylon.js will check the system capabilities and will provide fallbacks if required so it is transparent for you
If I understand correctly, if the current system does not support NPoT textures, BJS will convert them to PoT textures under the hood.
getSize will return the original size of the
getBaseSize will return the PoT converted size of the
Am I correct?
I think so (but maybe the opposite like getBaseSize will return the original)
The documentation does not clearly say which 1 is which, it only says that they may give different values…
getBaseSize will return the PoT size if a conversion occurred.
Is there any way to force BJS to use PoT textures? So that NPoT textures will be converted to PoT.
Any settings I can use to achieve this in playground?
Even if not required you mean? Why that?
For testing purpose.
I am using a texture sheet and manipulating
vScale to show individual textures. After loading the texture sheet I get the size of it by using
getSize method, then calculate the offset and scale values using the size.
I am not sure if my calculations will work correctly if the textures are converted to PoT.
No worries it will be…Just try
I already know that it works if the textures are NOT converted to PoT.
I am just afraid that it may not work correctly if the textures are converted to PoT.
Hence why I want to test under the condition that all textures are converted to PoT.
You can force the engine to run on webgl1 then (EngineOptions - Babylon.js Documentation)