How do .DDS file get replaced in Shadow of the Tomb Raider and other games (DX11)?
Apologies for raising an issue, but not sure what other means I can use to contact you.
I am trying to playing around with replacing .DDS files in Shadow of the Tomb Raider, unfortunately I'm on Linux and using the native port from Feral (which runs Vulkan and is their engine): I can't just leave dxgi.dll in there and then that would be pre-loaded, I will need to replace something similar.
I don't mind coding and I'm up for this, but I'm not very familiar with the modding scene and would like some pointers. First of all this is my understanding of what your great plugin does with DX11 games (in case of texture replacements of course, it does much more):
- scans the custom .DDS files and stores the filenames in a list of custom files
- it intercepts the DXGI APIs which load .DDS files
- gets an hash of such file (CRC32 or CRC32C - what is the latter?)
- if found in the list of custom files, uses the custom .DDS when returning to the caller
- this in effects would let plug in custom textures
They say it only works when running DX11 because I would imagine the DX12 API is not the same/nor easy to do the same. Am I correct?
Now, onto my specific issue, not sure what I should do next?
- intercept the low level open, fopen, open64 and fopen64?
- when those read a .tiger file (how SotTR manages compressed data), intercept the contents through read and replace?
- Hope they they use a library such as gli, and hoping they have compiled in dynamic mode, intercept the calls to such library (apparently wouldn't be easy to tell, this library is headers only...)?
Not quite sure about any of this - was just hoping from some guidance from you!
Thanks again for your awesome work!