Babylonjs decrasse the quality of images

Hello , when I load a GUI image, the image is blurred and the quality becomes very bad, as if it is compressed, any solution to keep the good quality of the image ?

Is your texture use power of two dimensions?

Mostlikely stretching, but a PG would help :slight_smile:

A PG will DEFINITELY help :slight_smile:

“décrasse” :smiley: yeaah !

I want everyone to holler power of 2. Power of 2 repeatedly. If you are going to develop software using a GPU, then you must understand how the computer chip processes. Remember it is only a process of zeros and ones - and this process retains memory. Thus when you throw an image which is non-power of two at the GPU, it must do much additional processing.

Always remember 8X8, 16X16, 24X24, 48X48, 64X64, 128X128, 256X256, 512X512, etc… if you don;t know this already then I fear for the future as WebGL 2.0 accepts any resolution and processes them a bit faster. But you’re GPU will be slower not knowing this as this is the way of the world.

Galen

To complete, here someone who did the maths, and from Intel tips:

I’ve written about this often, and worry about the use of non power of two images in WebGL 2.0… as this is already implemented. As I wrote in a recent post, please remember that a GPU processes in 0 or 1; and that this should always be considered. Therefor, if your image resolution is not the same in X and in Y the image needs to be continuously resolved to a power of two texture. This will task your GPU continuously. Thus I recommend using any 2D program to set your texture resolution at a power of two (This doesn’t mean equal, but at 16, 32, 64, 512, etc…) as this is what your processor does when you don’t set these values in advance. But your processor has to do this continually and this uses up so many resources.

Please learn about your hardware and how it processes data. This will cover most of the questions on the forum.

Good post by the way…

Galen