How to ReadPixel from a DDS Texture?

My project contains a model-viewer and a material-viewer which are belong to different engines.

I use readPixel to share Texture from model-viewer to material-viewer. When I share a texture who is download from a .dds file, chrome throw a warning and the numbers of array are all zero.

How could I fix it or does there any better way to share texture from engine to another one?:face_holding_back_tears:

Unfortunately if the DDS is compressed you will have to first copy it to an uncompressed texture format (using a render to texture) and then readpixels from the new texture

1 Like

Thank you for your reply! Does there any way to check one texture is compress or not?

Yes:) texture.type should give you that information!

1 Like

get√, thank you for your help!

1 Like