Jump to content

  • Log In with Google      Sign In   
  • Create Account


What makes using high-res textures slower?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 DanielKruyt   Members   -  Reputation: 250

Like
0Likes
Like

Posted 06 October 2013 - 10:20 AM

Hi there,

I'm trying to figure why high-resolution textures seem to cook GPUs more than low-res ones. Is it the fact that you need to do more memory reads per texture and therefore use more bandwidth? If that is the case, surely, when the triangle being rasterized is taking fewer pixels of the screen, performance should increase?

Thanks,
Daniel Kruyt



Sponsor:

#2 Juliean   GDNet+   -  Reputation: 2330

Like
3Likes
Like

Posted 06 October 2013 - 10:39 AM

I'm not an expert, but "more memory reads" in form of a higher number of textels that needs to be read, is definately not the case. Yes, a triangle that is further away and smaller does indeed increase performance, since less pixels need to be rasterized. You'll notice once you start to apply more complicated effects like Parallax mapping and so on.

 

From my own experience, larger textures (from models) aren't a huge performance bottleneck, though I might have been simply limited otherwise. One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache, and thus avoid cache trashing (though this is mostly quessing, take it with a grain of salt). More memory bandwidth is likely to be a reason too, since if the texture is larger, it takes up more memory and thus more data has to be transfered somehow...


Edited by Juliean, 06 October 2013 - 03:01 PM.


#3 Shane C   Crossbones+   -  Reputation: 1108

Like
1Likes
Like

Posted 06 October 2013 - 04:19 PM

One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache, and thus avoid cache trashing


This is good advice. Understanding texture cache can probably gain you some performance.

#4 Bacterius   Crossbones+   -  Reputation: 8272

Like
0Likes
Like

Posted 06 October 2013 - 05:38 PM

I'm not an expert, but "more memory reads" in form of a higher number of textels that needs to be read, is definately not the case. Yes, a triangle that is further away and smaller does indeed increase performance, since less pixels need to be rasterized. You'll notice once you start to apply more complicated effects like Parallax mapping and so on.

 

From my own experience, larger textures (from models) aren't a huge performance bottleneck, though I might have been simply limited otherwise. One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache, and thus avoid cache trashing (though this is mostly quessing, take it with a grain of salt). More memory bandwidth is likely to be a reason too, since if the texture is larger, it takes up more memory and thus more data has to be transfered somehow...

 

+1 but that would be cache thrashing, unless you are actually trashing your cache tongue.png


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#5 Hodgman   Moderators   -  Reputation: 28409

Like
9Likes
Like

Posted 06 October 2013 - 07:30 PM

I'm not an expert, but "more memory reads" in form of a higher number of textels that needs to be read, is definately not the case.
One of the reasons why larger textures can be slower AFAIK is because smaller ones fit better in the texture cache

Those are actually both the same issue!
When you read a texel, it (and maybe it's neighbors) are cached. More unique texels read == more pressure on the cache == more cache misses == more memory bandwidth required.

When a triangle is distant AND mipmapping is enabled, then a lower mip level is used, which means the resolution is effectively lower, so there less unique texels, so the cache works better.
If mipmapping isn't used, then distant triangles are actually huge texture bandwidth hogs! Each screen pixel is fetching texels that are far apart in the texture (e.g. A 1000px texture shown across 10 screen px will skip 100 texels per screen pixel), so the cost of fetches isn't amortized by the cache at all, and every fetch is a cache miss.

With PC GPU, there can be a HUGE difference in memory bandwidth between the high-end and low-end hardware. One card might seem to run the same speed after doubling texture resolutions, while a different card might give a 10x reduction in frame rate!

#6 MJP   Moderators   -  Reputation: 10526

Like
4Likes
Like

Posted 06 October 2013 - 09:33 PM

Increasing texture resolution usually doesn't cause a significant increase in bandwidth. If you assume that all triangles sample from a fixed number of textures per pixel, then the total bandwidth required for sampling is actually bounded by your screen resolution as long as you don't have any overdraw. In most cases the pixel shader will be magnifying texels because the texture resolution is already higher than the screen resolution for that pixel, which means that increasing the resolution of the texture will have 0 effect on the bandwidth used for that particular pixel. The only places where it will cause an increase in bandwidth will be where the pixel shader is magnifying a texture, in which case more bandwidth will be used when fetching a higher resolution mip level.On the other hand, increasing the number of textures sampled per pixel will always result in more bandwidth being used for all pixels. However static textures are almost always compressed, which generally makes standard texture mapping pretty forgiving.



#7 DanielKruyt   Members   -  Reputation: 250

Like
0Likes
Like

Posted 16 October 2013 - 09:54 AM

Hi, thanks for all the answers!

Is there anywhere that I can go to learn more about modern GPU architectures? I'm very into optimizing any and all code that I write, so I like to know as much detail about the systems I develop for as possible. Thanks for your time. smile.png



#8 Shane C   Crossbones+   -  Reputation: 1108

Like
1Likes
Like

Posted 16 October 2013 - 09:57 AM

Hi, thanks for all the answers!
Is there anywhere that I can go to learn more about modern GPU architectures? I'm very into optimizing any and all code that I write, so I like to know as much detail about the systems I develop for as possible. Thanks for your time. :)


Beyond3D (http://www.beyond3d.com/) tends to be a great starter.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS