☑ Disable PlayCanvas warnings in the JavaScript console about NPOT Textures

Hello,

We are using a lot of non POT textures and for each one loaded we get a warning like this:

WARNING: Invalid address mode in V set on non power of two texture. Forcing clamp to edge addressing.

Is there a way to disable those warning as the console.log is literally flooded? :slight_smile:

Hi,

You can get rid of this warning by setting all non-POT textures to Clamp in the Address U and Address V settings on the texture.

At the moment you will still get a warning about linear address mode. This is because we need to allow you to disable mipmap generation (which only works with POT textures). But this should cut down the number of warnings by 2/3rds

That is good, @Dave, it worked! And indeed most of the warnings are gone.

Thanks,

Hi, dave. I got this warnings, too. But I don’t know how to set all non-POT textures to Clamp in the Address U and Address V settings on the texture. Could you describe a little more detail ? Thank you in advance.

Engine should not complain about it and simply set appropriate UV settings if texture is NPOT.

Hi @WingUNO

To get rid of the second and third warnings you need change the Address U and Address V options for the texture asset. To do this, select the texture in the asset panel and modify the settings in the right hand panel

Thank you for your patience. Should I set this properties to all textures ?

In my project, there’re a lot of textures and just only two warnings were printed. So why some of them will caused warnings but the others had no warnings ? How can I figure out what the Address U, the Address V and the Fitering exactly mean ?
There’s another puzzle, what the non-POT means ?
Thank you !

Ah, non-POT means “non-Power Of Two”. Powers of Two are: 1,2,4,8,16,32,64,128,26,512,etc

Some features of WebGL require the texture to be a power of two so by default we resize texture to POT when you upload them. But you can disable this on the import settings.

It is only non-POT textures that create these warnings. So you only need to change the setting on those textures. You only need to change the Address U and Address V settings you can leave Filtering as Linear.

Ah, got it. Thank you very much !:grinning: