Tomatosoup

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?

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.