Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Approximately how many individual 2048 x 2048 RGBA textures can a modern graphics card handle?

Discussion in 'General Graphics' started by Ne0mega, Mar 31, 2021.

  1. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    745
    Ive seen lots of "answers" on line, but they are all very "it is quite complex, depends on what you are doing"

    Lets say skinned mesh renderers, all active and visible at once. Each character has a 2048 normal and 2048 albedo, standard lit shader.

    Are we talking dozens? Hundreds? Thousands? When does texture memory start to falter?

    I am oft surprised by modern day hardware (I had been using 5 - 10 year old computers before I started this project), so I don't want to limit my thinking on what is possible based on underestimation of CPU and GPU power.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    DXT5 (aka BC3) or BC7 are both compressed RGBA image formats that use a fixed 8 bits per pixel. That means a single 2048x2048 texture uses 4 MB, or more realistically about 5.3 MB when using mip maps.

    A modern GPU has several gigabytes of memory, and mesh data doesn't take up a ton of space. So something like your average 6 GB Nvidia GTX 1060 can handle over 1000 2048x2048 RGBA textures and still have room left over for the GPU memory needed for rendering the game and at a few tabs of Chrome in the background.

    Basically you're going to be hitting the limits of just rendering enough stuff to use all of those unique textures before you run out of texture memory.

    Now if you disable mip maps, you're going to be running into memory bandwidth limitations first. Part of the magic of mip mapping is most of the time the GPU isn't using the 2048x2048 version of the textures. It's all sitting in the GPU's memory, but most of the time the GPU just has to read the smaller mip map version when actually rendering saving a ton on memory bandwidth. And if you enable texture streaming you can have even more textures on the GPU since it won't load the full resolution versions of the textures onto the GPU until they're needed.
     
    lilacsky824, AcidArrow and Ne0mega like this.
  3. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    745
    Nailed it again @bgolus, even enough to explain the mipMaps (Ive been researching them as well this week, so I understand the 4/3rds thing).

    Even better, the actual answer (1000 and then some) is better than I hoped for. I was thinking couple hundred at best, 32 - 64 at worst. I love being 20 years in the future from when I started learning Blender.

    Anyways thank you again.