8x was overkill, and 4x is a tad unstable especially with 1.16.1 with texture allocation issues. Current pack settings will be reset back to 100% size due to preset naming changes.
Should fix the native anti-aliasing preset most importantly, but since I ported all of the packs now the script "watermark" is at least a proper sentence, heh.
Also, I fixed the porting scripts. Basically, there were a bug in the verification script that wouldn't check if the uf_* variables matched and the conversion script also had a fun bug where it wasn't automatically fixing an incorrect order of the uf_* variables. So that basically made both of them slip through. Both are now fixed however.
Don't know if it's needed to check the previously ported graphic packs to see if the error affected those, but it might not hurt.
3 unverified shaders, although one of them already had the Vulkan stuff in them. Can't find where the other two are.
280351fcf8e5949f_0000000000000000_vs
6d9067fd20086bc0_0000000000000000_vs
Seems like something in the script isn't fixing the order of the glsl variables automatically, though the error ("This shader (with the current [preset name]) doesn't follow the uf_* variable order from Cemu itself, so it might've been messed with.") still got displayed.
Before I fix this problem with the script tomorrow (should be fine to continue to convert packs, just don't ignore the error thinking that it would be automatically fixed for now), I though that I would send this hotfix.
Xenoblade Chronicles X packs are now ported too! Which has, after BotW, the most shaders I think made by all of the efforts from getdls. All shaders were successfully verified and tested in-game (from what I could tell).
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.
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
Both had some weird stuff going on which the Vulkan converter couldn't successfully compile. Also, the presets in the anti-aliasing might be nice, but they are not even used in the shader 🤔.
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.
Resolves https://github.com/slashiee/cemu_graphic_packs/pull/400 since this is a self-made addition since I noticed several other things that I'd like to have been tweaked, plus it wasn't symmetrical and had weird names for the added presets.
Reverts everything except main viewports. Seems most below 480
eventually gets used and breaks objects later in game. 1280x720 1 -> 5
stable so far.. But keeping an eye on that one.
As of Cemu 1.15.12b, the textureSrcResolution (textureSrc_Resolution not texture_SrcResolution) uniform used by internal/external resize shaders still gives the native resolution of the game even when a resolution gfx pack is active.
We can just ask for texture resolution ourselves in the shaders as a workaround.
Also removed the version indicator in Windwaker's contrasty file since any updates to that number would remove all the configuration set by the user for that pack.
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?
* Update and rename Enhancements/BreathOfTheWild_!AntiAliasing/0f2b9ee517917425_00000000000003c9_ps.txt to Enhancements/BreathOfTheWild_AntiAliasing/0f2b9ee517917425_00000000000003c9_ps.txt
Removed the need for the extra shader4 extension and other fixups
* Update and rename Enhancements/BreathOfTheWild_!AntiAliasing/f14bb57cd5c9cb77_00000000000003c9_ps.txt to Enhancements/BreathOfTheWild_AntiAliasing/f14bb57cd5c9cb77_00000000000003c9_ps.txt
Removed the need for the extra shader4 extension and other fixups
* Update 59df1c7e1806366c_00000000000003c9_ps.txt
Improved Native AA and Removed the need for the extra shader4 extension and other fixups
* Update rules.txt
Setup Nvidia FXAA as Default as is the best looking.
* Update rules.txt
Setup Nvidia FXAA as the Default Preset as it's the best looking.
* Rename Enhancements/BreathOfTheWild_!AntiAliasing/rules.txt to Enhancements/BreathOfTheWild_AntiAliasing/rules.txt
Re-adds custom shaders removed in red-sky fix as enhancements
Initial commit is likely broken on some resolutions and Intel GPUs
To-do Detecting res from shader instead of variables and new shader
dumps
Baseline is: Works on nvidia. Intel/AMD/3dfx/Integrated GPUs, not my
problem.
Re-adds custom shaders removed in red-sky fix as enhancements
Initial commit is likely broken on some resolutions.
Will need further fixes detecting res from shader instead of variables
and new shader dumps
Baseline is: Works on nvidia. Intel/AMD/3dfx someone else will need to
fix
White balance better matched to actual histogram.
*Neutral closer to original look, jwhite balanced bloom
*Cold, tweaked to be neutral cold , not just blue shadows
i really broke the colors when trying to port over the latest clarity version to it and thus it really does not look good. if it were to be brought back, it should have the clarity shader from botw properly ported
* Update and rename Resolutions/TropicalFreeze_Resolution/patches.txt to Resolutions/DonkeyKong_TropicalFreeze_Resolution/patches.txt
Fixed up game name
* Rename Resolutions/TropicalFreeze_Resolution/rules.txt to Resolutions/DonkeyKong_TropicalFreeze_Resolution/rules.txt
fixed up game name
* Rename Resolutions/DonkeyKong_TropicalFreeze_Resolution/patches.txt to Resolutions/DonkeyKongTropicalFreeze_Resolution/patches.txt
name fix
* Rename Resolutions/DonkeyKong_TropicalFreeze_Resolution/rules.txt to Resolutions/DonkeyKongTropicalFreeze_Resolution/rules.txt
name fix
* Update rules.txt
Korok Forest Hetsu Menu Fix
* Update rules.txt
Korok Hetsu Menu Fix
* Update 0f2b9ee517917425_00000000000003c9_ps.txt
Inventory aa slight upgrade
* Update f14bb57cd5c9cb77_00000000000003c9_ps.txt
small fix up
* Rename Enhancements/TropicalFreeze_!AARemoval/10ccf0cc1234d069_00000000000003c9_ps.txt to Enhancements/DonkeyKongTropicalFreeze_-AARemoval/10ccf0cc1234d069_00000000000003c9_ps.txt
name fix
* Rename Enhancements/TropicalFreeze_!AARemoval/bafe6c9c37bfca4d_00000000000003c9_ps.txt to Enhancements/DonekyKongTropicalFreeze_-AARemoval/bafe6c9c37bfca4d_00000000000003c9_ps.txt
name fix
* Rename Enhancements/DonekyKongTropicalFreeze_-AARemoval/bafe6c9c37bfca4d_00000000000003c9_ps.txt to Enhancements/DonkeyKongTropicalFreeze_-AARemoval/bafe6c9c37bfca4d_00000000000003c9_ps.txt
name fix
* Rename Enhancements/TropicalFreeze_!AARemoval/rules.txt to Enhancements/DonkeyKongTropicalFreeze_-AARemoval/rules.txt
name fix
* Delete 497a209b49886520_0000000000000000_vs.txt
not needed hopefully
* Update and rename Enhancements/XenobladeX_!AARemoval/59df1c7e1806366c_00000000000003c9_ps.txt to Enhancements/XenobladeX_AntiAliasing/59df1c7e1806366c_00000000000003c9_ps.txt
Proper Native AA and FXAA
* Update and rename Enhancements/XenobladeX_!AARemoval/rules.txt to Enhancements/XenobladeX_AntiAliasing/rules.txt
presets yeah baby
This is just using the values from the old pack. from what i can tell, most of the pack does the job anyway; adding this preset ends up making the game a little darker
Also made some bug fixes with it.
* Update 0f2b9ee517917425_00000000000003c9_ps.txt
Small improvement to fxaa inventory.
* Update f14bb57cd5c9cb77_00000000000003c9_ps.txt
Major Update to World FXAA. Super Smooth.
* Update rules.txt
Slight changes.
* Update f14bb57cd5c9cb77_00000000000003c9_ps.txt
Fxaa Improved final
* Update rules.txt
had a negative number in High Contrasty which created a cemu log error
* Update 0f2b9ee517917425_00000000000003c9_ps.txt
Resolution pack Inventory AA
* Update f14bb57cd5c9cb77_00000000000003c9_ps.txt
Resolution pack World AA
* Update 0f2b9ee517917425_00000000000003c9_ps.txt
AA Pack
* Update f14bb57cd5c9cb77_00000000000003c9_ps.txt
AA Pack
* Update rules.txt
AA Pack
Fixed up Inventory Native AA and FXAA World AA
* Delete disabled_58b8411478181d7f_0000000000000079_ps.txt
not needed
* Delete disabled_58b84124c01721ff_0000000000000079_ps.txt
not needed
* Update 0f2b9ee517917425_00000000000003c9_ps.txt
Inventory AA Fixup for 1080p by rounding up
. Anything between 720p-1080p (1.0-1.5) would get rounded down to 1.0 and therefore messy/fuzzy inventory especially in 1080p. The reason it got rounded down is because all the vector data types are initialized as integers instead of normal floats for accuracy.
* Update rules.txt
Added 1600x900 resolution per request, that resolution no longer glitches out due to cemu workaround. We may never know now lol.