We will be releasing an update to the PlayCanvas Engine which requires textures to be recompressed.
When the PlayCanvas Engine was created many years ago, it adopted the convention that textures have their origin at the bottom left of the texture. This is the standard used by OpenGL and many modelling tools like Blender and Maya.
However WebGL and glTF adopted a different standard and consider a texture’s origin to be top left.
Up until now this has meant the PlayCanvas Engine must flip textures vertically at load time in order to render correctly. Since it is not possible to flip compressed textures at load time, the PlayCanvas backend has been creating vertically flipped textures instead.
We are now working on an update to the Engine which will make it consistent with WebGL and glTF. This will simplify the engine going forward and in some cases speed up load times.
This means that existing projects containing compressed textures must be re-compressed otherwise textures will appear upside down.
We will be adding a popup message to the Editor and single button to recompress all textures in a project. See below for a mock up:
This should make the transition reasonably straightforward for you. You simply have to wait for all textures to recompress (and that time will depend on how much compressed texture data exists in your project).
If you generate UV coordinates at runtime you will have to ensure texture V coordinates are correctly flipped. For example you can add the following to your shader:
texCoord.y = 1.0 - texCoord.y;
This also applies to custom shader chunks. Specifically, if you have custom versions of the following chunks, you will need to ensure the V coordinates are correctly flipped:
We intend to deploy this update on Monday 19th July. Please let us know ASAP if you have any concerns or questions.