Hey folks,
so I have this super simple example code that runs fine on the **editor** but behaves weird on a **build**:
// _tex is a 2D Texture with mipmap displayed on left quad
leftQuad.material.mainTexture = _tex;
// Create a texture without a mipmap
var tex = new Texture2D(_tex.width, _tex.height, _tex.graphicsFormat, 0, TextureCreationFlags.None);
// copy full resolution texture (mip 0) and show it on right quad
Graphics.CopyTexture(_tex, 0, 0, tex, 0, 0);
rightQuad.material.mainTexture = tex;
----------
Te result looks like this:
![alt text][1]
----------
In other words: whenever I try to access `_tex.mip[0]` it behaves as if it was `_tex.mip[1]` meaning the mip with only half the width/height. I have tried this in a **compute shader**, using `GetPixels` and using `Graphics.CopyTexture`as above. Always the same result!
----------
I have tested all this using:
- Unity 2020.2.3f1
- Unity 2020.2.2f1
Any idea? Help would be highly appreciated.
[1]: /storage/temp/175439-copytexture-result.png
↧