Jump to content

How to use GPU memory during scrolling?


Recommended Posts

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...