Getting UTexture raw pixel data

Hello,

How can I get UTexture pixel data? from x and y inputs.

The goal is to get pixel data at mouse position.

For now I got this

But then When I am getting the texture from material I have no idea how to get the pixel data from the texture.

Can anyone help me?

Guys please, any ideas?

Unfortunately it’s not super simple. Depending on the texture, and how the underlying resource was initialized, there may not be a CPU read-able copy sitting in memory. I would simply get the Texture Pointer, call “GetResource” and try to see what you have access to.