Updated Texture Replacement (markdown)

Connor McLaughlin 2024-09-27 15:43:24 +10:00
parent 014974199f
commit 399f83ed72
1 changed files with 21 additions and 5 deletions

@ -38,9 +38,13 @@ Direct textures won't have any of the palette fields. Replacements can be in `pn
Due to the edge cases mentioned above, and the fact that some of the dumping methods have negative impact for other games, you may find you need to alter the system configuration for some games. A `config.yaml` file is created when texture dumping is first activated for a game in its `textures` directory, with the following options:
### DumpTexturePages
Enables texture page dumping mode. Instead of tracking VRAM writes and attempting to identify the "real" size of textures, entire 256x256 pages will be dumped/replaced instead. In most games, this will lead to significant duplication in dumps, and reduce replacement reliability. However, some games are incompatible with write tracking, and must use page mode.
Instead of tracking VRAM writes and attempting to identify the "real" size of textures, create sub-rectangles from pages based on how they are drawn. In
most games, this will lead to significant duplication in dumps, and reduce replacement reliability. However, some games are incompatible with write tracking, and must use page mode.
### DumpC16Textures
### DumpFullTexturePages
Dumps full texture pages instead of sub-rectangles. 256x256 pages will be dumped/replaced instead. Generally not useful.
### DumpC16Textures
Enables the dumping of direct textures (i.e. C16 format). Most games do not use direct textures, and when they do, it is usually for post-processing or FMVs. Ignoring C16 textures typically reduces garbage/false positive texture dumps, however, some games may require it.
### ReducePaletteRange
@ -52,15 +56,27 @@ Converts VRAM copies to VRAM writes, when a copy of performed into a previously
### MaxVRAMWriteSplits
Determines the maximum number of times a VRAM write/upload can be split, before it is discarded and no longer tracked. This is required for games that partially overwrite texture data, such as Gran Turismo.
### MaxVRAMWriteCoalesceWidth / MaxVRAMWriteCoalesceHeight
Determines the maximum size of an incoming VRAM write that will be merged with another write to the left/above of the incoming write. Needed for games that upload textures one line at a time. These games will log "tracking VRAM write of Nx1" repeatedly during loading. If the upload size is 1, then you can set the corresponding maximum coalesce dimension to 1 to merge these uploads, which should enable these textures to be dumped/replaced.
### DumpTextureWidthThreshold / DumpTextureHeightThreshold
Determines the minimum size of a texture that will be dumped. Textures with a size smaller than this value will be ignored.
### DumpVRAMWriteWidthThreshold / DumpVRAMWriteHeightThreshold
Determines the minimum size of a VRAM write that will be dumped, in background dumping mode. Uploads smaller than this size will be ignored.
### ReplacementScaleLinearFilter
Enables the use of a bilinear filter when scaling replacement textures. If more than one replacement texture in a 256x256 texture page has a different scaling over the native resolution, or the texture page is not covered, a bilinear filter will be used to resize/stretch the replacement texture, and/or the original native data.
### Aliases
Use this section to define replacement aliases. One line per replacement texture, with the key set to the source ID, and the value set to the ID used in place of the source. For example:
Use this section to define replacement aliases. One line per replacement texture, with the key set to the source ID, and the value set to the filename which should be loaded as a replacement. Aliases can be used when duplicate textures are dumped and need replacing with a single image.
For example, without the newline, or keep the multi-line separator.
```yaml
Aliases:
# Alias-Texture-Name: Path-To-Texture
texupload-P4-AAAAAAAAAAAAAAAA-BBBBBBBBBBBBBBBB-64x256-0-192-64x64-P0-14: |
texupload-P4-BBBBBBBBBBBBBBBB-BBBBBBBBBBBBBBBB-64x256-0-64-64x64-P0-13.png
texupload-P4-AAAAAAAAAAAAAAAA-BBBBBBBBBBBBBBBB-64x256-0-192-64x64-P0-14: mytexture.png
```
texupload-P4-AAAAAAAAAAAAAAAA-BBBBBBBBBBBBBBBB-64x256-0-192-64x64-P0-14 = texupload-P4-BBBBBBBBBBBBBBBB-BBBBBBBBBBBBBBBB-64x256-0-64-64x64-P0-13
```