How to find color value of pixel (compress texture)?

Texture File Format DDS.
P = Point UV coordinate, arbitrary.

Looking for a simple none-taxing way to get actual rgba value of the texture at P without using additional canvas or scene.

I don’t think there is an easy way to do this since you have to perform the same decompression which is normally (automatically) performed on the GPU. I’ve never seen an implementation for this in JavaScript.[0].data and also have raw data as string.
I guess, I need a parser or find the file structure.

Any idea how to normalize UVs.

You’ll need to use the GPU to decompress the texture data, and this requires rendering it to a canvas using WebGL. Whether you use your existing canvas/scene/renderer for that, or new ones, is up to you.

There are many different types of compressed textures (even within DDS there are several), and I’ve never seen a decoder implemented in JavaScript for any of them, sorry!

1 Like

OK, thax, not worth perusing