-
Notifications
You must be signed in to change notification settings - Fork 594
How to create Graphic Packs
Graphic packs are like upscaling 3D in emulators but with more features. Anyone can make one (assuming they have the necessary know-how) and users can download and install them. In the options of Cemu, individual graphic packs can then be enabled or disabled. Additionally, multiple graphic packs can be active for the same game as long as they don't interfere with each other, and different games can be activated at the same time. You can mix and match according to your own personal preference.
What graphic packs are able to do:
- Change the game's internal resolution
- Increase the resolution and quality of shadows
- Modify or remove post-processing effects
- Workarounds for graphic bugs until there's a proper solution
- Change lighting related aspects of the game
- Custom Anti-Aliasing
- Better LOD Bias
- Modify game files
- Run 30fps games in 60fps (via Cemuhook)
- Modify aspect ratio (via Cemuhook)
- And much more...
From a technical standpoint, graphic packs allow the following:
- Overwrite certain texture properties (like the resolution)
- Overwrite shaders (very powerful since almost everything that gets drawn on the screen uses shaders)
- Replace game files (such as replacing Link with Zelda)
- Modify game code (via Cemuhook)
A graphic pack is a folder with the the name of the game. This graphic pack repository exclusively uses pascal case, suffixed by the graphic packs function, separated by an underscore. For example: NameOfGame_Resolution
.
It'll always need to have a rules.txt
included with this. Optionally, this folder can also contain custom shaders (files ending with _vs.txt
or _ps.txt
) or a patches.txt
file (which are used by Cemuhook).
This is the core file of any graphic pack, since rules.txt contains information about the graphic pack, the games it is applied to. Optionally, you can also find presets or texture redefines here that can modify texture properties. Everything after a #
character is considered a comment. There's also the singular vsyncFrequency
rule, which is used in some graphic packs that deal with framerates.
An example from a section of a resolution pack
[Definition]
titleIds = 00050000101C9300,00050000101C9400,00050000101C9500
name = Resolution
path = "Minecraft: Wii U Edition/Graphics/Resolution"
description = Changes the game's resolution.
version = 3
[Preset]
name = 1280x720 (Default)
$width = 1280
$height = 720
$gameWidth = 1280
$gameHeight = 720
[Preset]
name = 3840x2160
$width = 3840
$height = 2160
$gameWidth = 1280
$gameHeight = 720
# TV Resolution
[TextureRedefine]
width = 1280
height = 720
formats = 0x0000001a,0x00000011,0x00000820
overwriteWidth = ($width/$gameWidth) * 1280
overwriteHeight = ($height/$gameHeight) * 720
There are the four sections: [Definition]
, [Preset]
, [Control]
and [TextureRedefine]
. Let's take a closer look at each one of these.
name | description |
---|---|
titleIds | List of one or multiple titleIds (unique game indentifier) which are used to determine for which games this pack is active. |
name | Name which appears in Cemu's "Graphic packs" window. Setting it to a short, identifiable name is recommended. (ex: Resolution) |
path | Path which appears in Cemu's "Graphic packs" window. Setting it with the game's name is recommended, followed by it's category and name, all separated by slashes (ex: "The Legend of Zelda: Breath of the Wild/Graphics/Resolution") |
description | The description of what the pack does. |
version | Version 3 is used since Cemu 1.13.0 and must always be set. |
name | description |
---|---|
name | The name of this preset, which appears in this graphic pack's preset dropdown in Cemu's "Graphic packs" window. |
$[variable] | A set variable for the preset. Can be width, height, scale multiply, bloom strength, etc. (ex: $width, $height, $multiply, $strength). You can have multiple variables in each preset of course. |
name | description |
---|---|
vsyncFrequency | Sets the VSync frequency to any value that you want. |
name | description |
---|---|
width | The width of the texture that you want to modify. |
height | The height of the texture that you want to modify. |
formats | The formats of the textures must match any of these ('0x' prefix denotes hexadecimal format, can contain multiple formats separated by comma). |
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. |
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. |
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. |
overwriteHeight | Like filter settings you can omit individual overwrite settings. This allows to selectively overwrite the height but not the width etc. |
Texture Name | Code |
---|---|
R8_UINT | 0x101 |
R8_SNORM | 0x201 |
R8_SINT | 0x301 |
R4_G4_UNORM | 0x002 |
R16_UNORM | 0x005 |
R16_UINT | 0x105 |
R16_SNORM | 0x205 |
R16_SINT | 0x305 |
R16_FLOAT | 0x806 |
R8_G8_UNORM | 0x007 |
R8_G8_UINT | 0x107 |
R8_G8_SNORM | 0x207 |
R8_G8_SINT | 0x307 |
R5_G6_B5_UNORM | 0x008 |
R5_G5_B5_A1_UNORM | 0x00a |
R4_G4_B4_A4_UNORM | 0x00b |
A1_B5_G5_R5_UNORM | 0x00c |
R32_UINT | 0x10d |
R32_SINT | 0x30d |
R32_FLOAT | 0x80e |
R16_G16_UNORM | 0x00f |
R16_G16_UINT | 0x10f |
R16_G16_SNORM | 0x20f |
R16_G16_SINT | 0x30f |
R16_G16_FLOAT | 0x810 |
D24_S8_UNORM | 0x011 |
X24_G8_UINT | 0x111 |
D24_S8_FLOAT | 0x811 |
R11_G11_B10_FLOAT | 0x816 |
R10_G10_B10_A2_UNORM | 0x019 |
R10_G10_B10_A2_UINT | 0x119 |
R10_G10_B10_A2_SNORM | 0x219 |
R10_G10_B10_A2_SINT | 0x319 |
R10_G10_B10_A2_SRGB | 0x419 |
R8_G8_B8_A8_UNORM | 0x01a |
R8_G8_B8_A8_UINT | 0x11a |
R8_G8_B8_A8_SNORM | 0x21a |
R8_G8_B8_A8_SINT | 0x31a |
R8_G8_B8_A8_SRGB | 0x41a |
A2_B10_G10_R10_UNORM | 0x01b |
A2_B10_G10_R10_UINT | 0x11b |
D32_FLOAT_S8_UINT_X24 | 0x81c |
X32_G8_UINT_X24 | 0x11c |
R32_G32_UINT | 0x11d |
R32_G32_SINT | 0x31d |
R32_G32_FLOAT | 0x81e |
R16_G16_B16_A16_UNORM | 0x01f |
R16_G16_B16_A16_UINT | 0x11f |
R16_G16_B16_A16_SNORM | 0x21f |
R16_G16_B16_A16_SINT | 0x31f |
R16_G16_B16_A16_FLOAT | 0x820 |
R32_G32_B32_A32_UINT | 0x122 |
R32_G32_B32_A32_SINT | 0x322 |
R32_G32_B32_A32_FLOAT | 0x823 |
BC1_UNORM | 0x031 |
BC1_SRGB | 0x431 |
BC2_UNORM | 0x032 |
BC2_SRGB | 0x432 |
BC3_UNORM | 0x033 |
BC3_SRGB | 0x433 |
BC4_UNORM | 0x034 |
BC4_SNORM | 0x234 |
BC5_UNORM | 0x035 |
BC5_SNORM | 0x235 |
If there's any questions, you can always ask in the official discord's #gfx_packs channel.