1 | 1 | Uploaded a new patch... So basically I've given a good look at the code and it seems like Myconid was actually doing the caching to some extent, only he did it in a way that I think was pretty convoluted. The above patch does basically the same thing in a simpler to read way. It caches only the first sampler, not the other ones (which Myconid's did) but there is less overhead for other things so it balances that. The lag caused by binding texture is completely irrelevant anyway as it's incredibly small compared to the cost of actually rendering the models ( < 1%). It could however be updated to cache all textures but I'm not sure how interesting that would be since sorting is only done against the first texture (could speed up trees, perhaps). |