I’ve been reading on the performance implications of texture sampling, but I’m still really confused.
First of all, the most basic of questions: how much does it really matter nowadays?
A simple terrain system with triplanar mapping would have 4 “materials” being blended, with 3 necessary samples each for the triplanar effect, times the number of textures per material, let’s say 3 (albedo, normals, orm). That’s 36 total texture fetches. That sounds like a lot. Is that a lot? I mean, it’s definitely a lot, but what can you even do about this? Would this be unreasonable for any hardware that isn’t super high end?
But then I read multiple forum threads where bgolus mentions that sampling can be done in parallel, implying a bit that sampling 1 time or 16 times will have around the same performance, as long as they’re done in different samplers and it doesn’t overload the memory bandwidth. I trust bgolus’ posts more than I trust the bible, so there’s definitely something here, but I can’t find any more information about this online.
Please enlighten me. I’m working on a custom terrain shader for generic meshes that would require a very high amount of texture fetching. And I really don’t get what could be the performance implications of it in the long run. I’m really stressing over this trying to optimize everything, but I’m not even sure if this will matter and I might be wasting my time.
I’d highly appreciate any help. Thanks a lot in advance!