Comments (10)
@GhostlyDark I checked that problem. GLideN64 dumps only 3 of 4 textures because it calculates the same Rice CRC for two textures. GLideN64 texture CRC is different for them, so native textures work correctly. It can be a bug in GLideN64 implementation of Rice CRC calculation. I tried to dump textures with Rice plugin to check that. Unfortunately, I can't find these textures among dumped ones. Could you try to dump these textures with Rice and if it makes correct dump, attach it to the task?
from gliden64.
Rice exhibits the exact same issues.
from gliden64.
@GhostlyDark , thanks! So, it's not a problem with implementation of Rice CRC, it is problem with Rice CRC itself.
The only way to solve it is to somehow modify CRC calculation.
I can suggest the following solution:
- add new dump mode: "dump with strong hash".
- if some textures dumped incorrectly with vanilla RiceCRC, texture artist uses alternative dump mode.
Texture format remains the same, only checksum in texture name will be different. - During textures load, graphics plugin will first try to load HD texture as usual, with RiceCRC.
If load fails, the plugin calculates alternative CRC and tries to load HD texture with it.
This way we keep compatibility with existing HD packs and solve problems like this one.
Such a modification is easy to add to other graphics plugins.
The necessary condition is existing of 32bit hash, which is stronger than RiceCRC32 one.
Such hash really exists. GLideN64 currently uses XXH3_64bits_withSeed for texture checksum calculation.
It returns 64bit hash. We need a 32bit one for compatibility with Rice format.
I checked the "Cerebral Bore crosshair" case. XXH3_64bits returns different hashes for textures, where RiceCRC32 fails and return the same. The results remain different even just being cast to uint32. We can also xor higher and lower 32 bits to be sure in the result.
If this solution sounds acceptable, I can implement it.
from gliden64.
Sounds good to me.
from gliden64.
@GhostlyDark
I created PR: Add "Use strong CRC for texture dump" option. #2820
All textures for "Cerebral Bore crosshair" dumped correctly with strong CRC and plugin can load them as HD textures.
Texture dumps stored in "strong_crc" sub-folder when this option is enabled.
I also added a hotkey to switch it on/off, so you may switch between dump modes without using the config dialog.
Please try that build and tell me, what should be added or changed for texture artists convenience.
from gliden64.
This works really well and addresses similar issues, like #2798.
Used some mindless upscaling for testing, the strong_crc
is needed for I
, .
and :
.
#2317 is at least partially fixed. The numbers in the VS Record screen are still busted, which is probably unrelated to this, as the Rice dumps differ. I updated that issue with some info and a savestate, in case you want to check it out.
Resident Evil 2 has issues with differently colored text overwriting, which is also fixed with this new option.
The hotkey is really handy and I don't have an issue with the current implementation. The location of the strong_crc
folder is fine and makes it easy to sort out the files, although it can look a bit cluttered. Not sure if it'd be better to have it in Internal ROM Name/strong_crc
or Internal ROM Name/GLideNHQ_strong_crc
or something similar, but I don't have hard feelings either way.
from gliden64.
Thanks for the feedback!
Not sure if it'd be better to have it in Internal ROM Name/strong_crc or Internal ROM Name/GLideNHQ_strong_crc or something similar, but I don't have hard feelings either way.
The plugin builds path to dumps folder and passes it to GLideNHQ library. The library adds internal name to the path and builds the full file name. To build path as "Internal ROM Name/GLideNHQ_strong_crc", I need to pass "strong_crc" flag to the library. It could be done, but I had decided to add as little changes to library's interface as possible. If the current location of the strong_crc folder looks cluttered, I'll fix it.
from gliden64.
I think going the route of doing as little changes as possible is better, so keeping it the way it is right now should be fine.
from gliden64.
It was not hard to change and the changes in the library interface were minimal - I just added txfilter_dmptx_strong function.
from gliden64.
Fixed via ded38f8
from gliden64.
Related Issues (20)
- GlideN64 NEW ADD HOT 9
- corrupted textures
- Banjo-Kazooie: Some textures from texture pack not loading in Mupen64Plus HOT 6
- [QUESTION] How does the performance hack called "Disable Framebuffer" work? HOT 5
- Super Mario 64: Can't read text HOT 1
- GLideN64 works fine with frontend, but crashes UI console HOT 1
- Non-zero default framebuffer is completely overridden at certain points
- native res factor when fbemu disabled HOT 1
- Hotkeys don't work on Linux HOT 1
- [Bug] TxHiResNoCache doesn't work for games with colon : HOT 1
- [Glitch][Android] Famista64 : Background become bluescreen. Please see attached movie. HOT 5
- GLideNUI/ConfigDialog: Qt issue with argc/argv HOT 3
- Feature Request: Add video Options from VICE? HOT 2
- Mip Map support for High resolution texture packs. HOT 23
- Dumping textures issuse HOT 2
- Quake 64 hirestextures don't show up after using gliden64 cache extract and cygwin HOT 1
- Geometry problem with romhacks? HOT 3
- question about buffer swap HOT 2
- Weird bug – Not displaying blue but only when using "paint" overlay? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gliden64.