Hi!
Long shot to post this here, but maybe someone will be able to shed some light on this fact =)
In my company, we’re making program with unity there thousand of photo are flying around the user and you can navigate throught them. All that for museum, so custom machine and known hardware.
And of course, stumble across some performances problem
Du to two fact :
- Each quad where a photo (texture) is put is an independent quad : no static batching
- Each Texture is different so no material batching…
Other fact, the texture are not necesserly power of two.
So in basic OpenGL this will be easy to make smooth : Upload everything in VRAM (we got big VRAM computer card) create a lots of quad, and go.
But in Unity, du to the complexe optimisation of the engine toward Video Gaming, it start to shutter, mainly it seems because it unload Texture from VRAM when the quad become invisible.
- So is there a meaning to tell Unity : just don’t unload this texture from VRAM, keep it there?
And looking at these considerations, i’ve stumble across some fact that I’ll be interested in understanding =)
First of all, a non power of two occopy a lot more VRAM than it’s power of two counter part. A texture that shoudl occupy 1 MB on VRAM occupy 5 MB (no mipmap generation enabled). I’m aware that texture will be padded to be power of two in VRAM, but even padded, that shouldn’t be that much. Does Unity make a power of two copy too?
I understand that my question don’t concern the core public of Unity, that is oriented toward game, but I just want, for a learning purpose, to understand a bit how the engine is handling all that under the hood =)!
Thanks!