- Home /
Steps in Texture2D after writing values to an array
I'm getting "steps" in my texture after I
Write it to an array of floats using Texture2D.GetPixel in a for-loop
Doing my algorithm on the GPU (receives the image with steps)
Writing to an new image with Texture2D.SetPixel - EncodeToPNG - File.WriteAllBytes
Even leaving out step 2, so just reading to an array and writing to a new texture, results in a texture with steps. Tested with a very smooth Gradient.
How can I avoid this? I really need a perfect representation of the input Texture2D in an array (my algorithm is calculating flow on it). Currently it screws everything up just because of these steps...
In the attachement is the result of just step 1 and 3 on an initially perfectly smooth gradient.
Your answer
Follow this Question
Related Questions
GetPixel optimisation 2 Answers
Getting inverted Y axis from Texture2D.GetPixel() 2 Answers
Find a colour in a Texture2D 1 Answer
Unity crashes trying to get pixels and using Debug.Log 0 Answers
GetPixel in c# 1 Answer