Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A better way to handle texture scale/cache
06-23-2014, 01:27 PM
Post: #8
RE: A better way to handle texture scale/cache
(06-18-2014 11:04 PM)[Unknown] Wrote:  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]

Looks like a nice functionality to add to ppsspp, does dolphin do it that way too? is someone working on it?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: A better way to handle texture scale/cache - YaPeL - 06-23-2014 01:27 PM

Forum Jump: