Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A better way to handle texture scale/cache
#4
Right, at least not for most textures. For simple full screen ones it might work out, but it may cost and slow down games like Tales of Phantasia X which hit the software transform path a lot and generally don't have this problem.

If the goal is just higher definition textures, maybe a better option is texture replacement. We could have definitions that allow e.g. a texture at a specific address to be replaced, or even to specify the size of bytes at that address to hash. That is:

Code:
auto replacements = replaceMap.find(cacheKey); if (replacements != replaceMap.end()) { std::map<u32, u32> hashes; for (auto replacement : replacements->second) { if (hashes.find(replacement.size) == hashes.end()) { hashes[replacement.size] = ReplaceTexHash(texaddr, replacement.size); } if (hashes[replacement.size] == replacement.hash) { SetReplacedTexture(replacement); return; } } }

But that would naturally be a very high-maintenance (for humans, not meaning code) way of maintaining replaced texture sets.

-[Unknown]
Reply


Messages In This Thread
RE: A better way to handle texture scale/cache - by [Unknown] - 06-18-2014, 11:04 PM

Forum Jump: