Find location of pixel color on texture

Is there adny possibility to find world location of specific pixel color on texture?
For example if I made red dot on texture. Can I find location of this dot in material?

What is location in this case? UV coordinate?

If this texture is tiled 4x4, you want to get all 16 locations?

If this texture have many red dots on it, you want to get all this locations or only first one?

Texture is like an array of pixels, and only way to understand is this array contains something - is to process all it’s elements, and compare them with desired colors or so.

Answering to your question - yes it is possible, but not with some standard functions and operations.

Thank you for your answer. It’s very clear.

I want to use this red dot as a marker on flipbook animation. Just like socket that I can set on every frame on animation and read location of it.
I make 2d platformers so technic like this is very promissing.

So there will be one red dot on texture. And location of this dot would change on every frame of sprite used by material.
Would that be a mess to achive this funcionality?

If I understand you correctly I Should create function that will process whole texture pixel by pixel and compare every of it to desired color on every frame and then gives me location of my dot?

Thank you once more.

Yes, and depending on texture size it can be very slow operation.

I think you need to use another approach, like add some special coords data to every frame or so. In case this is dynamic material, you can add this parameter to material, and get it in any moment.

Sorry, but I’m not very familiar with paper 2d animations.

Special coords data sounds exactly like add socket to animation. Your argument about performance close the topic. Thank you very much once more.