I suppose the it should not work this way.
There is clearly enough memory to store the wide Texture2D (200x200 = 40.000)
And RenderTexture of the same resolution was created just fine. Am i missing something?
The most strange thing is that these wide textures were successfully created for a couple of days for me.
And suddenly i started getting this error.
Edit:
After some experimenting i found that the limit is exactly 16384 (power or two)
Yeah, today we clamp max Texture2D sizes to 16384. Since that’s a common “max supported limit” on many GPUs & graphics APIs. Do you have a GPU that can do larger textures, and are using a graphics API that supports larger?
I tried too look up what is the texture size limit in my GPU but without success.
My specs:
GT-650m (laptop)
DirectX 10
Windows 7 64-bit
However i did use a texture 19705x1 and it work without any trouble both as Texture2D and RenderTexture.
I used this texture to calculate vertex positions for skinning and then applied these position in vertex shader. If something was wrong i would immediately notice it visually. Alas with clamping it can no longer work.
Btw why would you clamp Texture2D but leave RenderTexture as it is?
As this is graphic card (driver?) specific (and I presume cards may support less than 16384) is there a query for the value through Unity? (something like OpenGL’s glGetIntegerv(GL_MAX_TEXTURE_SIZE, …))
Madc9ke, can you map pixels to a 2d texture? Fix the width at 256 (that shouldn’t waste too much) and do a multiply by 1/256, fract is the x uv and trunc mul 1/the height is the y coord perhaps?
Most likely. If you want to support mobile at all, you wouldn’t go any larger than 2024x2024. I don’t know what a good number would be for most desktop GPUs in this day-and-age, but they all have an upper limit on how big a texture they can handle at once and you probably wouldn’t want to limit your game to only player with expensive hardware.
Yes, absolutely. Even on modern GPUs the largest texture you can really use is 16385x16384. You can split it up manually into smaller tiles, or you can try using something like this: https://docs.unity3d.com/Manual/SparseTextures.html
If you really need that for some reason (using ridiculously large content provided by the user at runtime?) you likely will find some external image processing library which can do that. However a platform-independent solution will be tough.