How can I get and set pixel data in XNA?

I have a 2D texture where I want to get the color of the specified pixel. Do something with it and add a new color to another 2D texture.

I will need to do this with all texture pixels. How can i do this.

No pixel shaders, please. It should be in C #

+3
source share
2 answers

The class Texture2Dcontains GetDataand SetDatathat should do exactly what you want.

+2
source

I found my problem.

, Alpha 0. , . , Alpha 255.

, , jpg. Jpg Alpha.

0

Source: https://habr.com/ru/post/1733062/


All Articles