I'm looking at using the 'savetopng' method of the texture2D class to draw out custom textures. My problem is that my viewport is quite small (the application runs in a window) and the textures will often times run off the screen up to the maximum texture size of 2048px. If I know the texture size ahead of time am I able to instead create an array larger than the visible screen area. Or will the fact that the pixels are outside the viewport mean that they are not being rendered and as a result won't have the correct values?
The easier is to test it... :)
but yes... you can...
the texture maximum size is 2048x2048 or 4096x4096 depends on the profile,
you can use a array in CPU memory to fill it,
Color colors = new Color[2048x2048] Texture.SetData(colors);
and save to png method is no related to viewport.
The savetopng method copies the texture from the graphics card into a specified file in png format. The view port has nothing to do with it. The textures may be smaller or larger than the actual window. So the answer is yes.