Skip to content

How to create resolution packs

Michael edited this page Jul 19, 2021 · 6 revisions

Preparations:

  1. Make a new folder that'll contain your graphic packs rules.txt and various other files.
  2. Create a rules.txt and add the following content to it's header:
[Definition]
titleIds = [Insert the title ids for each region/version of the game here, you can probably take this from an already existing old graphic pack (https://github.com/slashiee/cemu_graphic_packs)]
name = [Name, shown above the description when clicked on]
path = [Name of game/category(Graphics/Enhancements/Modifications...)/aspect that it changes (we use "Resolution" for resolution packs, and so should you ;))]
description = [Basic description of the pack. Also discuss any possible bugs or effect that the different presets might have (not needed for a graphic pack)]
version = 7
  1. Add the resolutions presets. These basically define variables that can be used in an expression. For simplicity I won't be going into full detail of these but know that you might need to "type" the variables if you use it for something other then the overwriteWidth and overwriteHeight options. Just don't worry about them. We usually just copy paste the presets from another pack if we're going to make a resolution pack, but if it's a different kind of type you'll need to check those same-ish packs respectively. You could copy them from our existing Breath of the Wild graphic pack. Make sure that you set the gameWidth and gameHeight resolutions accordingly if you've got a 1080p game, most of native resolutions can be found on our graphic packs website.

That's basically all the preparation 👍 !

Steps:

  1. First of all, you'll want to track down the texture's "physical address". Using tools like Nsight which allows you to see each render step and texture if you pause the frame (this program actually works on AMD too). If you don't have those tools, you can still do it with some trial and error and some smart guessing that you'll likely need to use anyway (using the texture information tool and the texture dump option). If you think you've found the physical address of the texture in the "Texture Information" debug window (listed here as "PhysAddr") (the "active" checkbox at the bottom will probably help you a lot, be warned that it might miss textures though, but for viewports it should be fine), you'll need to check if that texture (let's say for example a typical 640x360p half-res texture with a texture format of 0x816) has been "accessed" as a different resolution(s) (the rule is that it's the same resolution+multiples of 8's added to that as a sorta "padding" to one or both sides). That resolution would share the same physical address but not the resolution (or texture format). In this case we find another resolution 640x368p with the same texture format. Write both of the specifics down of both of these textures or make a screenshot so that you'll remember them and don't lose progress :)

  2. Now that we've got atleast 1 texture group as I like to call them, you can add them via the new expression system to the rules.txt you've prepared under all our presets sections:

[TextureRedefine]
width = [insert the width we found of the first texture]
height = [insert the height we found of the first texture]
formats = [specify your format of your first texture. You might have an easier experience if you skip this whole line but you should only do this with a simple game since it might touch other unwanted values in more complex situations]
overwriteWidth = ($width/$gameWidth) * [insert the width we found of the first texture] !!! Beware that $width and $gameWidth reference our variables that we've defined for each preset. The basic calculation we do here basically creates a scale factor which we multiply with our first texture's width and height
overwriteHeight = ($height/$gameHeight) * [insert the height we found of the first texture] !!! Same as above but then for height, keep an eye out to not confuse height and width resolutions or forget to modify these variables here.

... !!! We copy the same code for each member of our texture group and change it's format, width, height, overwriteWidth and overwriteHeights. In our case that would be only 1 extra rule, but this varies greatly. You might even find only a single member.
  1. If you've done that, you can enable the graphic pack and check in-game to see if you've scaled the resolution of this pack correctly or if you need to scale more "texture groups" by repeating the steps above. If you see, for example, in the right top corner of the screen a weird texture, then it's very likely that you'll need to find this texture (group) too and also scale that.

  2. Is the game finally fully upscaled (you can check quickly by pressing shift+printscreen when the game is running and paste your clipboard into paint or whatever and check the picture's size. Don't forget to enable your graphic pack and double check everything). Everything's still good? Consider sending a pull request or share the pack in the #gfx_packs channel in our discord where it may be uploaded.

For any additional information, please refer to the graphics pack page.

Clone this wiki locally