Tomatosoup Posted September 18, 2018 Share Posted September 18, 2018 I'm rendering the content of some PNG's via a 4096 by 4096 RenderTexture, to cram all of it in the GPU memory, for scrolling usage. As each column should be 1024 pixels wide I can store a maximum of 16384 pixels of height to scroll through. I use 4096 as width and height because of http://webglstats.com/webgl/parameter/MAX_TEXTURE_SIZE But what to do if I want more than 16384 pixels to scroll through in one go? Suddenly realised: Should I just use some extra texture(s) of 4096 by 4096? It looks like a maximum of 8 textures is a safe bet: http://webglstats.com/webgl/parameter/MAX_TEXTURE_IMAGE_UNITS Or is there a better approach? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 18, 2018 Share Posted September 18, 2018 1 drawcall can contain MAX_TEXTURE_IMAGE_UNITS. for PC 200 DC is fine, for mobiles 50DC. However, of you render only visible parts (set "renderable" property for those objects) , you'll need only 1-4 textures on screen, right? Tomatosoup 1 Quote Link to comment Share on other sites More sharing options...
Tomatosoup Posted September 18, 2018 Author Share Posted September 18, 2018 12 minutes ago, ivan.popelyshev said: 1 drawcall can contain MAX_TEXTURE_IMAGE_UNITS. for PC 200 DC is fine, for mobiles 50DC. However, of you render only visible parts (set "renderable" property for those objects) , you'll need only 1-4 textures on screen, right? Ah, didn't know that it was only about drawcalls, that limitation. And yes, I certainly don't need much more than 1-4 textures on-screen! Thanks again! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 18, 2018 Share Posted September 18, 2018 Its performance limitation. Every texture change spends some time idling. Also, every Graphics or TilingSprite or Mesh cant be drawn in a batch, so they will always consume 1 drawcall, and its even worse: they change shader. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.