Add info for 'unknown usage', info on customize output shader, R8_UNORM format

NAVras-Z 2019-07-25 16:52:34 +00:00
parent 26ec94559e
commit 0b18f19adc

@ -66,6 +66,25 @@ overwriteWidth = ($width/$gameWidth) * 1280 # This basically calculates a modifi
overwriteHeight = ($height/$gameHeight) * 720 overwriteHeight = ($height/$gameHeight) * 720
``` ```
### Customize output shader
Since 1.15.2 it's possible to customize the output/scale shader.
Works by putting a fragment shader with a fixed file name in the gfx pack folder:
upscaling.glsl (for upscaling)
downscaling.glsl (for downscaling)
output.glsl (if you want both in one)
There are new settings in rules.txt to toggle texture filtering between nearest and linear _**when a custom shader is provided**_.
```ini
[OutputShader]
upscaleMagFilter = NearestNeighbor
downscaleMagFilter = Linear
```
Default is Linear.
## Usage of each section ## Usage of each section
There are the four sections: `[Definition]`, `[Preset]`, `[Control]` and `[TextureRedefine]`. Let's take a closer look at each one of these. There are the four sections: `[Definition]`, `[Preset]`, `[Control]` and `[TextureRedefine]`. Let's take a closer look at each one of these.
@ -95,21 +114,23 @@ There are the four sections: `[Definition]`, `[Preset]`, `[Control]` and `[Textu
|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| width | The width of the texture that you want to modify. | | width | The width of the texture that you want to modify. |
| height | The height of the texture that you want to modify. | | height | The height of the texture that you want to modify. |
| depth | The depth of the texture that you want to modify. Applies to 2D array textures, cubemap arrays (the number of layers in the array) and 3D textures. For everything else it's always 1. |
| formats | The formats of the textures must match any of these ('0x' prefix denotes hexadecimal format, can contain multiple formats separated by comma). | | formats | The formats of the textures must match any of these ('0x' prefix denotes hexadecimal format, can contain multiple formats separated by comma). |
| formatsExcluded | If any of the filter settings above are omitted they are not evaluated. This allows you to write a rule that, for example, only filters for the width of a texture but not the height. |
| tilemodes | Allowed texture tiling modes. Similar to 'formats' parameter, can contain multiple entries. 1 is linear aka no tiling, a strong indicator for direct CPU access to a texture. |
| tileModesExcluded | "tileModesExcluded = 1" Skips CPU-generated textures like video frames, generally used by videos (ex. Xenoblade Chronicles X, Bayonetta 2). |
| overwriteLodBias | Overwrites the game's lod bias. Typical valid values are in range -16.0 to 16.0. | | overwriteLodBias | Overwrites the game's lod bias. Typical valid values are in range -16.0 to 16.0. |
| overwriteRelativeLodBias | Add value to game's lod bias rather than overwriting it. Typical valid values are in range -16.0 to 16.0. | | overwriteRelativeLodBias | Add value to game's lod bias rather than overwriting it. Typical valid values are in range -16.0 to 16.0. |
| depth | Unknown usage |
| tilemodes | Unknown usage |
| formatsExcluded | If any of the filter settings above are omitted they are not evaluated. This allows you to write a rule that, for example, only filters for the width of a texture but not the height. |
| tileModesExcluded | Skips CPU-generated textures, generally used by videos (ex. Xenoblade Chronicles X, Bayonetta 2). |
| overwriteFormat | Replaces all the formats under this resolution (unless included/excluded via formats/excludeFormats) with the one defined here. | | overwriteFormat | Replaces all the formats under this resolution (unless included/excluded via formats/excludeFormats) with the one defined here. |
| overwriteDepth | Unknown usage | | overwriteDepth | Unknown usage |
| overwriteWidth | Like filter settings you can omit individual overwrite settings. This allows to selectively overwrite the width but not the height etc. | | overwriteWidth | Like filter settings you can omit individual overwrite settings. This allows to selectively overwrite the width but not the height etc. |
| overwriteHeight | Like filter settings you can omit individual overwrite settings. This allows to selectively overwrite the height but not the width etc. | | overwriteHeight | Like filter settings you can omit individual overwrite settings. This allows to selectively overwrite the height but not the width etc. |
## Possible formats ## Possible formats
| Texture Name | Code | | Texture Name | Code |
|-----------------------|-------| |-----------------------|-------|
| R8_UNORM | 0x001 |
| R8_UINT | 0x101 | | R8_UINT | 0x101 |
| R8_SNORM | 0x201 | | R8_SNORM | 0x201 |
| R8_SINT | 0x301 | | R8_SINT | 0x301 |