Reducing texture sampling
Texture sampling is at the core of all memory bandwidth costs. The fewer textures we use, and the smaller we make them, the better. The more we use, the more cache misses we are likely to invoke, and the larger they are, the more memory bandwidth is consumed transferring them to the texture cache. Such situations should be simplified as much as possible to avoid severe GPU bottlenecks.
Even worse, sampling textures in a non-sequential order would likely result in some very costly cache misses for the GPU to suffer through. So, if this is being done, then the texture should be reordered so that it can be sampled in a more sequential order. For example, if we're sampling by inverting the x and y coordinates (for example, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access