But now done properly! Basically, a bunch of improvements were made to the script. The previous attempt at this conversion was quickly followed by a rollback since I realized that the script was overlooking certain things that made most of the packs hit or miss whether they would work. A few things missing were:
- It only tested the values from 1 preset. Now, each shader gets compiled per each preset, like what Cemu would do. It also merges the changes done for each preset into one. This should solve cases where one shader would define things separately or repeatedly from preset to preset.
- All* of the shaders are tested to see if they use the converter used the right values for the locations for Vulkan.
Both of these *should* mean that they should both compile and be linkable in Vulkan, which means that I don't have to test each individual shader to see if they work. I will release the two scripts (one used for converting, one used for checking the right values for the locations) tomorrow so that other people might be able to help, if they want. It's fairly straightforward now at least.
* Organize workaround graphic packs
Pretty hard to organize these correctly, but according to our discord discussion, this was the best layout from a bunch I proposed, together with some suggestions.
* Add V4 converter script and instructions on how to use it
Now everyone BotW is done and all of the bugs have been kinked out using it (hopefully...), here's the release of the converter script in all of it's very badly coded glory. I hope I didn't leave too much debug glory in there...
Also, I hope that I didn't make too many grammatical mistakes in the instructions, but hopefully it's easy enough to follow.
Detected some faulty presets with my script, since logging these kind of issues make sense. Doing these separately since otherwise the big commit will make these changes invisible.
Since it's not possible to update 300+ shaders manually and automation was possible, I thought that I'd take the honor and create a script that's able to automatically convert all of the shaders to be cross-compatible with Vulkan. And change the graphic pack versions to version 4 of course.
Also, the script has some nifty testing code which compiled every shader as OpenGL and Vulkan, but for that see the details that I've written below.
**Here's the script that I've made to do all of this. No manual edits were needed:**
https://gist.github.com/Crementif/8d98a855b95f219d95298fb3db99deae
Since I wanted to make sure that I didn't broke the shaders after converting the shaders to Vulkan, we need to check if all the shaders weren't broken. Since we're talking about like 400 shaders checking all of them is pretty much impossible and even then,
So, the obvious solution was to automate the checking. Not as simple as you'd think, because in 300 of our shaders we use preset variables which without replacing the value like Cemu does, will make the shader error regardless. So I also implemented some functionality that would read the preset values and types out of the rules.txt file and replace them in the shaders using that information. And then we use Khronos' glslang to compile the shaders, using both OpenGL and Vulkan.
The result was that glslang found quite a few errors in some of the shaders, which I fixed in this commit. I'm considering adding this rules.txt parsing and automated shader compilation testing to the build process.
Also, I fixed Clarity's name and description since Monochromia isn't available anymore and Xenoblade's resolution pack had a lot of weird blank lines before their #version declaration, which my converter didn't like.
With Cemu 1.15.12 's gl_PointCoord support, night stars now have proper (varying) alpha value. Should be no need for workaround anymore, just scale its size accordingly.
Add: Scaling of world map
Add : 16:10 resolutions
Add : x2 SSAA vert res for 21:9, 48x9
Fix : Better alpha for x2 Subres, rounds to native x2 if possible
The game re-applies a cropped 1280x400 background in order to create the fading on the inventory borders. Not resizing it causes the background especially Link and items he is holding to become blurry and aliased mid-screen with two cutoff lines. This rule was present in pre-1.14 rules.
Also updated the skylander game's statuses in the list.
They did do some optimizations. Also, the music is so god damn repetitive, I think I've listened 1 hour of what felt like a 30 second music loop...
Still an improvement over the 720p resolution even though most of it is hand-drawn. The assets are actually far more higher-resolution then the game renders them at.
Removed the resolution ratio indicators since it's not needed if there's no other aspect ratio resolution available, also removed the disclaimer about not being able to change them on the fly since Cemu warns you via it's interface already when you change a preset on rules.txt with texture redefine's
Probably the easiest version 3 resolution pack to make! No viewports with some margin or half-res stuff, 2 formats for all of it's rendering (doesn't even blur by downscaling viewports)...
Also added a shader edit for the background, just because. This game is also pretty cool.
Previously wouldn't show puzzle pieces in the level selection screen.
The texture that would also need to be scaled is 0x033 which is a compressed texture which can't be scaled, so removing this filter was the only option. But this was mostly pointless anyway since the GUI is also just images which won't really become sharper.
Issue reported by Nathan in the discord.
* Update rules.txt
Added some new 019s for scope and camera, and removes the very small 01a as they arent needed. Minimized the texture cache debug options rules mismatch error to 1, rather than a whole bunch. And chasing that one leads only to breaking graphics.
Accidentally applied a suggested fix to the wrong game. Reverted that and applied it to the correct game. Also changed the description of the performance pack slightly so that people know what it does. Could probably be more conclusive about what it does. Looks like a regular shadow resolution pack to me.
TPHD QL tweaks aka, sunday gaming delayed
Resolution
* Sharper, unscaled blur fixed. See contrasty note
* Resolutions 4k and above scale sub viewports 75-> 50% of the main res.
7680x4320 is now 30 fps stable on a 1070, SSAA looks sweet.
* Added some off-aspect custom res with horizontal res x2. Good for SSAA
fixing shimmering as it's mostly horizontal in TPHD
Contrasty
* Sharper, unscaled blur fixed. Note, contrasty must be pre-selected at
start to override same shader in resolution folder
* Minor tweaks to cold setting
Fancy FX
*Added option to disable blur, just keeping other tweaks active.
Realized that half scaling sub-view port mostly replaces fancy fX :/
*Tweaked to somewhat scale, tries to emulate original look by default.
Ie 4x res = 4x blur "qualitative look" (not the same as nr of passes)
*Added "defocus" looks blurrier by scaling incorrectly, masked by more
draw passes. This is similar to the old default
Not happy about the results of moving blur from res folder, too many
drawbacks as quality of scaling really needs to be per-setting.
Will probably deprecate if things start to break again. Maybe global
variables in the future?
Website has a new look with some advanced functionality! Feel free to give feedback though! If you want to provide or know a FAQ and an answer to that, let me know and I'll add it.
Also, updated Bruz clarity preset and added ViskClarity as a preset.
Plus a small little bugfix, which closes https://github.com/slashiee/cemu_graphic_packs/pull/320 since otherwise there would've been a merge conflict.