From 549758507f714618dc31c3529ce6b5e52a45dd3d Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Sat, 28 Dec 2019 05:55:52 +0100 Subject: [PATCH] Update BotW packs for Vulkan (#411) 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. --- .../15afdae4307b9a3d_0000000000000000_vs.txt | 35 +- .../e06e20b2efe87a84_0000000000000000_vs.txt | 35 +- Enhancements/BreathOfTheWild_!NoAO/rules.txt | 2 +- .../cb0e6e8cbec4502a_0000000000000079_ps.txt | 27 +- Enhancements/BreathOfTheWild_!NoDoF/rules.txt | 2 +- .../0f2b9ee517917425_00000000000003c9_ps.txt | 42 +- .../f14bb57cd5c9cb77_00000000000003c9_ps.txt | 42 +- .../BreathOfTheWild_AntiAliasing/rules.txt | 2 +- .../49ce4bf04a654e80_00000003c9249749_ps.txt | 48 +- .../8ff2cf86e789335f_00000003c9249749_ps.txt | 48 +- .../BreathOfTheWild_ReflExtra/rules.txt | 2 +- .../22c410044398c7af_0000000000000000_vs.txt | 35 +- .../2a2f55a2b2d64474_0000000000000000_vs.txt | 35 +- .../88133ee405eaae28_000003c000009269_ps.txt | 42 +- .../ffe0e8c84f6e8da9_000003c000009269_ps.txt | 42 +- .../BreathOfTheWild_Shadows/rules.txt | 2 +- .../8d24f32f18e6de47_0000000079249749_ps.txt | 48 +- .../Botw_AmiiboMode/rules.txt | 2 +- .../2f7ecb9f0022d8ca_0000000000000001_ps.txt | 28 +- .../314b77345f06369b_0000000000000000_vs.txt | 39 +- .../314b77349f0636db_0000000000000000_vs.txt | 39 +- .../314b7734df06371b_0000000000000000_vs.txt | 39 +- .../Botw_CelShadingRemoval/rules.txt | 2 +- .../57cecf2ed6c8e3f0_00000003c9249749_ps.txt | 50 +- .../f4e1147ab34a1677_0000000000000000_vs.txt | 37 +- .../Botw_MenuWorkaround/rules.txt | 2 +- .../1c7db40ff5d693ab_001ffffe4924b249_ps.txt | 52 +- .../Botw_ShadowFix_Altros/rules.txt | 2 +- .../1c7db40ff5d693ab_001ffffe4924b249_ps.txt | 52 +- .../Botw_ShadowFix_SkalFate/rules.txt | 2 +- .../56bdb3903699990d_0000079a492a9249_ps.txt | 64 +- .../7cd50058a8f1d6dd_00001e1e1fea9249_ps.txt | 42 +- .../cc51c2b5a4fce06c_00000078787f9249_ps.txt | 38 +- .../Ancient_Armor/rules.txt | 2 +- .../5c4fc00fefe604eb_00000078787f9249_ps.txt | 38 +- .../b1b149918fac0b8d_00001e1e1fea9249_ps.txt | 42 +- .../f611e1b3827b5e13_0000079a492a9249_ps.txt | 64 +- .../Ancient_Weapons/rules.txt | 2 +- .../85d00659937443d5_000003c3c3fc9249_ps.txt | 40 +- .../Decayed_Guardian/rules.txt | 2 +- .../4e0bab929e11836f_00003cd249549249_ps.txt | 69 +- .../83573681c1fcb0ac_0000f0f0ff549249_ps.txt | 44 +- .../91b6e09da2ff63cc_000003c3c3fc9249_ps.txt | 40 +- .../rules.txt | 2 +- .../133297c9a66bfc98_000003c3c3fc9249_ps.txt | 40 +- .../Guardian_Turret_Skywatcher/rules.txt | 2 +- .../rules.txt | 2 +- .../2e2543216c04766d_0000000079249749_ps.txt | 48 +- .../bec68ec6f40a864f_00fffff249259249_ps.txt | 54 +- .../fb2e18ae56397ca7_00fffff249259249_ps.txt | 54 +- .../Botw_DistantFog/rules.txt | 2 +- .../29c30aaa023dc7e6_0000000000000709_ps.txt | 38 +- .../397f3d8521c96e30_0000000000000709_ps.txt | 38 +- .../5a8eb2055c65a0c2_0000000000003849_ps.txt | 40 +- .../Botw_HyruleCastleAura/rules.txt | 2 +- .../699b238ae15d113b_00000000000000e1_ps.txt | 36 +- .../Botw_HyruleCastleBaseFog/rules.txt | 2 +- .../1c7db40ff5d693ab_001ffffe4924b249_ps.txt | 52 +- .../Botw_NPCFog/rules.txt | 2 +- .../527591781440691a_000000000001c24b_ps.txt | 42 +- .../Botw_WorldFogFields/rules.txt | 2 +- .../6fa2baef8a4ece42_0000000000000709_ps.txt | 36 +- .../de960d36a997b34d_0000000000000709_ps.txt | 36 +- .../rules.txt | 2 +- .../0453fb7ad9cc0f79_0000000000003849_ps.txt | 38 +- .../097eac672c26b4a4_00000000000000e1_ps.txt | 34 +- .../0ce5fca5c70640d1_0000000000003849_ps.txt | 38 +- .../12fe44a2273b452c_000000000000001c_ps.txt | 32 +- .../146164991e2929e2_0000000000000709_ps.txt | 36 +- .../14f5a7cf99f2904a_00000000000000f1_ps.txt | 32 +- .../15e2d4f74a5e8445_000000000000001c_ps.txt | 32 +- .../1dd8be9054c94f4e_0000000000003849_ps.txt | 38 +- .../233a000439032e75_00000000000000e1_ps.txt | 32 +- .../266a0d760fe1ddfc_0000000000003849_ps.txt | 38 +- .../2a045e62b99640b5_00000001e1e21c49_ps.txt | 38 +- .../2a87149b7154c69d_000000000001c24b_ps.txt | 40 +- .../2f64af19b1835ab0_00000000000000e1_ps.txt | 34 +- .../319e60116b59ceec_00000001e1e1fe49_ps.txt | 34 +- .../38d70ed9280bb3bc_0000000000000079_ps.txt | 30 +- .../3d383d2d61500c9c_0000000f0f0ff249_ps.txt | 36 +- .../42c9208b54ad72ca_00000000000000e1_ps.txt | 32 +- .../458dd826bd589332_0000000000000709_ps.txt | 36 +- .../48a94cda336d2976_00000000000000e1_ps.txt | 32 +- .../4af8a4670205be4c_00000000000000e1_ps.txt | 34 +- .../4bdac25bb98f5804_0000000000003849_ps.txt | 38 +- .../5219277e990fe5ba_00000000000000e1_ps.txt | 32 +- .../5b04d28f319a1d6d_0000000f0f0ff249_ps.txt | 36 +- .../5b9b7727ca24e22b_0000000000000709_ps.txt | 36 +- .../5f4e60117b59cf65_00000001e1e1fe49_ps.txt | 34 +- .../603d7ad06d86617e_00000000000000e1_ps.txt | 32 +- .../6240983542445009_00000001e1e21c49_ps.txt | 38 +- .../64342503518ca97a_0000000000000709_ps.txt | 36 +- .../6832b00344c32a71_00000000000000e1_ps.txt | 32 +- .../687da8c1b555b262_0000000000003849_ps.txt | 38 +- .../68aa37ce58db094d_00000000000000e1_ps.txt | 34 +- .../70a79265ab7d498a_0000000f0f10e249_ps.txt | 40 +- .../70d96b85a0ce93ef_00000000000000e1_ps.txt | 32 +- .../751393d6cbcd0c76_000003c3c3fc9249_ps.txt | 40 +- .../80b87385a0d2942f_00000000000000e1_ps.txt | 32 +- .../81adf9797e4661a7_00000000000000e1_ps.txt | 32 +- .../8438998c284fe428_000000000000001c_ps.txt | 30 +- .../87790fa17c847fea_0000000000000709_ps.txt | 36 +- .../8798144a6f066e7c_00000000000000e1_ps.txt | 34 +- .../87babe7569572ff5_0000000000003849_ps.txt | 38 +- .../8836c3a20b053cf0_000000000000001c_ps.txt | 32 +- .../8d0a18894dd0c9cb_0000000000000709_ps.txt | 36 +- .../8e9e804a3cd384c3_00000000000ff259_ps.txt | 38 +- .../8fe014235f134ac1_00000000000000e1_ps.txt | 34 +- .../99122c964b6a1a19_000000000001fe49_ps.txt | 36 +- .../99fc7f42b65ca284_0000000000000709_ps.txt | 36 +- .../9aacad682248145f_0000000000000709_ps.txt | 36 +- .../9c9c75d87bb9b4ef_0000000f0f10e249_ps.txt | 40 +- .../a02a462f9ba59f2e_000000003c3c4389_ps.txt | 36 +- .../a11251f0bffe8631_000000000000001c_ps.txt | 30 +- .../a54bdb88a57b9be9_0000000000003849_ps.txt | 38 +- .../a6ea718e4c60e157_00000000000000e1_ps.txt | 34 +- .../a6eb708e4b616557_00000000000000e1_ps.txt | 34 +- .../a95fbb49ae2c8f46_00000000000000e1_ps.txt | 32 +- .../b2cf5924b04ea6a4_0000000f0f0ff249_ps.txt | 36 +- .../b2e1c9ce2f160aab_000000003c3c4389_ps.txt | 36 +- .../b5b53042daaad65c_00000001e1e21c49_ps.txt | 38 +- .../bc9529a682410603_00000001e1e1fe49_ps.txt | 34 +- .../beb15cab79e5ca5d_000000000000001c_ps.txt | 30 +- .../bee298edc2f7e315_00000001e1e1fe49_ps.txt | 34 +- .../bf72a1fd35401be2_0000079749255249_ps.txt | 60 +- .../c36b10f0e410def8_00000000000000e1_ps.txt | 32 +- .../cb27783c5e10df0e_000000000000001c_ps.txt | 32 +- .../cc9529ae1a492d03_00000001e1e1fe49_ps.txt | 34 +- .../cd1eba6802df67f7_0000000f0f0ff249_ps.txt | 36 +- .../ce76f7a67517c0b2_000000003c3c4389_ps.txt | 36 +- .../cf2e9b7aab93e342_000000000001fe49_ps.txt | 36 +- .../d178de668517df1e_000000003c3c4389_ps.txt | 36 +- .../d3ac3a61f7749326_000000000000001c_ps.txt | 30 +- .../d48de6ada1e9ad03_00000001e1e1fe49_ps.txt | 34 +- .../db8bc69330c08206_0000000000003849_ps.txt | 38 +- .../e53233e53de8434f_0000000000000709_ps.txt | 34 +- .../e95d54571be1c0a9_000000000001fe49_ps.txt | 36 +- .../f62be0d03546ec39_00000000000000e1_ps.txt | 34 +- .../fb135efcb4540fb1_00000078787f9249_ps.txt | 38 +- .../rules.txt | 2 +- .../37b9100c1310d3bb_0000000000000000_vs.txt | 33 +- .../4d58e6f0906ff5cf_0000000000000000_vs.txt | 33 +- .../75faf095372864b1_0000000000000000_vs.txt | 33 +- .../b88c6020a8b17332_0000000000000000_vs.txt | 33 +- .../f56fcbd319ceba00_0000000000000000_vs.txt | 33 +- .../f7ba548c1fefe24a_0000000000000000_vs.txt | 33 +- Mods/BreathOfTheWild_HUDRemover/rules.txt | 2 +- .../rules.txt | 2 +- .../01ba1a725afa0b96_0000000000000000_vs.txt | 26 +- .../01bef64ec0cccd53_0000000000000000_vs.txt | 37 +- .../0b9b8f5dfa16ad58_0000000000000000_vs.txt | 33 +- .../0bcd653c18367d59_0000000000000000_vs.txt | 37 +- .../0d6127fbed646d2b_0000000000000000_vs.txt | 37 +- .../0f2b9ee517917425_00000000000003c9_ps.txt | 32 +- .../141f484aff9b9f5a_0000000000000000_vs.txt | 35 +- .../15afdae4307b9a3d_0000000000000000_vs.txt | 35 +- .../1a14de8e58d5b30a_0000000000000000_vs.txt | 37 +- .../381d034349896360_0000000000000000_vs.txt | 33 +- .../44b73ce02e05c2e6_0000000000000000_vs.txt | 35 +- .../4721609a424e9a1f_0000000000000000_vs.txt | 37 +- .../5c1761d13feccdff_0000000000000000_vs.txt | 35 +- .../5c975b0e3dac0562_0000000000000000_vs.txt | 35 +- .../75a85b0cbcab764b_0000000000000000_vs.txt | 35 +- .../771e24915acbb074_0000000000000000_vs.txt | 35 +- .../81eb264a750163d9_0000000000000000_vs.txt | 33 +- .../8cab2ed476b991ea_0000000000000000_vs.txt | 35 +- .../93f16bf1d083933b_0000000000000000_vs.txt | 35 +- .../a1cb9f79d093badb_0000f0f0ff34db6d_ps.txt | 44 +- .../a5b3a5e5ab2938bc_0000000000001e49_ps.txt | 34 +- .../b4a729584b6188ea_0000000000001e49_ps.txt | 34 +- .../bb50d2ee4fa87bc2_0000000000000000_vs.txt | 37 +- .../c92c1c4c0a2fb839_0000000000001e49_ps.txt | 34 +- .../c9f2fd37115b0ee1_0000000000000000_vs.txt | 37 +- .../cb0e6e8cbec4502a_0000000000000079_ps.txt | 26 +- .../d1cf6920c3d5b194_0000000000000000_vs.txt | 35 +- .../e06e20b2efe87a84_0000000000000000_vs.txt | 35 +- .../ea9a49a6185cf1e5_0000000000000000_vs.txt | 33 +- .../f14bb57cd5c9cb77_00000000000003c9_ps.txt | 32 +- .../f69e84515ae56e70_0000000000000000_vs.txt | 35 +- .../fc3e63a2007625f8_0000000000000000_vs.txt | 33 +- .../BreathOfTheWild_Resolution/rules.txt | 2 +- .../09085793b5a9f364_00001ffe492e9249_ps.txt | 1168 +++++++++++++++++ .../45e72a252caba763_000003c000009269_ps.txt | 581 ++++++++ .../59cba7eb9a9c1df6_00000007f924d249_ps.txt | 848 ++++++++++++ .../808ba0411f6f526e_0000007ff9249a49_ps.txt | 723 ++++++++++ .../88133ee405eaae28_000003c000009269_ps.txt | 797 +++++++++++ .../9c0b7031078fba88_0000007800001269_ps.txt | 590 +++++++++ .../BreathOfTheWild_!Intel_Shadows/rules.txt | 11 + .../09085793b5a9f364_00001ffe492e9249_ps.txt | 52 +- .../45e72a252caba763_000003c000009269_ps.txt | 42 +- .../59cba7eb9a9c1df6_00000007f924d249_ps.txt | 48 +- .../808ba0411f6f526e_0000007ff9249a49_ps.txt | 48 +- .../88133ee405eaae28_000003c000009269_ps.txt | 42 +- .../9c0b7031078fba88_0000007800001269_ps.txt | 40 +- .../BreathOfTheWild_!ShadowFix/rules.txt | 9 +- .../BreathOfTheWild_AMD_ShaderCrash/rules.txt | 10 +- .../1c7db40ff5d693ab_001ffffe4924b249_ps.txt | 0 .../250cb5a06cab6534_000000000000007a_ps.txt | 0 .../29c30aaa023dc7e6_0000000000000709_ps.txt | 0 .../3179b85d41bfb80d_0000000079249749_ps.txt | 0 .../3df0bb0da1c740d5_000000000000001c_ps.txt | 0 .../59cba7eb9a9c1df6_00000007f924d249_ps.txt | 0 .../8d24f32f18e6de47_0000000079249749_ps.txt | 0 .../rules.txt | 10 + .../rules.txt | 10 +- .../rules.txt | 10 - .../8e9e804a3cd384c3_00000000000ff259_ps.txt | 38 +- .../ab0a485b9ae1bb1e_00000000000ff259_ps.txt | 38 +- .../BreathOfTheWild_KakarikoShadows/rules.txt | 9 +- .../BreathOfTheWild_LwzxNullCheck/rules.txt | 7 +- .../BreathOfTheWild_NVIDIASmoke/rules.txt | 11 - .../17aae2b035ae850c_0000000000000000_vs.txt | 0 .../2938a1b3abfdfe49_0000000000000000_vs.txt | 0 .../314c2583a1612026_0000000000000000_vs.txt | 0 .../344d8b1f7d6f2b8e_0000000000000000_vs.txt | 0 .../961cf134642327cc_0000000000000000_vs.txt | 0 .../a4f029f0b16e3776_0000000000000000_vs.txt | 0 .../b9eeedc9f6628c36_0000000000000000_vs.txt | 0 .../ea77e7f80b23e7b7_0000000000000000_vs.txt | 0 .../fc4a738a3df2bcce_0000000000000000_vs.txt | 0 .../rules.txt | 11 + .../73ddf96c9094eb92_0000000000000000_vs.txt | 77 +- .../rules.txt | 8 + .../rules.txt | 6 - docs/v4-converter/README.md | 39 + docs/v4-converter/convert-packs.js | 610 +++++++++ docs/v4-converter/verify-graphicPacks.js | 308 +++++ 227 files changed, 11002 insertions(+), 1007 deletions(-) create mode 100644 Workarounds/BreathOfTheWild_!Intel_Shadows/09085793b5a9f364_00001ffe492e9249_ps.txt create mode 100644 Workarounds/BreathOfTheWild_!Intel_Shadows/45e72a252caba763_000003c000009269_ps.txt create mode 100644 Workarounds/BreathOfTheWild_!Intel_Shadows/59cba7eb9a9c1df6_00000007f924d249_ps.txt create mode 100644 Workarounds/BreathOfTheWild_!Intel_Shadows/808ba0411f6f526e_0000007ff9249a49_ps.txt create mode 100644 Workarounds/BreathOfTheWild_!Intel_Shadows/88133ee405eaae28_000003c000009269_ps.txt create mode 100644 Workarounds/BreathOfTheWild_!Intel_Shadows/9c0b7031078fba88_0000007800001269_ps.txt create mode 100644 Workarounds/BreathOfTheWild_!Intel_Shadows/rules.txt rename Workarounds/{BreathOfTheWild_Intel_RemoveBloom => BreathOfTheWild_Intel_ExcessBloom}/1c7db40ff5d693ab_001ffffe4924b249_ps.txt (100%) rename Workarounds/{BreathOfTheWild_Intel_RemoveBloom => BreathOfTheWild_Intel_ExcessBloom}/250cb5a06cab6534_000000000000007a_ps.txt (100%) rename Workarounds/{BreathOfTheWild_Intel_RemoveBloom => BreathOfTheWild_Intel_ExcessBloom}/29c30aaa023dc7e6_0000000000000709_ps.txt (100%) rename Workarounds/{BreathOfTheWild_Intel_RemoveBloom => BreathOfTheWild_Intel_ExcessBloom}/3179b85d41bfb80d_0000000079249749_ps.txt (100%) rename Workarounds/{BreathOfTheWild_Intel_RemoveBloom => BreathOfTheWild_Intel_ExcessBloom}/3df0bb0da1c740d5_000000000000001c_ps.txt (100%) rename Workarounds/{BreathOfTheWild_Intel_RemoveBloom => BreathOfTheWild_Intel_ExcessBloom}/59cba7eb9a9c1df6_00000007f924d249_ps.txt (100%) rename Workarounds/{BreathOfTheWild_Intel_RemoveBloom => BreathOfTheWild_Intel_ExcessBloom}/8d24f32f18e6de47_0000000079249749_ps.txt (100%) create mode 100644 Workarounds/BreathOfTheWild_Intel_ExcessBloom/rules.txt delete mode 100644 Workarounds/BreathOfTheWild_Intel_RemoveBloom/rules.txt delete mode 100644 Workarounds/BreathOfTheWild_NVIDIASmoke/rules.txt rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/17aae2b035ae850c_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/2938a1b3abfdfe49_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/314c2583a1612026_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/344d8b1f7d6f2b8e_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/961cf134642327cc_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/a4f029f0b16e3776_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/b9eeedc9f6628c36_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/ea77e7f80b23e7b7_0000000000000000_vs.txt (100%) rename Workarounds/{BreathOfTheWild_NVIDIASmoke => BreathOfTheWild_Nvidia_ExplosionSmoke}/fc4a738a3df2bcce_0000000000000000_vs.txt (100%) create mode 100644 Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/rules.txt rename Workarounds/{BreathOfTheWild_removeStretchedClouds => BreathOfTheWild_Nvidia_StretchedClouds}/73ddf96c9094eb92_0000000000000000_vs.txt (97%) create mode 100644 Workarounds/BreathOfTheWild_Nvidia_StretchedClouds/rules.txt delete mode 100644 Workarounds/BreathOfTheWild_removeStretchedClouds/rules.txt create mode 100644 docs/v4-converter/README.md create mode 100644 docs/v4-converter/convert-packs.js create mode 100644 docs/v4-converter/verify-graphicPacks.js diff --git a/Enhancements/BreathOfTheWild_!NoAO/15afdae4307b9a3d_0000000000000000_vs.txt b/Enhancements/BreathOfTheWild_!NoAO/15afdae4307b9a3d_0000000000000000_vs.txt index be3cdf1a..65782166 100644 --- a/Enhancements/BreathOfTheWild_!NoAO/15afdae4307b9a3d_0000000000000000_vs.txt +++ b/Enhancements/BreathOfTheWild_!NoAO/15afdae4307b9a3d_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 15afdae4307b9a3d // Used for: Vertical Ambient-Occlusion Blur const float resXScale = 0; const float resYScale = 0; +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -70,7 +95,7 @@ R2f.w = R2f.y; R2f.y = backupReg0f + -(intBitsToFloat(uf_remappedVS[0].y))/resYScale; PS1f = R2f.y; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Enhancements/BreathOfTheWild_!NoAO/e06e20b2efe87a84_0000000000000000_vs.txt b/Enhancements/BreathOfTheWild_!NoAO/e06e20b2efe87a84_0000000000000000_vs.txt index e6309414..243eab36 100644 --- a/Enhancements/BreathOfTheWild_!NoAO/e06e20b2efe87a84_0000000000000000_vs.txt +++ b/Enhancements/BreathOfTheWild_!NoAO/e06e20b2efe87a84_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader e06e20b2efe87a84 // Used for: Horizontal Ambient-Occlusion Blur const float resXScale = 0; const float resYScale = 0; +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -73,7 +98,7 @@ R2f.w = backupReg0f; R2f.y = backupReg0f + -(intBitsToFloat(uf_remappedVS[0].x))/resXScale; PS1f = R2f.y; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Enhancements/BreathOfTheWild_!NoAO/rules.txt b/Enhancements/BreathOfTheWild_!NoAO/rules.txt index 83d5a062..1d0109d9 100644 --- a/Enhancements/BreathOfTheWild_!NoAO/rules.txt +++ b/Enhancements/BreathOfTheWild_!NoAO/rules.txt @@ -3,4 +3,4 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = "No Ambient Occlusion" path = "The Legend of Zelda: Breath of the Wild/Enhancements/No Ambient Occlusion" description = Disables ambient occlusion. Useful for stuff like the ReShade RTGI shader. Known issues: Shadowed areas can sometimes look incorrect. -version = 3 +version = 4 diff --git a/Enhancements/BreathOfTheWild_!NoDoF/cb0e6e8cbec4502a_0000000000000079_ps.txt b/Enhancements/BreathOfTheWild_!NoDoF/cb0e6e8cbec4502a_0000000000000079_ps.txt index 868abd69..a0f7b316 100644 --- a/Enhancements/BreathOfTheWild_!NoDoF/cb0e6e8cbec4502a_0000000000000079_ps.txt +++ b/Enhancements/BreathOfTheWild_!NoDoF/cb0e6e8cbec4502a_0000000000000079_ps.txt @@ -1,12 +1,35 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_arrays_of_arrays : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader cb0e6e8cbec4502a // DoF blur effect - Battle, Camera, Scope -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem3; layout(location = 0) out vec4 passPixelColor0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif const float resScale = 0; const int radius = int(2*resScale); diff --git a/Enhancements/BreathOfTheWild_!NoDoF/rules.txt b/Enhancements/BreathOfTheWild_!NoDoF/rules.txt index 4d7ebc88..3512800b 100644 --- a/Enhancements/BreathOfTheWild_!NoDoF/rules.txt +++ b/Enhancements/BreathOfTheWild_!NoDoF/rules.txt @@ -3,4 +3,4 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = "No Depth of Field" path = "The Legend of Zelda: Breath of the Wild/Enhancements/No Depth of Field" description = Disables depth of field. -version = 3 +version = 4 diff --git a/Enhancements/BreathOfTheWild_AntiAliasing/0f2b9ee517917425_00000000000003c9_ps.txt b/Enhancements/BreathOfTheWild_AntiAliasing/0f2b9ee517917425_00000000000003c9_ps.txt index 9ddb8c46..de73aa9a 100644 --- a/Enhancements/BreathOfTheWild_AntiAliasing/0f2b9ee517917425_00000000000003c9_ps.txt +++ b/Enhancements/BreathOfTheWild_AntiAliasing/0f2b9ee517917425_00000000000003c9_ps.txt @@ -1,6 +1,32 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +uniform ivec4 uf_remappedPS[2]; +}; +#else +uniform vec2 uf_fragCoordScale; +uniform ivec4 uf_remappedPS[2]; +#endif // shader 0f2b9ee517917425 - dumped 1.15 // Used for: Removing/Restoring the native BotW Anti-Aliasing implementation to link in inventory screen @@ -9,7 +35,7 @@ #define iBlurrier $inventoryBlurrier #if (preset == 0) // Native AA Disabled -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf49b1800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; @@ -20,12 +46,12 @@ passPixelColor0 = texture(textureUnitPS0, passParameterSem2.xy); #endif #if (preset == 1) // Native AA Enabled -uniform ivec4 uf_remappedPS[2]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf49b1800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x37b40000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 + +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock ivec2 resDim = textureSize(textureUnitPS0,0); // Retrieve texture dimensions vector holds data-type-float float iresX = ( (float(resDim.x)/float(1280)) + iSharper ) - iBlurrier; // 1st comes aaSharper needs to be added to the direct result of resolution ratio to make it more sharper @@ -683,11 +709,11 @@ passPixelColor0 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFl //--------------------------------------------------------------------------// -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf49b1800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x37f40000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; + #define FXAA_QUALITY_PS 12 #define FXAA_QUALITY_P0 1.0 diff --git a/Enhancements/BreathOfTheWild_AntiAliasing/f14bb57cd5c9cb77_00000000000003c9_ps.txt b/Enhancements/BreathOfTheWild_AntiAliasing/f14bb57cd5c9cb77_00000000000003c9_ps.txt index 2a1a533a..dbc7ab31 100644 --- a/Enhancements/BreathOfTheWild_AntiAliasing/f14bb57cd5c9cb77_00000000000003c9_ps.txt +++ b/Enhancements/BreathOfTheWild_AntiAliasing/f14bb57cd5c9cb77_00000000000003c9_ps.txt @@ -1,6 +1,32 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +uniform ivec4 uf_remappedPS[4]; +}; +#else +uniform vec2 uf_fragCoordScale; +uniform ivec4 uf_remappedPS[4]; +#endif // shader f14bb57cd5c9cb77 - dumped 1.15 // Used for: Removing/Restoring the native BotW World Anti-Aliasing Implementation @@ -9,7 +35,7 @@ #define wBlurrier $worldBlurrier #if (preset == 0) // Native AA Disabled -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf49b1800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; void main() @@ -19,12 +45,12 @@ passPixelColor0 = texture(textureUnitPS0, passParameterSem2.xy); #endif #if (preset == 1) // Native AA Enabled -uniform ivec4 uf_remappedPS[4]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf462d000 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x37f40000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 + +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock ivec2 resDim = textureSize(textureUnitPS0,0); // Retrieve texture dimensions vector holds data-type-float float wresX = ( (float(resDim.x)/float(1280)) + wSharper ) - wBlurrier; // 1st comes aaSharper needs to be added to the direct result of resolution ratio to make it more sharper @@ -1052,11 +1078,11 @@ FxaaFloat4 FxaaPixelShader( //---------------------------------------------------------------------------------- //#version 100 -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf49b1800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x37f40000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; + ivec2 resolution = textureSize(textureUnitPS0,0); // Retrieve Texture Dimensions in float data type so we dont need to convert diff --git a/Enhancements/BreathOfTheWild_AntiAliasing/rules.txt b/Enhancements/BreathOfTheWild_AntiAliasing/rules.txt index f4f4bd71..6747a8d0 100644 --- a/Enhancements/BreathOfTheWild_AntiAliasing/rules.txt +++ b/Enhancements/BreathOfTheWild_AntiAliasing/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Anti-Aliasing path = "The Legend of Zelda: Breath of the Wild/Graphics/Anti-Aliasing" description = Enables or Disables Native Botw Anti-Aliasing. Also includes an alternative FXAA implementation. Check the "Anti-Aliasing/rules.txt" file in your Botw AA graphicPack folder for info about the individual settings. -version = 3 +version = 4 [Preset] name = Alternative FXAA (Nvidia's implementation) diff --git a/Enhancements/BreathOfTheWild_ReflExtra/49ce4bf04a654e80_00000003c9249749_ps.txt b/Enhancements/BreathOfTheWild_ReflExtra/49ce4bf04a654e80_00000003c9249749_ps.txt index 5cf66d8e..884beb98 100644 --- a/Enhancements/BreathOfTheWild_ReflExtra/49ce4bf04a654e80_00000003c9249749_ps.txt +++ b/Enhancements/BreathOfTheWild_ReflExtra/49ce4bf04a654e80_00000003c9249749_ps.txt @@ -1,27 +1,53 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 49ce4bf04a654e80 // ReflExtra - Enhanced Reflections // Reflections can be seen at greater distances // shader dumped from BotW v1.3.1, using Cemu 1.9.1 +#ifdef VULKAN +layout(set = 1, binding = 10) uniform ufBlock +{ uniform ivec4 uf_remappedPS[10]; -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf513a800 res 320x180x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform sampler2D textureUnitPS8;// Tex8 addr 0xf5846000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler8 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 9) uniform samplerCubeArray textureUnitPS9;// Tex9 addr 0x3db66800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler9 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2DArray textureUnitPS11;// Tex11 addr 0xf5593000 res 640x360x2 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x2) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0xf575f800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf5977800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[10]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(5, 1, 3) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 5) uniform sampler2D textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 6) uniform samplerCubeArray textureUnitPS9; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2DArray textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 9) uniform sampler2D textureUnitPS14; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Enhancements/BreathOfTheWild_ReflExtra/8ff2cf86e789335f_00000003c9249749_ps.txt b/Enhancements/BreathOfTheWild_ReflExtra/8ff2cf86e789335f_00000003c9249749_ps.txt index 70b7bdf8..bed1051d 100644 --- a/Enhancements/BreathOfTheWild_ReflExtra/8ff2cf86e789335f_00000003c9249749_ps.txt +++ b/Enhancements/BreathOfTheWild_ReflExtra/8ff2cf86e789335f_00000003c9249749_ps.txt @@ -1,27 +1,53 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8ff2cf86e789335f // ReflExtra - Enhanced Reflections // Reflections can be seen at greater distances // shader dumped from BotW v1.4.0, using Cemu 1.11.1 +#ifdef VULKAN +layout(set = 1, binding = 10) uniform ufBlock +{ uniform ivec4 uf_remappedPS[10]; -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf513a800 res 320x180x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform sampler2D textureUnitPS8;// Tex8 addr 0xf5846000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler8 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 9) uniform samplerCubeArray textureUnitPS9;// Tex9 addr 0x3da46800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler9 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2DArray textureUnitPS11;// Tex11 addr 0xf5593000 res 640x360x2 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x2) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0xf575f800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf5977800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[10]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(5, 1, 3) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 5) uniform sampler2D textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 6) uniform samplerCubeArray textureUnitPS9; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2DArray textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 9) uniform sampler2D textureUnitPS14; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Enhancements/BreathOfTheWild_ReflExtra/rules.txt b/Enhancements/BreathOfTheWild_ReflExtra/rules.txt index 0d9dce1c..0d0a078b 100644 --- a/Enhancements/BreathOfTheWild_ReflExtra/rules.txt +++ b/Enhancements/BreathOfTheWild_ReflExtra/rules.txt @@ -3,4 +3,4 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = "Enhanced Reflections" path = "The Legend of Zelda: Breath of the Wild/Enhancements/Enhanced Reflections" description = Extends the reflections in shrines and some other surfaces. -version = 3 +version = 4 diff --git a/Enhancements/BreathOfTheWild_Shadows/22c410044398c7af_0000000000000000_vs.txt b/Enhancements/BreathOfTheWild_Shadows/22c410044398c7af_0000000000000000_vs.txt index 7c009ba7..1d587b3b 100644 --- a/Enhancements/BreathOfTheWild_Shadows/22c410044398c7af_0000000000000000_vs.txt +++ b/Enhancements/BreathOfTheWild_Shadows/22c410044398c7af_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 22c410044398c7af // Fixed radius blur // shadow pass blur v const float resXScale = $shadowRes; const float resYScale = $shadowRes; +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -71,7 +96,7 @@ R2f.w = R2f.y; R2f.y = backupReg0f + -(PS0f); PS1f = R2f.y; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Enhancements/BreathOfTheWild_Shadows/2a2f55a2b2d64474_0000000000000000_vs.txt b/Enhancements/BreathOfTheWild_Shadows/2a2f55a2b2d64474_0000000000000000_vs.txt index 3a958e5d..b7ef209e 100644 --- a/Enhancements/BreathOfTheWild_Shadows/2a2f55a2b2d64474_0000000000000000_vs.txt +++ b/Enhancements/BreathOfTheWild_Shadows/2a2f55a2b2d64474_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 2a2f55a2b2d64474 // Fixed radius blur // shadow pass blur h const float resXScale = $shadowRes; const float resYScale = $shadowRes; +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -75,7 +100,7 @@ PS1f = R0f.x; // 2 R0f.y = R2f.x + -(R127f.x); // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); // export diff --git a/Enhancements/BreathOfTheWild_Shadows/88133ee405eaae28_000003c000009269_ps.txt b/Enhancements/BreathOfTheWild_Shadows/88133ee405eaae28_000003c000009269_ps.txt index 0505a443..ab6ba049 100644 --- a/Enhancements/BreathOfTheWild_Shadows/88133ee405eaae28_000003c000009269_ps.txt +++ b/Enhancements/BreathOfTheWild_Shadows/88133ee405eaae28_000003c000009269_ps.txt @@ -1,37 +1,61 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 88133ee405eaae28 // Shadow 2x2 box blur fix // shader dumped from BotW v1.4.0, using Cemu 1.11.1 const float resXScale = $shadowRes; const float resYScale = $shadowRes; -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 7) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 8) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 9) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x310be800 res 4x4x1 dim 1 tm: 2 format 0007 compSel: 0 0 0 1 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x310be800 res 32x32x1 dim 1 tm: 2 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform sampler2DArrayShadow textureUnitPS8;// Tex8 addr 0xf557c800 res 720x720x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler8 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0x310c0000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 1 1 1 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(8, 1, 4) uniform sampler2DArrayShadow textureUnitPS8; +TEXTURE_LAYOUT(15, 1, 5) uniform sampler2D textureUnitPS15; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem6; layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Enhancements/BreathOfTheWild_Shadows/ffe0e8c84f6e8da9_000003c000009269_ps.txt b/Enhancements/BreathOfTheWild_Shadows/ffe0e8c84f6e8da9_000003c000009269_ps.txt index c3fba029..2aba073f 100644 --- a/Enhancements/BreathOfTheWild_Shadows/ffe0e8c84f6e8da9_000003c000009269_ps.txt +++ b/Enhancements/BreathOfTheWild_Shadows/ffe0e8c84f6e8da9_000003c000009269_ps.txt @@ -1,37 +1,61 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader ffe0e8c84f6e8da9 // Shadow 2x2 box blur fix // shader dumped from BotW v1.3.1, using Cemu 1.10.0 const float resXScale = $shadowRes; const float resYScale = $shadowRes; -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 7) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 8) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 9) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30fea800 res 4x4x1 dim 1 tm: 2 format 0007 compSel: 0 0 0 1 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x30fea800 res 32x32x1 dim 1 tm: 2 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform sampler2DArrayShadow textureUnitPS8;// Tex8 addr 0xf557c800 res 720x720x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler8 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0x30fec000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 1 1 1 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(8, 1, 4) uniform sampler2DArrayShadow textureUnitPS8; +TEXTURE_LAYOUT(15, 1, 5) uniform sampler2D textureUnitPS15; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem6; layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Enhancements/BreathOfTheWild_Shadows/rules.txt b/Enhancements/BreathOfTheWild_Shadows/rules.txt index d8f7d272..f1e6c1b2 100644 --- a/Enhancements/BreathOfTheWild_Shadows/rules.txt +++ b/Enhancements/BreathOfTheWild_Shadows/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Shadow Resolution path = "The Legend of Zelda: Breath of the Wild/Graphics/Shadow Resolution" description = Note: Increasing shadow resolution is known to increase VRAM usage directly. Lowering this might give you a good boost in performance if you're limited on VRAM but makes shadows blockier. Medium is the original resolution. -version = 3 +version = 4 [Preset] name = Medium (1.00x, Default) diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/8d24f32f18e6de47_0000000079249749_ps.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/8d24f32f18e6de47_0000000079249749_ps.txt index 2c752c5c..07d4c15a 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/8d24f32f18e6de47_0000000079249749_ps.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/8d24f32f18e6de47_0000000079249749_ps.txt @@ -1,24 +1,52 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 8d24f32f18e6de47 +#ifdef VULKAN +layout(set = 1, binding = 9) uniform ufBlock +{ uniform ivec4 uf_remappedPS[10]; -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xf5846000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform samplerCubeArray textureUnitPS8;// Tex8 addr 0x3d0ea800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler8 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 10) uniform sampler2DArray textureUnitPS10;// Tex10 addr 0xf5593000 res 640x360x2 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x2) Sampler10 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0xf575f800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 13) uniform sampler2D textureUnitPS13;// Tex13 addr 0xf5977800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler13 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[10]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 5) uniform samplerCubeArray textureUnitPS8; +TEXTURE_LAYOUT(10, 1, 6) uniform sampler2DArray textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(13, 1, 8) uniform sampler2D textureUnitPS13; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/rules.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/rules.txt index d12f49da..07c7e1c2 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/rules.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_AmiiboMode/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = "Amiibo Mode" path = "The Legend of Zelda: Breath of the Wild/Mods/Cel-Shading Removal (SkalFate & Altros)/Amiibo Mode" description = Amiibo mode by Altros, add or remove that plastic look. Req Remove Links Cell Shading by SkalFate -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/2f7ecb9f0022d8ca_0000000000000001_ps.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/2f7ecb9f0022d8ca_0000000000000001_ps.txt index 0069072c..2f092638 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/2f7ecb9f0022d8ca_0000000000000001_ps.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/2f7ecb9f0022d8ca_0000000000000001_ps.txt @@ -1,13 +1,39 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 2f7ecb9f0022d8ca -- Pixel shader for Links Cel Shading World & Menu - Texture format 0x005d #define mode $mode -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 0 0 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77345f06369b_0000000000000000_vs.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77345f06369b_0000000000000000_vs.txt index a3264d68..a89129db 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77345f06369b_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77345f06369b_0000000000000000_vs.txt @@ -1,15 +1,42 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 314b77345f06369b -- Vertex shader for Links Cel Shading - Texture format 0x005d +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 0 0 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler273 ClampX/Y/Z: 0 0 0 border: 0 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -66,7 +93,7 @@ R3i.z = floatBitsToInt(intBitsToFloat(uf_remappedVS[0].x) * intBitsToFloat(0x437 PS0i = R3i.z; R0i.xy = ivec4(textureSize(textureUnitVS0, 0),1,1).xy; // export -gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z)); +SET_POSITION(vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z))); // 0 R127i.z = floatBitsToInt(float(R0i.x)); PS0i = R127i.z; diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77349f0636db_0000000000000000_vs.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77349f0636db_0000000000000000_vs.txt index b843fd6e..f63c2704 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77349f0636db_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b77349f0636db_0000000000000000_vs.txt @@ -1,15 +1,42 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 314b77349f0636db -- Vertex Shader -- Lights up Cel-Shade Link and NPCs but also messes up the sky in the new methods +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 0 0 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler273 ClampX/Y/Z: 0 0 0 border: 0 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -66,7 +93,7 @@ R3i.z = floatBitsToInt(intBitsToFloat(uf_remappedVS[0].y) * intBitsToFloat(0x437 PS0i = R3i.z; R0i.xy = ivec4(textureSize(textureUnitVS0, 0),1,1).xy; // export -gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z)); +SET_POSITION(vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z))); // 0 R127i.z = floatBitsToInt(float(R0i.x)); PS0i = R127i.z; diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b7734df06371b_0000000000000000_vs.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b7734df06371b_0000000000000000_vs.txt index 647d5150..2c0c563b 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b7734df06371b_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/314b7734df06371b_0000000000000000_vs.txt @@ -1,15 +1,42 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 314b7734df06371b -- Vertex Shader for Water/Magma and etc, one of the 3 vertex shaders involved with cel-shade removal +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 0 0 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler273 ClampX/Y/Z: 0 0 0 border: 0 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -71,7 +98,7 @@ PS0i = R3i.z; R0i.xy = ivec4(textureSize(textureUnitVS0, 0),1,1).xy; // export -gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z)); +SET_POSITION(vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z))); // 0 R127i.z = floatBitsToInt(float(R0i.x)); diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/rules.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/rules.txt index 3c549f63..e223172a 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/rules.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_CelShadingRemoval/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = All NPC No Cel-Shading Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Cel-Shading Removal (SkalFate & Altros)/Cel-Shading - Main" description = Changes the type of shading on Link and the world. -version = 3 +version = 4 [Preset] name = Cel-Shading Disabled diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/57cecf2ed6c8e3f0_00000003c9249749_ps.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/57cecf2ed6c8e3f0_00000003c9249749_ps.txt index ede1c223..e85d4f6d 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/57cecf2ed6c8e3f0_00000003c9249749_ps.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/57cecf2ed6c8e3f0_00000003c9249749_ps.txt @@ -1,27 +1,55 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 57cecf2ed6c8e3f0 -- -- Fragment Shader where links gets drawn in the menu +#ifdef VULKAN +layout(set = 1, binding = 10) uniform ufBlock +{ uniform ivec4 uf_remappedPS[29]; -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x37b40000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf514c000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf55b2000 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0x389a5800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xf55b2000 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform sampler2D textureUnitPS8;// Tex8 addr 0x389a5800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler8 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 9) uniform samplerCubeArray textureUnitPS9;// Tex9 addr 0x389a4800 res 4x4x1 dim 3 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x6) Sampler9 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 10) uniform sampler2DArrayShadow textureUnitPS10;// Tex10 addr 0xf494a800 res 2048x2048x1 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler10 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0x389a5800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 17) uniform sampler2D textureUnitPS17;// Tex17 addr 0x389a3800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[29]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(2, 1, 0) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 1) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 5) uniform sampler2D textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 6) uniform samplerCubeArray textureUnitPS9; +TEXTURE_LAYOUT(10, 1, 7) uniform sampler2DArrayShadow textureUnitPS10; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(17, 1, 9) uniform sampler2D textureUnitPS17; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem5; layout(location = 4) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/f4e1147ab34a1677_0000000000000000_vs.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/f4e1147ab34a1677_0000000000000000_vs.txt index 1b68ef0f..4dc65925 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/f4e1147ab34a1677_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/f4e1147ab34a1677_0000000000000000_vs.txt @@ -1,14 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader f4e1147ab34a1677 -- Vertex Shader where links gets drawn in the menu +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -191,7 +218,7 @@ R0i.w = R125i.x; PS1i = R0i.w; // export -gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w)) * 0; +SET_POSITION(vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w)) * 0); // export passParameterSem0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/rules.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/rules.txt index c70f088d..be891e6f 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/rules.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_MenuWorkaround/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Cel-Shade Removal Start Menu Workaround Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Cel-Shading Removal (SkalFate & Altros)/Cel-Shading - Start Menu Workaround" description = Start Menu Workaround -version = 3 +version = 4 [Preset] name = Start Menu Workaround \ No newline at end of file diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/1c7db40ff5d693ab_001ffffe4924b249_ps.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/1c7db40ff5d693ab_001ffffe4924b249_ps.txt index 7e2eeaac..fa1fdae0 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/1c7db40ff5d693ab_001ffffe4924b249_ps.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/1c7db40ff5d693ab_001ffffe4924b249_ps.txt @@ -1,19 +1,47 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 1c7db40ff5d693ab +#ifdef VULKAN +layout(set = 1, binding = 11) uniform ufBlock +{ uniform ivec4 uf_remappedPS[33]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30364000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x38da5800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform samplerCubeArray textureUnitPS7;// Tex7 addr 0x3d0ea800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0x3cfaa000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf528a800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[33]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform samplerCubeArray textureUnitPS7; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 9) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 10) uniform sampler2D textureUnitPS15; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem6; @@ -22,7 +50,7 @@ layout(location = 1) out vec4 passPixelColor1; layout(location = 2) out vec4 passPixelColor2; layout(location = 3) out vec4 passPixelColor3; layout(location = 4) out vec4 passPixelColor4; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/rules.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/rules.txt index cffb2e30..161e1a86 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/rules.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_Altros/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = No Cel-Shading Links Shadow Brightness Fix v0.8 path = "The Legend of Zelda: Breath of the Wild/Mods/Cel-Shading Removal (SkalFate & Altros)/Shadow Brightness Fix v08 - Altros" description = Fixes the very dark shadows on Links back-side in No Cel-Shade mode. -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/1c7db40ff5d693ab_001ffffe4924b249_ps.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/1c7db40ff5d693ab_001ffffe4924b249_ps.txt index ba5a46e3..ec225d05 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/1c7db40ff5d693ab_001ffffe4924b249_ps.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/1c7db40ff5d693ab_001ffffe4924b249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 1c7db40ff5d693ab -- Link and all NPCs Shadows Renderer , NPC Distant Fog RGB Renderer , Body RGB renderer #define smode $smode @@ -26,18 +45,27 @@ #endif +#ifdef VULKAN +layout(set = 1, binding = 11) uniform ufBlock +{ uniform ivec4 uf_remappedPS[33]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30364000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x236b7000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform samplerCubeArray textureUnitPS7;// Tex7 addr 0x3ccea800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0x3cbaa000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf528a800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[33]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform samplerCubeArray textureUnitPS7; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 9) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 10) uniform sampler2D textureUnitPS15; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem6; @@ -46,7 +74,7 @@ layout(location = 1) out vec4 passPixelColor1; layout(location = 2) out vec4 passPixelColor2; layout(location = 3) out vec4 passPixelColor3; layout(location = 4) out vec4 passPixelColor4; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/rules.txt b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/rules.txt index fa9587cc..666ea7d8 100644 --- a/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/rules.txt +++ b/Mods/BreathOfTheWild_CelShadingRemoval/Botw_ShadowFix_SkalFate/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Links Shadow Brightness for No Cel-Shading Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Cel-Shading Removal (SkalFate & Altros)/Shadow Brightness Fix - SkalFate" description = Changes the strength of shadows on Links body. Fixes the very dark link issue in no cel-shade mode. -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/56bdb3903699990d_0000079a492a9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/56bdb3903699990d_0000079a492a9249_ps.txt index 45652267..7f8ea109 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/56bdb3903699990d_0000079a492a9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/56bdb3903699990d_0000079a492a9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -9,48 +28,51 @@ const float Factor = $L_f; // textureUnitPS12 uf_blockPS8[23].xyz uf_blockPS8[31].x // shader 56bdb3903699990d +#ifdef VULKAN +layout(set = 1, binding = 13) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; -layout(binding = 33, std140) -uniform uniformBlockPS1 +#endif +UNIFORM_BUFFER_LAYOUT(33, 1, 14) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) -uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 15) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 40, std140) -uniform uniformBlockPS8 +UNIFORM_BUFFER_LAYOUT(40, 1, 16) uniform uniformBlockPS8 { vec4 uf_blockPS8[1024]; }; -layout(binding = 42, std140) -uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 17) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2DArrayShadow textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; -layout(binding = 7) uniform sampler3D textureUnitPS7; -layout(binding = 8) uniform sampler2DArray textureUnitPS8; -layout(binding = 9) uniform sampler2D textureUnitPS9; -layout(binding = 10) uniform sampler2D textureUnitPS10; -layout(binding = 11) uniform sampler2D textureUnitPS11; -layout(binding = 12) uniform sampler2D textureUnitPS12; -layout(binding = 13) uniform sampler2D textureUnitPS13; +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2DArrayShadow textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform sampler3D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 7) uniform sampler2DArray textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 8) uniform sampler2D textureUnitPS9; +TEXTURE_LAYOUT(10, 1, 9) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 10) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 11) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(13, 1, 12) uniform sampler2D textureUnitPS13; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/7cd50058a8f1d6dd_00001e1e1fea9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/7cd50058a8f1d6dd_00001e1e1fea9249_ps.txt index 1a51fea9..f9ae8ec1 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/7cd50058a8f1d6dd_00001e1e1fea9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/7cd50058a8f1d6dd_00001e1e1fea9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -8,15 +27,24 @@ const float Factor = $L_f; // Armor When teleporting // shader 7cd50058a8f1d6dd +#ifdef VULKAN +layout(set = 1, binding = 7) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[10]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[10]; uniform vec2 uf_fragCoordScale; -layout(binding = 1) uniform sampler3D textureUnitPS1; -layout(binding = 2) uniform sampler2DArray textureUnitPS2; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; -layout(binding = 7) uniform sampler2D textureUnitPS7; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(1, 1, 0) uniform sampler3D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2DArray textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform sampler2D textureUnitPS7; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/cc51c2b5a4fce06c_00000078787f9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/cc51c2b5a4fce06c_00000078787f9249_ps.txt index a0cd289a..dec33b5e 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/cc51c2b5a4fce06c_00000078787f9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/cc51c2b5a4fce06c_00000078787f9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -8,13 +27,22 @@ const float Factor = $L_f; // Ancient Armor // shader cc51c2b5a4fce06c +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[3]; uniform vec2 uf_fragCoordScale; -layout(binding = 1) uniform sampler2D textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem7; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/rules.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/rules.txt index e4332b98..3442ce19 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/rules.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Armor/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Ancient Armor path = "The Legend of Zelda: Breath of the Wild/Mods/Change Ancient Glow Color/Ancient Armor" description = Change Ancient Amor's color and brightness. Originally it's Ancient Orange. -version = 3 +version = 4 [Preset] name = Malice Red diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/5c4fc00fefe604eb_00000078787f9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/5c4fc00fefe604eb_00000078787f9249_ps.txt index 11a8927a..cfa86084 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/5c4fc00fefe604eb_00000078787f9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/5c4fc00fefe604eb_00000078787f9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Light = $L; @@ -8,13 +27,22 @@ const float Light = $L; // Ancient weapons // shader 5c4fc00fefe604eb +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[3]; uniform vec2 uf_fragCoordScale; -layout(binding = 1) uniform sampler2D textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem3; layout(location = 2) in vec4 passParameterSem4; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/b1b149918fac0b8d_00001e1e1fea9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/b1b149918fac0b8d_00001e1e1fea9249_ps.txt index c4b565b2..97b1ad64 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/b1b149918fac0b8d_00001e1e1fea9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/b1b149918fac0b8d_00001e1e1fea9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Light = $L; @@ -8,15 +27,24 @@ const float Light = $L; // Ancient weapons when teleporting // shader b1b149918fac0b8d +#ifdef VULKAN +layout(set = 1, binding = 7) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[10]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[10]; uniform vec2 uf_fragCoordScale; -layout(binding = 1) uniform sampler3D textureUnitPS1; -layout(binding = 2) uniform sampler2DArray textureUnitPS2; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; -layout(binding = 7) uniform sampler2D textureUnitPS7; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(1, 1, 0) uniform sampler3D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2DArray textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform sampler2D textureUnitPS7; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem8; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/f611e1b3827b5e13_0000079a492a9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/f611e1b3827b5e13_0000079a492a9249_ps.txt index dbdac62c..3de3686c 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/f611e1b3827b5e13_0000079a492a9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/f611e1b3827b5e13_0000079a492a9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Light = $L; @@ -8,48 +27,51 @@ const float Light = $L; // Ancient weapons when Link is transparent // shader f611e1b3827b5e13 +#ifdef VULKAN +layout(set = 1, binding = 13) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; -layout(binding = 33, std140) -uniform uniformBlockPS1 +#endif +UNIFORM_BUFFER_LAYOUT(33, 1, 14) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) -uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 15) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 40, std140) -uniform uniformBlockPS8 +UNIFORM_BUFFER_LAYOUT(40, 1, 16) uniform uniformBlockPS8 { vec4 uf_blockPS8[1024]; }; -layout(binding = 42, std140) -uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 17) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2DArrayShadow textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; -layout(binding = 7) uniform sampler3D textureUnitPS7; -layout(binding = 8) uniform sampler2DArray textureUnitPS8; -layout(binding = 9) uniform sampler2D textureUnitPS9; -layout(binding = 10) uniform sampler2D textureUnitPS10; -layout(binding = 11) uniform sampler2D textureUnitPS11; -layout(binding = 12) uniform sampler2D textureUnitPS12; -layout(binding = 13) uniform sampler2D textureUnitPS13; +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2DArrayShadow textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform sampler3D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 7) uniform sampler2DArray textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 8) uniform sampler2D textureUnitPS9; +TEXTURE_LAYOUT(10, 1, 9) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 10) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 11) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(13, 1, 12) uniform sampler2D textureUnitPS13; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem4; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/rules.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/rules.txt index 641d76ea..a71299a2 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/rules.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Ancient_Weapons/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Ancient weapons path = "The Legend of Zelda: Breath of the Wild/Mods/Change Ancient Glow Color/Ancient weapons" description = Change Ancient weapons 's color and brightness. Originally it varies. Ancient Orange's Brightness is changed to Bow's. -version = 3 +version = 4 [Preset] name = Malice Red diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/85d00659937443d5_000003c3c3fc9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/85d00659937443d5_000003c3c3fc9249_ps.txt index cbee41f8..a0d31ef7 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/85d00659937443d5_000003c3c3fc9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/85d00659937443d5_000003c3c3fc9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -8,14 +27,23 @@ const float Factor = $L_f; // Decayed Guardian // shader 85d00659937443d5 +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[3]; uniform vec2 uf_fragCoordScale; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; -layout(binding = 7) uniform sampler2D textureUnitPS7; -layout(binding = 8) uniform sampler2D textureUnitPS8; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 5) uniform sampler2D textureUnitPS8; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem6; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/rules.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/rules.txt index 82ec4f6c..37fcd29c 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/rules.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Decayed_Guardian/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Decayed Guardian path = "The Legend of Zelda: Breath of the Wild/Mods/Change Ancient Glow Color/Decayed Guardian" description = Change Decayed Guardian (including Stalkers with weathered appearance)'s color. Originally it's Malice Red. -version = 3 +version = 4 [Preset] name = Malice Red diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/4e0bab929e11836f_00003cd249549249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/4e0bab929e11836f_00003cd249549249_ps.txt index b12964d7..b4b3f2b7 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/4e0bab929e11836f_00003cd249549249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/4e0bab929e11836f_00003cd249549249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -9,56 +28,58 @@ const float Factor = $L_f; // uf_blockPS8[23].xyz uf_blockPS8[31].x // shader 4e0bab929e11836f +#ifdef VULKAN +layout(set = 1, binding = 14) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; -layout(binding = 33, std140) -uniform uniformBlockPS1 +#endif +UNIFORM_BUFFER_LAYOUT(33, 1, 15) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 36, std140) -uniform uniformBlockPS4 +UNIFORM_BUFFER_LAYOUT(36, 1, 16) uniform uniformBlockPS4 { vec4 uf_blockPS4[1024]; }; -layout(binding = 38, std140) -uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 17) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 40, std140) -uniform uniformBlockPS8 +UNIFORM_BUFFER_LAYOUT(40, 1, 18) uniform uniformBlockPS8 { vec4 uf_blockPS8[1024]; }; -layout(binding = 42, std140) -uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 19) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0; -layout(binding = 1) uniform sampler2DArrayShadow textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; -layout(binding = 7) uniform sampler3D textureUnitPS7; -layout(binding = 8) uniform sampler2DArray textureUnitPS8; -layout(binding = 9) uniform sampler2D textureUnitPS9; -layout(binding = 10) uniform sampler2D textureUnitPS10; -layout(binding = 11) uniform sampler2D textureUnitPS11; -layout(binding = 12) uniform sampler2D textureUnitPS12; -layout(binding = 13) uniform sampler2D textureUnitPS13; -layout(binding = 14) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2DArrayShadow textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform sampler3D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 7) uniform sampler2DArray textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 8) uniform sampler2D textureUnitPS9; +TEXTURE_LAYOUT(10, 1, 9) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 10) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 11) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(13, 1, 12) uniform sampler2D textureUnitPS13; +TEXTURE_LAYOUT(14, 1, 13) uniform sampler2D textureUnitPS14; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/83573681c1fcb0ac_0000f0f0ff549249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/83573681c1fcb0ac_0000f0f0ff549249_ps.txt index 48f83b44..599001d5 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/83573681c1fcb0ac_0000f0f0ff549249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/83573681c1fcb0ac_0000f0f0ff549249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -8,16 +27,25 @@ const float Factor = $L_f; // Guardian weapons when teleporting // shader 83573681c1fcb0ac +#ifdef VULKAN +layout(set = 1, binding = 8) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[10]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[10]; uniform vec2 uf_fragCoordScale; -layout(binding = 1) uniform sampler3D textureUnitPS1; -layout(binding = 2) uniform sampler2DArray textureUnitPS2; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; -layout(binding = 7) uniform sampler2D textureUnitPS7; -layout(binding = 8) uniform sampler2D textureUnitPS8; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(1, 1, 0) uniform sampler3D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2DArray textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 7) uniform sampler2D textureUnitPS8; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/91b6e09da2ff63cc_000003c3c3fc9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/91b6e09da2ff63cc_000003c3c3fc9249_ps.txt index 0760d513..f50cdb6c 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/91b6e09da2ff63cc_000003c3c3fc9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/91b6e09da2ff63cc_000003c3c3fc9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -8,14 +27,23 @@ const float Factor = $L_f; // Guardian Stalker + Scout + Guardian weapons // shader 91b6e09da2ff63cc +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[3]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[3]; uniform vec2 uf_fragCoordScale; -layout(binding = 1) uniform sampler2D textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem7; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/rules.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/rules.txt index 5607c3fc..1918bec8 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/rules.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guadian_Stalker_Scout_and_Weapons/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Guardian Stalker & Guardian Scout & The top Half of Guardian weapons path = "The Legend of Zelda: Breath of the Wild/Mods/Change Ancient Glow Color/Guardian Stalker & Scout & Guardian weapons" description = Change Guardian Stalker, Scout, Guardian weapons's color. Originally it depends on whether it's corrupted by malice, or the state of the Guardian Scout. -version = 3 +version = 4 [Preset] name = Malice Red diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/133297c9a66bfc98_000003c3c3fc9249_ps.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/133297c9a66bfc98_000003c3c3fc9249_ps.txt index 0a597afa..e7d463ca 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/133297c9a66bfc98_000003c3c3fc9249_ps.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/133297c9a66bfc98_000003c3c3fc9249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + const vec3 Color = vec3($R,$G,$B); const float Factor = $L_f; @@ -8,14 +27,23 @@ const float Factor = $L_f; // Guardian Turret + Skywatcher // shader 133297c9a66bfc98 +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform ivec4 uf_remappedPS[5]; +uniform vec4 uf_fragCoordScale; +}; +#else uniform ivec4 uf_remappedPS[5]; uniform vec2 uf_fragCoordScale; -layout(binding = 1) uniform sampler2D textureUnitPS1; -layout(binding = 2) uniform sampler2D textureUnitPS2; -layout(binding = 3) uniform sampler2D textureUnitPS3; -layout(binding = 4) uniform sampler2D textureUnitPS4; -layout(binding = 5) uniform sampler2D textureUnitPS5; -layout(binding = 6) uniform sampler2D textureUnitPS6; +#endif +// uf_fragCoordScale was moved to the ufBlock +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem7; diff --git a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/rules.txt b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/rules.txt index 4126eda3..7788e06d 100644 --- a/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/rules.txt +++ b/Mods/BreathOfTheWild_ChangeAncientGlowColor/Guardian_Turret_Skywatcher/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Guardian Turret & Skywatcher path = "The Legend of Zelda: Breath of the Wild/Mods/Change Ancient Glow Color/Guardian Turret & Skywatcher" description = Change Guardian Turret, Skywatcher's color. Originally it depends on whether it's corrupted by malice or not. -version = 3 +version = 4 [Preset] name = Malice Red diff --git a/Mods/BreathOfTheWild_Cheats_InfAmiibo/rules.txt b/Mods/BreathOfTheWild_Cheats_InfAmiibo/rules.txt index e52d32db..550fcf15 100644 --- a/Mods/BreathOfTheWild_Cheats_InfAmiibo/rules.txt +++ b/Mods/BreathOfTheWild_Cheats_InfAmiibo/rules.txt @@ -3,4 +3,4 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Infinite Amiibo path = "The Legend of Zelda: Breath of the Wild/Mods/Cheats/Infinite Amiibo" description = BotW Cheats by C313571N and Xalphenos -version = 3 \ No newline at end of file +version = 4 \ No newline at end of file diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/2e2543216c04766d_0000000079249749_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/2e2543216c04766d_0000000079249749_ps.txt index cd875eeb..65451b80 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/2e2543216c04766d_0000000079249749_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/2e2543216c04766d_0000000079249749_ps.txt @@ -1,28 +1,56 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 2e2543216c04766d -- Water RGB and edge clarity and Distant Water Fog #define waterfogred $waterfogred #define waterfoggreen $waterfoggreen #define waterfogblue $waterfogblue +#ifdef VULKAN +layout(set = 1, binding = 9) uniform ufBlock +{ uniform ivec4 uf_remappedPS[14]; -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xf5846000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform samplerCubeArray textureUnitPS8;// Tex8 addr 0x3ccea800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler8 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 10) uniform sampler2DArray textureUnitPS10;// Tex10 addr 0xf5593000 res 640x360x2 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x2) Sampler10 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0xf575f800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 13) uniform sampler2D textureUnitPS13;// Tex13 addr 0xf5977800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler13 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[14]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 5) uniform samplerCubeArray textureUnitPS8; +TEXTURE_LAYOUT(10, 1, 6) uniform sampler2DArray textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(13, 1, 8) uniform sampler2D textureUnitPS13; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem4; layout(location = 2) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/bec68ec6f40a864f_00fffff249259249_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/bec68ec6f40a864f_00fffff249259249_ps.txt index 288546ed..b9bad8a9 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/bec68ec6f40a864f_00fffff249259249_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/bec68ec6f40a864f_00fffff249259249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader bec68ec6f40a864f -- Affects distant area fog rgb, distance lighting, ground lighting #define dli $distantlighting @@ -8,19 +27,28 @@ #define dgreen $dgreen #define dblue $dblue +#ifdef VULKAN +layout(set = 1, binding = 12) uniform ufBlock +{ uniform ivec4 uf_remappedPS[33]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30364000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x236b7000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform samplerCubeArray textureUnitPS7;// Tex7 addr 0x3ccea800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0x3cbaa000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0x3ccc6800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 6 6 6 border: 2 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf528a800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 17) uniform sampler2D textureUnitPS17;// Tex17 addr 0x3cd0f000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[33]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform samplerCubeArray textureUnitPS7; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 9) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 10) uniform sampler2D textureUnitPS15; +TEXTURE_LAYOUT(17, 1, 11) uniform sampler2D textureUnitPS17; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem6; @@ -29,7 +57,7 @@ layout(location = 1) out vec4 passPixelColor1; layout(location = 2) out vec4 passPixelColor2; layout(location = 3) out vec4 passPixelColor3; layout(location = 4) out vec4 passPixelColor4; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/fb2e18ae56397ca7_00fffff249259249_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/fb2e18ae56397ca7_00fffff249259249_ps.txt index 369f8261..b6df6e8e 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/fb2e18ae56397ca7_00fffff249259249_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/fb2e18ae56397ca7_00fffff249259249_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader fb2e18ae56397ca7 -- Affects Trees Bushes and Vines #define gli $greenerylighting @@ -8,19 +27,28 @@ #define ggreen $ggreen #define gblue $gblue +#ifdef VULKAN +layout(set = 1, binding = 12) uniform ufBlock +{ uniform ivec4 uf_remappedPS[33]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30364000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x236b7000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform samplerCubeArray textureUnitPS7;// Tex7 addr 0x3ccea800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0x3cbaa000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0x3ccc6800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 6 6 6 border: 2 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf528a800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 16) uniform sampler2D textureUnitPS16;// Tex16 addr 0x3cd0f000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[33]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform samplerCubeArray textureUnitPS7; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 9) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 10) uniform sampler2D textureUnitPS15; +TEXTURE_LAYOUT(16, 1, 11) uniform sampler2D textureUnitPS16; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem6; @@ -29,7 +57,7 @@ layout(location = 1) out vec4 passPixelColor1; layout(location = 2) out vec4 passPixelColor2; layout(location = 3) out vec4 passPixelColor3; layout(location = 4) out vec4 passPixelColor4; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/rules.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/rules.txt index d25ab9e9..af769f51 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/rules.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_DistantFog/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Distant Area Fog Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Distant Fog Removal/Distant Fog - Main" description = Can Remove Distant Fog Haze from the world. Change its RGB color. Light up the Distance. -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/29c30aaa023dc7e6_0000000000000709_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/29c30aaa023dc7e6_0000000000000709_ps.txt index e1f04f39..d3488c41 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/29c30aaa023dc7e6_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/29c30aaa023dc7e6_0000000000000709_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 29c30aaa023dc7e6 -- Ganons middle and bottom big swirl #define aurafog $aurafog @@ -25,11 +44,22 @@ #define auraopacity 1 #endif +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20265000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x202df000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x1bf70000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; @@ -41,7 +71,7 @@ layout(location = 7) in vec4 passParameterSem14; layout(location = 8) in vec4 passParameterSem15; layout(location = 9) in vec4 passParameterSem16; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/397f3d8521c96e30_0000000000000709_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/397f3d8521c96e30_0000000000000709_ps.txt index ad2bb843..5a424530 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/397f3d8521c96e30_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/397f3d8521c96e30_0000000000000709_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 397f3d8521c96e30 -- ganons castle swirl shader #define aurafog $aurafog @@ -25,11 +44,22 @@ #define auraopacity 1 #endif +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20265000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x202df000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x1bf70000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; @@ -42,7 +72,7 @@ layout(location = 8) in vec4 passParameterSem14; layout(location = 9) in vec4 passParameterSem15; layout(location = 10) in vec4 passParameterSem16; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/5a8eb2055c65a0c2_0000000000003849_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/5a8eb2055c65a0c2_0000000000003849_ps.txt index ae86c46a..6bf419a9 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/5a8eb2055c65a0c2_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/5a8eb2055c65a0c2_0000000000003849_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 5a8eb2055c65a0c2 -- Vertex Shader - Close to Castle Aura RGB #define aurafog $aurafog @@ -9,12 +28,23 @@ #define aurablue $aurablue #define auraopacity $auraopacity +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[5]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20265000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x202df000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x1c870000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[5]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -29,7 +59,7 @@ layout(location = 10) in vec4 passParameterSem14; layout(location = 11) in vec4 passParameterSem15; layout(location = 12) in vec4 passParameterSem16; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/rules.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/rules.txt index fdad982a..945986fa 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/rules.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleAura/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Castle Ganons Aura Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Distant Fog Removal/Hyrule Castle Ganons Aura" description = Can Remove the Fog on Ganons Aura on Hyrule castle. Change its RGB color. -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/699b238ae15d113b_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/699b238ae15d113b_00000000000000e1_ps.txt index 9ae3f4e5..a478df9c 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/699b238ae15d113b_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/699b238ae15d113b_00000000000000e1_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 699b238ae15d113b -- Ganons Castle Moat Fog Fragment Shader #define basefogred $basefogred @@ -21,10 +40,21 @@ #define basefogopacity 1 #endif +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[5]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2003b000 res 4x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[5]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem3; @@ -36,7 +66,7 @@ layout(location = 7) in vec4 passParameterSem14; layout(location = 8) in vec4 passParameterSem15; layout(location = 9) in vec4 passParameterSem16; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/rules.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/rules.txt index 4303dd73..de536de6 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/rules.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_HyruleCastleBaseFog/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Hyrule Castle Base Fog Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Distant Fog Removal/Hyrule Castle Base Fog" description = Can Remove the Fog glow at the Base of Hyrule Castle. Can Change its RGB color. -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/1c7db40ff5d693ab_001ffffe4924b249_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/1c7db40ff5d693ab_001ffffe4924b249_ps.txt index afded49a..a1e4ac6c 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/1c7db40ff5d693ab_001ffffe4924b249_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/1c7db40ff5d693ab_001ffffe4924b249_ps.txt @@ -1,24 +1,52 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 1c7db40ff5d693ab -- Links and all NPCs RGb renderer, all npcs fog rgb renderer, sun-side facing brightness #define npcfogred $npcfogred #define npcfoggreen $npcfoggreen #define npcfogblue $npcfogblue +#ifdef VULKAN +layout(set = 1, binding = 11) uniform ufBlock +{ uniform ivec4 uf_remappedPS[33]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30364000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x236b7000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform samplerCubeArray textureUnitPS7;// Tex7 addr 0x3ccea800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0x3cbaa000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf528a800 res 640x360x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[33]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform samplerCubeArray textureUnitPS7; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 8) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 9) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 10) uniform sampler2D textureUnitPS15; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem6; @@ -27,7 +55,7 @@ layout(location = 1) out vec4 passPixelColor1; layout(location = 2) out vec4 passPixelColor2; layout(location = 3) out vec4 passPixelColor3; layout(location = 4) out vec4 passPixelColor4; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/rules.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/rules.txt index e52b8b46..9b547dfc 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/rules.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_NPCFog/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Distant NPCs Fog Removal Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Distant Fog Removal/NPC Fog Removal" description = Can Remove Fog from Distant NPCs. Conflicts with Cel-Shade ShadowFix Packs. -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/527591781440691a_000000000001c24b_ps.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/527591781440691a_000000000001c24b_ps.txt index db392d3c..6a46ab36 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/527591781440691a_000000000001c24b_ps.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/527591781440691a_000000000001c24b_ps.txt @@ -1,6 +1,25 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 527591781440691a -- Controls RGb of the Fog Fields in the distance ans their opacity #define ffopacity $ffopacity @@ -8,13 +27,24 @@ #define ffgreen $ffgreen #define ffblue $ffblue +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ uniform ivec4 uf_remappedPS[7]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2022c000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20234000 res 256x64x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 2 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x200c2000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 10) uniform samplerCubeArray textureUnitPS10;// Tex10 addr 0x3c6ee800 res 16x16x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x6) Sampler10 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[7]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(10, 1, 4) uniform samplerCubeArray textureUnitPS10; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -27,7 +57,7 @@ layout(location = 8) in vec4 passParameterSem14; layout(location = 9) in vec4 passParameterSem15; layout(location = 10) in vec4 passParameterSem16; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/rules.txt b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/rules.txt index d75f3e48..507fa53f 100644 --- a/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/rules.txt +++ b/Mods/BreathOfTheWild_DistantFogRemoval/Botw_WorldFogFields/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Fog Fields Pack path = "The Legend of Zelda: Breath of the Wild/Mods/Distant Fog Removal/World Fog Fields" description = Can Remove Fog Fields from the whole world. Change its RGB color. -version = 3 +version = 4 [Preset] diff --git a/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/6fa2baef8a4ece42_0000000000000709_ps.txt b/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/6fa2baef8a4ece42_0000000000000709_ps.txt index f3aa0ad7..ee2674f0 100644 --- a/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/6fa2baef8a4ece42_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/6fa2baef8a4ece42_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 6fa2baef8a4ece42 // Divine Laser Beams Customizer - rings // Credit for hsv functions below @@ -13,11 +30,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fc2000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x21594000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -26,7 +54,7 @@ layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem14; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/de960d36a997b34d_0000000000000709_ps.txt b/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/de960d36a997b34d_0000000000000709_ps.txt index 85310437..3cea1d59 100644 --- a/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/de960d36a997b34d_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/de960d36a997b34d_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader de960d36a997b34d // Divine Laser Beams Customizer - beams // Credit for hsv functions below @@ -13,11 +30,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x210b5000 res 200x200x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x2188b000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -27,7 +55,7 @@ layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem12; layout(location = 7) in vec4 passParameterSem14; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/rules.txt b/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/rules.txt index d80915bd..4c3f816b 100644 --- a/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/rules.txt +++ b/Mods/BreathOfTheWild_DivineLaserBeamCustomizer/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Divine Laser Beams Customizer path = "The Legend of Zelda: Breath of the Wild/Mods/Divine Laser Beams Customizer" description = Allows customization of the color of the Divine Beasts's Laser Beams. They can also be completely hidden. Inside the shader you can find other options like saturation and transparency. -version = 3 +version = 4 [Preset] name = Red (Default) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/0453fb7ad9cc0f79_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/0453fb7ad9cc0f79_0000000000003849_ps.txt index a7469473..57b16f12 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/0453fb7ad9cc0f79_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/0453fb7ad9cc0f79_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 0453fb7ad9cc0f79 // Bomb - explosion sphere // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x21412000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +52,7 @@ layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/097eac672c26b4a4_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/097eac672c26b4a4_00000000000000e1_ps.txt index 7bb66cde..29e1b4a1 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/097eac672c26b4a4_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/097eac672c26b4a4_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 097eac672c26b4a4 // Shrine - ending field shatter particles 2 // Glow Lights Color Mod @@ -11,17 +28,28 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x210c8000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 9) uniform sampler2D textureUnitPS9;// Tex9 addr 0xf557c800 res 160x90x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler9 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(9, 1, 1) uniform sampler2D textureUnitPS9; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/0ce5fca5c70640d1_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/0ce5fca5c70640d1_0000000000003849_ps.txt index 7c7ae193..3cd1c284 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/0ce5fca5c70640d1_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/0ce5fca5c70640d1_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 0ce5fca5c70640d1 // Electric arc // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fc2000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x210c1000 res 64x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x210c8000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +52,7 @@ layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/12fe44a2273b452c_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/12fe44a2273b452c_000000000000001c_ps.txt index c6e93501..f5560710 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/12fe44a2273b452c_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/12fe44a2273b452c_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 12fe44a2273b452c // Shrine - elevator pass through field // Glow Lights Color Mod @@ -11,15 +28,26 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(4, 1, 0) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem3; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/146164991e2929e2_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/146164991e2929e2_0000000000000709_ps.txt index 7cae0f66..a08ae766 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/146164991e2929e2_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/146164991e2929e2_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 146164991e2929e2 // Shrine - volumetric light // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21331000 res 512x512x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 9) uniform sampler2D textureUnitPS9;// Tex9 addr 0xf557c800 res 160x90x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler9 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(9, 1, 2) uniform sampler2D textureUnitPS9; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -23,7 +51,7 @@ layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/14f5a7cf99f2904a_00000000000000f1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/14f5a7cf99f2904a_00000000000000f1_ps.txt index 88defd80..1e238e35 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/14f5a7cf99f2904a_00000000000000f1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/14f5a7cf99f2904a_00000000000000f1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 14f5a7cf99f2904a // Shrine - laser beam // Glow Lights Color Mod @@ -11,16 +28,25 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x18b20000 res 128x4x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x18b20000 res 128x4x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/15e2d4f74a5e8445_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/15e2d4f74a5e8445_000000000000001c_ps.txt index 5f3f393e..0f839a8f 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/15e2d4f74a5e8445_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/15e2d4f74a5e8445_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 15e2d4f74a5e8445 // Bomb - explosion first sphere // Glow Lights Color Mod @@ -11,9 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -22,7 +50,7 @@ layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem11; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/1dd8be9054c94f4e_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/1dd8be9054c94f4e_0000000000003849_ps.txt index 84484122..25dd5235 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/1dd8be9054c94f4e_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/1dd8be9054c94f4e_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 1dd8be9054c94f4e // Shrine - activation circle // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[4]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x1dc46000 res 64x64x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[4]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -28,7 +56,7 @@ layout(location = 7) in vec4 passParameterSem9; layout(location = 8) in vec4 passParameterSem11; layout(location = 9) in vec4 passParameterSem12; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/233a000439032e75_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/233a000439032e75_00000000000000e1_ps.txt index de631e8a..a8ca6ae3 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/233a000439032e75_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/233a000439032e75_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 233a000439032e75 // Bomb - explosion circle // Glow Lights Color Mod @@ -11,16 +28,25 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x214e1000 res 64x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x214e1000 res 64x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/266a0d760fe1ddfc_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/266a0d760fe1ddfc_0000000000003849_ps.txt index c3959690..b806f76f 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/266a0d760fe1ddfc_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/266a0d760fe1ddfc_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 266a0d760fe1ddfc // Shrine - elevator base // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[4]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x21156000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x21103000 res 4x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[4]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -27,7 +55,7 @@ layout(location = 6) in vec4 passParameterSem8; layout(location = 7) in vec4 passParameterSem9; layout(location = 8) in vec4 passParameterSem11; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/2a045e62b99640b5_00000001e1e21c49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/2a045e62b99640b5_00000001e1e21c49_ps.txt index 56ab8861..faf1aed5 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/2a045e62b99640b5_00000001e1e21c49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/2a045e62b99640b5_00000001e1e21c49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 2a045e62b99640b5 // Shrine of Resurrection - walls // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb2b30000 res 512x256x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb2b63000 res 128x64x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb2b42000 res 512x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xb2b42000 res 512x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -25,7 +53,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/2a87149b7154c69d_000000000001c24b_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/2a87149b7154c69d_000000000001c24b_ps.txt index b6c4b150..1850b22a 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/2a87149b7154c69d_000000000001c24b_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/2a87149b7154c69d_000000000001c24b_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 2a87149b7154c69d // Bomb - smoke // Glow Lights Color Mod @@ -11,13 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21048800 res 256x128x1 dim 1 tm: 4 format 0007 compSel: 0 1 1 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x2105e800 res 256x256x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x210b5000 res 200x200x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 10) uniform samplerCubeArray textureUnitPS10;// Tex10 addr 0x3d568800 res 16x16x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x6) Sampler10 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(10, 1, 4) uniform samplerCubeArray textureUnitPS10; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -29,7 +57,7 @@ layout(location = 7) in vec4 passParameterSem11; layout(location = 8) in vec4 passParameterSem14; layout(location = 9) in vec4 passParameterSem15; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_GlowLightsColors/2f64af19b1835ab0_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/2f64af19b1835ab0_00000000000000e1_ps.txt index 004f8767..41c3523e 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/2f64af19b1835ab0_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/2f64af19b1835ab0_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 2f64af19b1835ab0 // Shrine - ending particles // Glow Lights Color Mod @@ -11,17 +28,28 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/319e60116b59ceec_00000001e1e1fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/319e60116b59ceec_00000001e1e1fe49_ps.txt index d6f5cb52..afe4887b 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/319e60116b59ceec_00000001e1e1fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/319e60116b59ceec_00000001e1e1fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 319e60116b59ceec // Sheikah Tower - active // Glow Lights Color Mod @@ -11,10 +28,19 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x34833000 res 64x64x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x34834000 res 128x128x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x34836000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +50,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/38d70ed9280bb3bc_0000000000000079_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/38d70ed9280bb3bc_0000000000000079_ps.txt index 672e0ef6..222dd77c 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/38d70ed9280bb3bc_0000000000000079_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/38d70ed9280bb3bc_0000000000000079_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 38d70ed9280bb3bc // Bloom color cast // Glow Lights Color Mod @@ -11,11 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/3d383d2d61500c9c_0000000f0f0ff249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/3d383d2d61500c9c_0000000f0f0ff249_ps.txt index 12e42185..0a0a30ec 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/3d383d2d61500c9c_0000000f0f0ff249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/3d383d2d61500c9c_0000000f0f0ff249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 3d383d2d61500c9c // Sheikah Tower - middle structure above control panel // Glow Lights Color Mod @@ -11,11 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb3798000 res 1024x1024x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb391b000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb381a000 res 1024x1024x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xb381a000 res 1024x1024x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +50,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/42c9208b54ad72ca_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/42c9208b54ad72ca_00000000000000e1_ps.txt index 0eab7350..ad2da7a8 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/42c9208b54ad72ca_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/42c9208b54ad72ca_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 42c9208b54ad72ca // Guardian scout fire debris // Glow Lights Color Mod @@ -11,15 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fee000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fee000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/458dd826bd589332_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/458dd826bd589332_0000000000000709_ps.txt index 959ec824..db254eb2 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/458dd826bd589332_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/458dd826bd589332_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 458dd826bd589332 // Hateno fire - glow // Glow Lights Color Mod @@ -11,18 +28,29 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fc2000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/48a94cda336d2976_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/48a94cda336d2976_00000000000000e1_ps.txt index 69f18c97..2dfa7723 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/48a94cda336d2976_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/48a94cda336d2976_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 48a94cda336d2976 // Hateno fire - horizontal flare // Glow Lights Color Mod @@ -11,15 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fdb000 res 256x78x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 1 1 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fe2000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/4af8a4670205be4c_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/4af8a4670205be4c_00000000000000e1_ps.txt index 535ab0d4..56773f35 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/4af8a4670205be4c_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/4af8a4670205be4c_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 4af8a4670205be4c // Shrine - laser beam glow // Glow Lights Color Mod @@ -11,10 +28,21 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[5]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x18b20000 res 128x4x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[5]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -27,7 +55,7 @@ layout(location = 8) in vec4 passParameterSem14; layout(location = 9) in vec4 passParameterSem15; layout(location = 10) in vec4 passParameterSem16; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/4bdac25bb98f5804_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/4bdac25bb98f5804_0000000000003849_ps.txt index 5df039b5..562052d6 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/4bdac25bb98f5804_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/4bdac25bb98f5804_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 4bdac25bb98f5804 // Hateno fire // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fc2000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x20fcc800 res 64x64x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +52,7 @@ layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/5219277e990fe5ba_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/5219277e990fe5ba_00000000000000e1_ps.txt index b8a0d47f..81a3b50f 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/5219277e990fe5ba_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/5219277e990fe5ba_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 5219277e990fe5ba // Bomb - horizontal appearance effect // Glow Lights Color Mod @@ -11,15 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fdb000 res 256x78x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 1 1 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fe2000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/5b04d28f319a1d6d_0000000f0f0ff249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/5b04d28f319a1d6d_0000000f0f0ff249_ps.txt index 1f9a6cdd..99296dfb 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/5b04d28f319a1d6d_0000000f0f0ff249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/5b04d28f319a1d6d_0000000f0f0ff249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 5b04d28f319a1d6d // Bomb // Glow Lights Color Mod @@ -11,11 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xb2ea5000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xb2fce000 res 512x512x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb2fac000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb2f8b000 res 512x512x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem3; layout(location = 2) in vec4 passParameterSem4; @@ -24,7 +50,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/5b9b7727ca24e22b_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/5b9b7727ca24e22b_0000000000000709_ps.txt index d0d9dbe1..d6ad21dd 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/5b9b7727ca24e22b_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/5b9b7727ca24e22b_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 5b9b7727ca24e22b // Shrine - ending field 2 // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x216b3000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x21416000 res 400x100x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 2 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x2137e000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -25,7 +53,7 @@ layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem9; layout(location = 7) in vec4 passParameterSem11; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/5f4e60117b59cf65_00000001e1e1fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/5f4e60117b59cf65_00000001e1e1fe49_ps.txt index 9688741b..2234245e 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/5f4e60117b59cf65_00000001e1e1fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/5f4e60117b59cf65_00000001e1e1fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 5f4e60117b59cf65 // Sheikah Tower - inactive + Shrine // Glow Lights Color Mod @@ -11,10 +28,19 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x337db000 res 256x1024x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x337f3000 res 128x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x337e7000 res 256x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +50,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/603d7ad06d86617e_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/603d7ad06d86617e_00000000000000e1_ps.txt index 211c45f6..5f6eed4f 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/603d7ad06d86617e_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/603d7ad06d86617e_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 603d7ad06d86617e // Teleportation - part 2 // Glow Lights Color Mod @@ -11,15 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x216a1000 res 64x64x1 dim 1 tm: 4 format 0001 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x211a9000 res 32x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/6240983542445009_00000001e1e21c49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/6240983542445009_00000001e1e21c49_ps.txt index 79f99557..31560278 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/6240983542445009_00000001e1e21c49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/6240983542445009_00000001e1e21c49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 6240983542445009 // Shrine - bulbs // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb74c5000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb74ef000 res 256x256x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb74e6000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xb75c0000 res 84x64x1 dim 1 tm: 4 format 0034 compSel: 0 4 4 4 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 3) uniform sampler2D textureUnitPS7; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem6; layout(location = 2) in vec4 passParameterSem3; @@ -27,7 +55,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/64342503518ca97a_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/64342503518ca97a_0000000000000709_ps.txt index ba8c57bf..2518aac2 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/64342503518ca97a_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/64342503518ca97a_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 64342503518ca97a // Shrine - ending // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x21103000 res 4x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; @@ -23,7 +51,7 @@ layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/6832b00344c32a71_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/6832b00344c32a71_00000000000000e1_ps.txt index 63898942..e441c52e 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/6832b00344c32a71_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/6832b00344c32a71_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 6832b00344c32a71 // Shrine - ending back wall // Glow Lights Color Mod @@ -11,16 +28,25 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21103000 res 4x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x21103000 res 4x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/687da8c1b555b262_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/687da8c1b555b262_0000000000003849_ps.txt index 0ce7c69d..17ff901c 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/687da8c1b555b262_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/687da8c1b555b262_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 687da8c1b555b262 // Bomb - explosion sphere + distorsion // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x210b5000 res 200x200x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf45c6000 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 3) uniform sampler2D textureUnitPS3; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -25,7 +53,7 @@ layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/68aa37ce58db094d_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/68aa37ce58db094d_00000000000000e1_ps.txt index a37dc717..bda92028 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/68aa37ce58db094d_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/68aa37ce58db094d_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 68aa37ce58db094d // Bomb - appear effect center // Glow Lights Color Mod @@ -11,17 +28,28 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/70a79265ab7d498a_0000000f0f10e249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/70a79265ab7d498a_0000000f0f10e249_ps.txt index 1f40e569..07d3b6c3 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/70a79265ab7d498a_0000000f0f10e249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/70a79265ab7d498a_0000000f0f10e249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 70a79265ab7d498a // Electric balls // Glow Lights Color Mod @@ -11,13 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ uniform ivec4 uf_remappedPS[4]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb639d000 res 256x256x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb63b8000 res 256x256x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb63a6000 res 256x256x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xb63af000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 8) uniform sampler2D textureUnitPS8;// Tex8 addr 0xb639b000 res 128x4x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler8 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[4]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(8, 1, 4) uniform sampler2D textureUnitPS8; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -27,7 +55,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/70d96b85a0ce93ef_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/70d96b85a0ce93ef_00000000000000e1_ps.txt index e0a3b9dd..723e9e8e 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/70d96b85a0ce93ef_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/70d96b85a0ce93ef_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 70d96b85a0ce93ef // Shrine - ending - field shatter effect particle // Glow Lights Color Mod @@ -11,16 +28,25 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x211a9000 res 32x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x214e1000 res 64x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 1 1 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/751393d6cbcd0c76_000003c3c3fc9249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/751393d6cbcd0c76_000003c3c3fc9249_ps.txt index e3ea2b97..234ed4c4 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/751393d6cbcd0c76_000003c3c3fc9249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/751393d6cbcd0c76_000003c3c3fc9249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 751393d6cbcd0c76 // Shrine - walls 2 // Glow Lights Color Mod @@ -11,13 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb119e000 res 1024x1024x1 dim 1 tm: 4 format 0433 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb129f000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb10e6000 res 1024x1024x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xb1179000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xb09e5000 res 4012x2048x1 dim 1 tm: 4 format 0034 compSel: 0 4 4 4 mipView: 0x0 (num 0xc) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 0 -layout(binding = 8) uniform sampler2D textureUnitPS8;// Tex8 addr 0xb1168000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler8 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 5) uniform sampler2D textureUnitPS8; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem7; @@ -28,7 +54,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/80b87385a0d2942f_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/80b87385a0d2942f_00000000000000e1_ps.txt index 8f3db3d4..d5a9d664 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/80b87385a0d2942f_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/80b87385a0d2942f_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 80b87385a0d2942f // Bomp - appear effect circle 2 // Glow Lights Color Mod @@ -11,16 +28,25 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x214e1000 res 64x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x214e1000 res 64x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/81adf9797e4661a7_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/81adf9797e4661a7_00000000000000e1_ps.txt index 5dee8f8c..d9d9f943 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/81adf9797e4661a7_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/81adf9797e4661a7_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 81adf9797e4661a7 // Shrine - ending glowing wall // Glow Lights Color Mod @@ -11,16 +28,25 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21282000 res 128x128x1 dim 1 tm: 4 format 0433 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/8438998c284fe428_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/8438998c284fe428_000000000000001c_ps.txt index 6c8a7275..9b38fa06 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/8438998c284fe428_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/8438998c284fe428_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8438998c284fe428 // Shrine - elevator particles 2 // Glow Lights Color Mod @@ -11,14 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x214d5000 res 128x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/87790fa17c847fea_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/87790fa17c847fea_0000000000000709_ps.txt index 73ae5cf9..cbd169b9 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/87790fa17c847fea_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/87790fa17c847fea_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 87790fa17c847fea // Shrine - elevator field + distortion // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x21146000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf45c6000 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +52,7 @@ layout(location = 4) in vec4 passParameterSem5; layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem12; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/8798144a6f066e7c_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/8798144a6f066e7c_00000000000000e1_ps.txt index 3c21408d..25856f8f 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/8798144a6f066e7c_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/8798144a6f066e7c_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8798144a6f066e7c // Shrine - ending field 3 // Glow Lights Color Mod @@ -11,10 +28,21 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21282000 res 128x128x1 dim 1 tm: 4 format 0433 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -23,7 +51,7 @@ layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem11; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/87babe7569572ff5_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/87babe7569572ff5_0000000000003849_ps.txt index 4f7f96dd..d322fb30 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/87babe7569572ff5_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/87babe7569572ff5_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 87babe7569572ff5 // Bomb - trails 1 // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2118e000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x213a7000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x21636000 res 64x64x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -25,7 +53,7 @@ layout(location = 4) in vec4 passParameterSem5; layout(location = 5) in vec4 passParameterSem7; layout(location = 6) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/8836c3a20b053cf0_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/8836c3a20b053cf0_000000000000001c_ps.txt index 1740eca2..ed68f56c 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/8836c3a20b053cf0_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/8836c3a20b053cf0_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8836c3a20b053cf0 // Shrine - vertical lines field // Glow Lights Color Mod @@ -11,9 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21103000 res 4x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 1 1 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -22,7 +50,7 @@ layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem11; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/8d0a18894dd0c9cb_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/8d0a18894dd0c9cb_0000000000000709_ps.txt index 9756dc31..1cc38ef7 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/8d0a18894dd0c9cb_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/8d0a18894dd0c9cb_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8d0a18894dd0c9cb // Shrine - ending field 1 // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x21412000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -24,7 +52,7 @@ layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem9; layout(location = 6) in vec4 passParameterSem11; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/8e9e804a3cd384c3_00000000000ff259_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/8e9e804a3cd384c3_00000000000ff259_ps.txt index eec54824..675c77bf 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/8e9e804a3cd384c3_00000000000ff259_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/8e9e804a3cd384c3_00000000000ff259_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8e9e804a3cd384c3 // Shrine lights, volcano path lights, generic lights, electric balls - reflection pass // Glow Lights Color Mod @@ -11,15 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[13]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform samplerCubeArray textureUnitPS2;// Tex2 addr 0x3df6e800 res 3x3x1 dim 3 tm: 2 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x6) Sampler2 ClampX/Y/Z: 6 6 6 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x3df6f800 res 64x64x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[13]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform samplerCubeArray textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 3) uniform sampler2D textureUnitPS3; layout(location = 1) noperspective in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 @@ -157,7 +183,7 @@ bool predResult = true; vec3 cubeMapSTM; int cubeMapFaceId; float cubeMapArrayIndex2 = 0.0; -R0i = floatBitsToInt(vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)); +R0i = floatBitsToInt(GET_FRAGCOORD()); R1i = floatBitsToInt(passParameterSem0); // 0 R6i.x = 0x3f800000; diff --git a/Mods/BreathOfTheWild_GlowLightsColors/8fe014235f134ac1_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/8fe014235f134ac1_00000000000000e1_ps.txt index 1d8f76f6..9f72b40a 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/8fe014235f134ac1_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/8fe014235f134ac1_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8fe014235f134ac1 // Shrine - generic particles // Glow Lights Color Mod @@ -11,16 +28,27 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem3; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/99122c964b6a1a19_000000000001fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/99122c964b6a1a19_000000000001fe49_ps.txt index 873b4e42..c521c18d 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/99122c964b6a1a19_000000000001fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/99122c964b6a1a19_000000000001fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 99122c964b6a1a19 // Shrine - elevator reflection pass // Glow Lights Color Mod @@ -11,14 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[10]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x3df6f800 res 64x64x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[10]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 1) noperspective in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) @@ -77,7 +103,7 @@ activeMaskStackC[0] = true; activeMaskStackC[1] = true; vec3 cubeMapSTM; int cubeMapFaceId; -R0i = floatBitsToInt(vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)); +R0i = floatBitsToInt(GET_FRAGCOORD()); R1i = floatBitsToInt(passParameterSem0); if( activeMaskStackC[1] == true ) { // 0 diff --git a/Mods/BreathOfTheWild_GlowLightsColors/99fc7f42b65ca284_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/99fc7f42b65ca284_0000000000000709_ps.txt index cbbe0a1a..a427a68a 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/99fc7f42b65ca284_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/99fc7f42b65ca284_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 99fc7f42b65ca284 // Shrine - elevator // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21106000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x21412000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -26,7 +54,7 @@ layout(location = 6) in vec4 passParameterSem9; layout(location = 7) in vec4 passParameterSem11; layout(location = 8) in vec4 passParameterSem12; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/9aacad682248145f_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/9aacad682248145f_0000000000000709_ps.txt index 9a0b191f..3aca3f47 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/9aacad682248145f_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/9aacad682248145f_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 9aacad682248145f // Teleportation - part 1 // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x216a1000 res 64x64x1 dim 1 tm: 4 format 0001 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x211a9000 res 32x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -23,7 +51,7 @@ layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/9c9c75d87bb9b4ef_0000000f0f10e249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/9c9c75d87bb9b4ef_0000000f0f10e249_ps.txt index 32deaeaf..b1462fab 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/9c9c75d87bb9b4ef_0000000f0f10e249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/9c9c75d87bb9b4ef_0000000f0f10e249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 9c9c75d87bb9b4ef // Shrine - ceiling decorations // Glow Lights Color Mod @@ -11,13 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb10a3000 res 512x256x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb10d5000 res 512x256x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb10b4000 res 512x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xb10b4000 res 512x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xb09e5000 res 4012x2048x1 dim 1 tm: 4 format 0034 compSel: 0 4 4 4 mipView: 0x0 (num 0xc) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem7; @@ -28,7 +56,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/a02a462f9ba59f2e_000000003c3c4389_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/a02a462f9ba59f2e_000000003c3c4389_ps.txt index af9bee0f..216d0f6b 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/a02a462f9ba59f2e_000000003c3c4389_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/a02a462f9ba59f2e_000000003c3c4389_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a02a462f9ba59f2e // Sheikah Tower - inactive - middle part // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb22d2000 res 512x256x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb2305000 res 128x64x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb22e4000 res 512x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +52,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/a11251f0bffe8631_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/a11251f0bffe8631_000000000000001c_ps.txt index 628c47af..8d39c728 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/a11251f0bffe8631_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/a11251f0bffe8631_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a11251f0bffe8631 // Shrine - elevator particles 3 // Glow Lights Color Mod @@ -11,14 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/a54bdb88a57b9be9_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/a54bdb88a57b9be9_0000000000003849_ps.txt index 5edfdbc2..1c8f67b7 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/a54bdb88a57b9be9_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/a54bdb88a57b9be9_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a54bdb88a57b9be9 // Bomb - explosion particles 1 // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fc2000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 2 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x20fc9000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -25,7 +53,7 @@ layout(location = 4) in vec4 passParameterSem7; layout(location = 5) in vec4 passParameterSem8; layout(location = 6) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/a6ea718e4c60e157_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/a6ea718e4c60e157_00000000000000e1_ps.txt index 72d1646e..7a2fc580 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/a6ea718e4c60e157_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/a6ea718e4c60e157_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a6ea718e4c60e157 // Bomb - trails 2 // Glow Lights Color Mod @@ -11,17 +28,28 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21632000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/a6eb708e4b616557_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/a6eb708e4b616557_00000000000000e1_ps.txt index e7b251b1..f64a205e 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/a6eb708e4b616557_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/a6eb708e4b616557_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a6eb708e4b616557 // Bomb - explosion particles 2 // Glow Lights Color Mod @@ -11,17 +28,28 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21447000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 1 1 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/a95fbb49ae2c8f46_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/a95fbb49ae2c8f46_00000000000000e1_ps.txt index 1611b87d..19a1887a 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/a95fbb49ae2c8f46_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/a95fbb49ae2c8f46_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a95fbb49ae2c8f46 // Guardian scout fire // Glow Lights Color Mod @@ -11,15 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x211ac000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x211ac000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/b2cf5924b04ea6a4_0000000f0f0ff249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/b2cf5924b04ea6a4_0000000f0f0ff249_ps.txt index 88f0960f..51cfe493 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/b2cf5924b04ea6a4_0000000f0f0ff249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/b2cf5924b04ea6a4_0000000f0f0ff249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader b2cf5924b04ea6a4 // Shrine - metal chests // Glow Lights Color Mod @@ -11,11 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb915a000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb9198000 res 256x256x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb9197000 res 32x32x1 dim 1 tm: 2 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xb917b000 res 400x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +50,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/b2e1c9ce2f160aab_000000003c3c4389_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/b2e1c9ce2f160aab_000000003c3c4389_ps.txt index e89f45c6..3e2f266c 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/b2e1c9ce2f160aab_000000003c3c4389_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/b2e1c9ce2f160aab_000000003c3c4389_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader b2e1c9ce2f160aab // Shrine of Resurrection - lights // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb5e8b000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb5ecd000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb5eac000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -25,7 +53,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/b5b53042daaad65c_00000001e1e21c49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/b5b53042daaad65c_00000001e1e21c49_ps.txt index ceaf535a..34c120a5 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/b5b53042daaad65c_00000001e1e21c49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/b5b53042daaad65c_00000001e1e21c49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader b5b53042daaad65c // Shrine - elements // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb751f000 res 256x40x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb7525000 res 128x20x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb7522000 res 256x40x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xb750e000 res 424x256x1 dim 1 tm: 4 format 0034 compSel: 0 4 4 4 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 3) uniform sampler2D textureUnitPS7; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem3; layout(location = 2) in vec4 passParameterSem4; @@ -26,7 +54,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/bc9529a682410603_00000001e1e1fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/bc9529a682410603_00000001e1e1fe49_ps.txt index 2a9b265d..9cc5f8ff 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/bc9529a682410603_00000001e1e1fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/bc9529a682410603_00000001e1e1fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader bc9529a682410603 // Divine Beasts + Stones near Castle // Glow Lights Color Mod @@ -11,10 +28,19 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb428c000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb42ce000 res 256x256x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb42ad000 res 512x512x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -23,7 +49,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/beb15cab79e5ca5d_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/beb15cab79e5ca5d_000000000000001c_ps.txt index ead7ef22..a4da9323 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/beb15cab79e5ca5d_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/beb15cab79e5ca5d_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader beb15cab79e5ca5d // Shrine - ending Sheikah logo + Hateno fire flare // Glow Lights Color Mod @@ -11,14 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x21627000 res 91x202x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 1 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/bee298edc2f7e315_00000001e1e1fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/bee298edc2f7e315_00000001e1e1fe49_ps.txt index a34fb0b5..f38c94f4 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/bee298edc2f7e315_00000001e1e1fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/bee298edc2f7e315_00000001e1e1fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader bee298edc2f7e315 // Sheikah Tower - control panel // Glow Lights Color Mod @@ -11,10 +28,19 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[4]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb370e000 res 128x128x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb3753000 res 128x128x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb3712000 res 512x512x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[4]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -23,7 +49,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/bf72a1fd35401be2_0000079749255249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/bf72a1fd35401be2_0000079749255249_ps.txt index 9fb1d12c..30be30e9 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/bf72a1fd35401be2_0000079749255249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/bf72a1fd35401be2_0000079749255249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader bf72a1fd35401be2 // Shrine - lower elements // Glow Lights Color Mod @@ -11,44 +28,44 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 14) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 36, std140) uniform uniformBlockPS4 +UNIFORM_BUFFER_LAYOUT(36, 1, 15) uniform uniformBlockPS4 { vec4 uf_blockPS4[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 16) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 40, std140) uniform uniformBlockPS8 +UNIFORM_BUFFER_LAYOUT(40, 1, 17) uniform uniformBlockPS8 { vec4 uf_blockPS8[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 18) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x3965d800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform samplerCubeArray textureUnitPS1;// Tex1 addr 0x3db66800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2DArrayShadow textureUnitPS2;// Tex2 addr 0xf58a8000 res 360x360x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler2 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x3965d800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xac20b000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 1 1 1 border: 1 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0x3db8b000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform sampler3D textureUnitPS8;// Tex8 addr 0x3dee0000 res 32x32x32 dim 2 tm: 7 format 0034 compSel: 0 4 4 5 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x20) Sampler8 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 9) uniform sampler2DArray textureUnitPS9;// Tex9 addr 0xac455000 res 1024x1024x83 dim 5 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x53) Sampler9 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 10) uniform sampler2D textureUnitPS10;// Tex10 addr 0xb80bc000 res 256x128x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler10 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0xb80c6000 res 128x64x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0xb80c1000 res 256x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xb7ab8000 res 1936x1024x1 dim 1 tm: 4 format 0034 compSel: 0 4 4 4 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 0 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform samplerCubeArray textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2DArrayShadow textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 6) uniform sampler2D textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 7) uniform sampler3D textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 8) uniform sampler2DArray textureUnitPS9; +TEXTURE_LAYOUT(10, 1, 9) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 10) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(12, 1, 11) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(14, 1, 12) uniform sampler2D textureUnitPS14; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem4; @@ -58,7 +75,14 @@ layout(location = 5) in vec4 passParameterSem7; layout(location = 6) in vec4 passParameterSem8; layout(location = 7) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; +#ifdef VULKAN +layout(set = 1, binding = 13) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Mods/BreathOfTheWild_GlowLightsColors/c36b10f0e410def8_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/c36b10f0e410def8_00000000000000e1_ps.txt index dd14ec49..5fa0ebe7 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/c36b10f0e410def8_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/c36b10f0e410def8_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader c36b10f0e410def8 // Guardian scout fire 2 // Glow Lights Color Mod @@ -11,15 +28,24 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x214a1000 res 400x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 1 1 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/cb27783c5e10df0e_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/cb27783c5e10df0e_000000000000001c_ps.txt index 83e2ba2d..6ece3247 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/cb27783c5e10df0e_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/cb27783c5e10df0e_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader cb27783c5e10df0e // Shrine - elevator field 2 // Glow Lights Color Mod @@ -11,9 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedPS[1]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[1]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; @@ -21,7 +49,7 @@ layout(location = 3) in vec4 passParameterSem5; layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem11; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/cc9529ae1a492d03_00000001e1e1fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/cc9529ae1a492d03_00000001e1e1fe49_ps.txt index 39ab8e9b..51fd89d0 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/cc9529ae1a492d03_00000001e1e1fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/cc9529ae1a492d03_00000001e1e1fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader cc9529ae1a492d03 // Shrine - chests // Glow Lights Color Mod @@ -11,10 +28,19 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x347e9000 res 128x128x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x347f7000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x347eb000 res 512x512x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -23,7 +49,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/cd1eba6802df67f7_0000000f0f0ff249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/cd1eba6802df67f7_0000000f0f0ff249_ps.txt index d9ea7c20..c72d12b3 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/cd1eba6802df67f7_0000000f0f0ff249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/cd1eba6802df67f7_0000000f0f0ff249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader cd1eba6802df67f7 // Shrine - ceiling // Glow Lights Color Mod @@ -11,11 +28,20 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb7c6c000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb7cae000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb7c8d000 res 512x512x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xb7ab8000 res 1936x1024x1 dim 1 tm: 4 format 0034 compSel: 0 4 4 4 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 3) uniform sampler2D textureUnitPS7; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem3; layout(location = 2) in vec4 passParameterSem4; @@ -25,7 +51,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/ce76f7a67517c0b2_000000003c3c4389_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/ce76f7a67517c0b2_000000003c3c4389_ps.txt index e5a29022..3cae1f67 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/ce76f7a67517c0b2_000000003c3c4389_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/ce76f7a67517c0b2_000000003c3c4389_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader ce76f7a67517c0b2 // Shrine - top part // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x34839800 res 32x32x1 dim 1 tm: 2 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x3483b000 res 16x16x1 dim 1 tm: 2 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0x3483a000 res 16x16x1 dim 1 tm: 2 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -25,7 +53,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/cf2e9b7aab93e342_000000000001fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/cf2e9b7aab93e342_000000000001fe49_ps.txt index ff9af3fc..c1f8c950 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/cf2e9b7aab93e342_000000000001fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/cf2e9b7aab93e342_000000000001fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader cf2e9b7aab93e342 // Sheikah Tower - inactive, reflection pass // Glow Lights Color Mod @@ -11,14 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[10]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x3df6f800 res 64x64x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[10]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 1) noperspective in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) @@ -74,7 +100,7 @@ ivec4 ARi = ivec4(0); bool predResult = true; vec3 cubeMapSTM; int cubeMapFaceId; -R0i = floatBitsToInt(vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)); +R0i = floatBitsToInt(GET_FRAGCOORD()); R1i = floatBitsToInt(passParameterSem0); // 0 R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(R1i.x)) + 1.0)); diff --git a/Mods/BreathOfTheWild_GlowLightsColors/d178de668517df1e_000000003c3c4389_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/d178de668517df1e_000000003c3c4389_ps.txt index 092c83e2..1e85f69c 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/d178de668517df1e_000000003c3c4389_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/d178de668517df1e_000000003c3c4389_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader d178de668517df1e // Shrine - entrance top // Glow Lights Color Mod @@ -11,11 +28,22 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; uniform float uf_alphaTestRef; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb2ec1000 res 512x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb2eeb000 res 256x256x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb2ee2000 res 256x256x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -25,7 +53,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/d3ac3a61f7749326_000000000000001c_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/d3ac3a61f7749326_000000000000001c_ps.txt index 90e2cdf1..50ed5b9c 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/d3ac3a61f7749326_000000000000001c_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/d3ac3a61f7749326_000000000000001c_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader d3ac3a61f7749326 // Hateno fire particles // Glow Lights Color Mod @@ -11,14 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fee000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; layout(location = 3) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/d48de6ada1e9ad03_00000001e1e1fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/d48de6ada1e9ad03_00000001e1e1fe49_ps.txt index 2a14b6d9..2bf2dd13 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/d48de6ada1e9ad03_00000001e1e1fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/d48de6ada1e9ad03_00000001e1e1fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader d48de6ada1e9ad03 // Sheikah Towers - active - top part // Glow Lights Color Mod @@ -11,10 +28,19 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb1309000 res 1024x512x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb138b000 res 1024x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb134a000 res 512x1024x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem3; @@ -23,7 +49,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/db8bc69330c08206_0000000000003849_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/db8bc69330c08206_0000000000003849_ps.txt index 6126bd4d..7dbee6a6 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/db8bc69330c08206_0000000000003849_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/db8bc69330c08206_0000000000003849_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader db8bc69330c08206 // Shrine - elevator particles 1 // Glow Lights Color Mod @@ -11,12 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2140e000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x214e1000 res 64x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x214e1000 res 64x400x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 0 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; @@ -24,7 +52,7 @@ layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/e53233e53de8434f_0000000000000709_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/e53233e53de8434f_0000000000000709_ps.txt index 6b00f5df..543ca833 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/e53233e53de8434f_0000000000000709_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/e53233e53de8434f_0000000000000709_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader e53233e53de8434f // Bomb - debris // Glow Lights Color Mod @@ -11,10 +28,19 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x2118a000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 0 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x2118e000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x2118a000 res 128x128x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem4; @@ -22,7 +48,7 @@ layout(location = 3) in vec4 passParameterSem7; layout(location = 4) in vec4 passParameterSem8; layout(location = 5) in vec4 passParameterSem9; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/e95d54571be1c0a9_000000000001fe49_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/e95d54571be1c0a9_000000000001fe49_ps.txt index 9b484503..473d1353 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/e95d54571be1c0a9_000000000001fe49_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/e95d54571be1c0a9_000000000001fe49_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader e95d54571be1c0a9 // Shrine - balls, reflection pass // Glow Lights Color Mod @@ -11,14 +28,23 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[8]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x3df6f800 res 64x64x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[8]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 1) noperspective in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) @@ -68,7 +94,7 @@ ivec4 ARi = ivec4(0); bool predResult = true; vec3 cubeMapSTM; int cubeMapFaceId; -R0i = floatBitsToInt(vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)); +R0i = floatBitsToInt(GET_FRAGCOORD()); R1i = floatBitsToInt(passParameterSem0); // 0 PV0i.x = floatBitsToInt(intBitsToFloat(R1i.x) + -(intBitsToFloat(uf_remappedPS[0].x))); diff --git a/Mods/BreathOfTheWild_GlowLightsColors/f62be0d03546ec39_00000000000000e1_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/f62be0d03546ec39_00000000000000e1_ps.txt index fa28ce3a..4d6aaa56 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/f62be0d03546ec39_00000000000000e1_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/f62be0d03546ec39_00000000000000e1_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader f62be0d03546ec39 // Guardian scout fire 1 // Glow Lights Color Mod @@ -11,17 +28,28 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; uniform float uf_alphaTestRef; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x20fd4000 res 128x128x1 dim 1 tm: 4 format 0035 compSel: 0 0 0 1 mipView: 0x0 (num 0x8) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 1 1 0 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 2 2 0 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform float uf_alphaTestRef; +uniform vec2 uf_fragCoordScale; +#endif +// uf_alphaTestRef was moved to the ufBlock +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem3; layout(location = 3) in vec4 passParameterSem4; layout(location = 4) in vec4 passParameterSem8; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/fb135efcb4540fb1_00000078787f9249_ps.txt b/Mods/BreathOfTheWild_GlowLightsColors/fb135efcb4540fb1_00000078787f9249_ps.txt index b9869dc7..23582bc6 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/fb135efcb4540fb1_00000078787f9249_ps.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/fb135efcb4540fb1_00000078787f9249_ps.txt @@ -1,5 +1,22 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader fb135efcb4540fb1 // Shrine - wall decoration // Glow Lights Color Mod @@ -11,12 +28,21 @@ #define ALPHA_FACTOR 1.0 //same as above; applies to Transparency const float hueRotation = HUE_ROTATION / 360.0; +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xb80c8000 res 1024x1024x1 dim 1 tm: 4 format 0431 compSel: 0 1 2 3 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0xb815b000 res 512x512x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xb814a000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xb814a000 res 256x256x1 dim 1 tm: 4 format 0035 compSel: 0 1 1 1 mipView: 0x0 (num 0x9) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 7) uniform sampler2D textureUnitPS7;// Tex7 addr 0xb7ab8000 res 1936x1024x1 dim 1 tm: 4 format 0034 compSel: 0 4 4 4 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler7 ClampX/Y/Z: 2 2 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(3, 1, 0) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(4, 1, 1) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2D textureUnitPS7; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem7; @@ -27,7 +53,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Mods/BreathOfTheWild_GlowLightsColors/rules.txt b/Mods/BreathOfTheWild_GlowLightsColors/rules.txt index 72b23687..34d32d6d 100644 --- a/Mods/BreathOfTheWild_GlowLightsColors/rules.txt +++ b/Mods/BreathOfTheWild_GlowLightsColors/rules.txt @@ -3,4 +3,4 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = "Glow Lights Colors" path = "The Legend of Zelda: Breath of the Wild/Mods/Glow Lights Colors" description = Changes the color of objects that glow in game, view the readme for more info. -version = 3 +version = 4 diff --git a/Mods/BreathOfTheWild_HUDRemover/37b9100c1310d3bb_0000000000000000_vs.txt b/Mods/BreathOfTheWild_HUDRemover/37b9100c1310d3bb_0000000000000000_vs.txt index 0542386a..7a18a643 100644 --- a/Mods/BreathOfTheWild_HUDRemover/37b9100c1310d3bb_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_HUDRemover/37b9100c1310d3bb_0000000000000000_vs.txt @@ -1,11 +1,36 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 37b9100c1310d3bb // PRO+ hud v2 +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_uniformRegisterVS[256]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_uniformRegisterVS[256]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -969,7 +994,7 @@ PS0i = R1i.y; R0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R3i.w), intBitsToFloat(uf_uniformRegisterVS[0].w))); } // export -gl_Position = vec4(intBitsToFloat(R6i.x), intBitsToFloat(R6i.y), intBitsToFloat(R6i.z), intBitsToFloat(R6i.w)); +SET_POSITION(vec4(intBitsToFloat(R6i.x), intBitsToFloat(R6i.y), intBitsToFloat(R6i.z), intBitsToFloat(R6i.w))); if (isCurrentSizeEqualTo(vec2(84, 84)) || isCurrentSizeEqualTo(vec2(36, 40)) || //master mode logo shadow isCurrentSizeEqualTo(vec2(90, 90)) || diff --git a/Mods/BreathOfTheWild_HUDRemover/4d58e6f0906ff5cf_0000000000000000_vs.txt b/Mods/BreathOfTheWild_HUDRemover/4d58e6f0906ff5cf_0000000000000000_vs.txt index c0b78389..ef87cfa4 100644 --- a/Mods/BreathOfTheWild_HUDRemover/4d58e6f0906ff5cf_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_HUDRemover/4d58e6f0906ff5cf_0000000000000000_vs.txt @@ -1,11 +1,36 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 4d58e6f0906ff5cf // PRO+ hud v2 +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[29]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[29]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -914,7 +939,7 @@ R0i.y = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + 1.0); PS0i = R0i.y; } // export -gl_Position = vec4(intBitsToFloat(R5i.x), intBitsToFloat(R5i.y), intBitsToFloat(R5i.z), intBitsToFloat(R5i.w)); +SET_POSITION(vec4(intBitsToFloat(R5i.x), intBitsToFloat(R5i.y), intBitsToFloat(R5i.z), intBitsToFloat(R5i.w))); if (isCurrentSizeEqualTo(vec2(32, 32))) { gl_Position.y -= 9000.0; } diff --git a/Mods/BreathOfTheWild_HUDRemover/75faf095372864b1_0000000000000000_vs.txt b/Mods/BreathOfTheWild_HUDRemover/75faf095372864b1_0000000000000000_vs.txt index 2c22e89e..d35970f6 100644 --- a/Mods/BreathOfTheWild_HUDRemover/75faf095372864b1_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_HUDRemover/75faf095372864b1_0000000000000000_vs.txt @@ -1,11 +1,36 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 75faf095372864b1 // PRO+ hud v2 +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_uniformRegisterVS[256]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_uniformRegisterVS[256]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -1413,7 +1438,7 @@ PS0i = R1i.y; R0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R8i.w), intBitsToFloat(uf_uniformRegisterVS[0].w))); } // export -gl_Position = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w)); +SET_POSITION(vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w))); if (isCurrentSizeEqualTo(vec2(32, 32)) || isCurrentSizeEqualTo(vec2(64, 64)) // hearts while taking damage ) { diff --git a/Mods/BreathOfTheWild_HUDRemover/b88c6020a8b17332_0000000000000000_vs.txt b/Mods/BreathOfTheWild_HUDRemover/b88c6020a8b17332_0000000000000000_vs.txt index 96c328ff..362f4852 100644 --- a/Mods/BreathOfTheWild_HUDRemover/b88c6020a8b17332_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_HUDRemover/b88c6020a8b17332_0000000000000000_vs.txt @@ -1,11 +1,36 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader b88c6020a8b17332 // PRO+ hud v2 +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[17]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[17]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -463,7 +488,7 @@ R0i.y = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + 1.0); PS0i = R0i.y; } // export -gl_Position = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +SET_POSITION(vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w))); if (//isCurrentSizeEqualTo(vec2(36, 36)) || //master mode logo isCurrentSizeEqualTo(vec2(80, 80)) || isCurrentSizeEqualTo(vec2(84, 84)) || diff --git a/Mods/BreathOfTheWild_HUDRemover/f56fcbd319ceba00_0000000000000000_vs.txt b/Mods/BreathOfTheWild_HUDRemover/f56fcbd319ceba00_0000000000000000_vs.txt index 4ac461dc..01e4eae3 100644 --- a/Mods/BreathOfTheWild_HUDRemover/f56fcbd319ceba00_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_HUDRemover/f56fcbd319ceba00_0000000000000000_vs.txt @@ -1,11 +1,36 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader f56fcbd319ceba00 // PRO+ hud v2 +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[23]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[23]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -696,7 +721,7 @@ R0i.y = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + 1.0); PS0i = R0i.y; } // export -gl_Position = vec4(intBitsToFloat(R5i.x), intBitsToFloat(R5i.y), intBitsToFloat(R5i.z), intBitsToFloat(R5i.w)); +SET_POSITION(vec4(intBitsToFloat(R5i.x), intBitsToFloat(R5i.y), intBitsToFloat(R5i.z), intBitsToFloat(R5i.w))); if (isCurrentSizeEqualTo(vec2(70, 70)) || isCurrentSizeEqualTo(vec2(80, 80)) //stamina 3rd red flash ) { diff --git a/Mods/BreathOfTheWild_HUDRemover/f7ba548c1fefe24a_0000000000000000_vs.txt b/Mods/BreathOfTheWild_HUDRemover/f7ba548c1fefe24a_0000000000000000_vs.txt index 2589f629..df6b87e4 100644 --- a/Mods/BreathOfTheWild_HUDRemover/f7ba548c1fefe24a_0000000000000000_vs.txt +++ b/Mods/BreathOfTheWild_HUDRemover/f7ba548c1fefe24a_0000000000000000_vs.txt @@ -1,11 +1,36 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader f7ba548c1fefe24a // PRO+ hud v2 +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_uniformRegisterVS[256]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_uniformRegisterVS[256]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -1203,7 +1228,7 @@ PS0i = R1i.y; R0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.w), intBitsToFloat(uf_uniformRegisterVS[0].w))); } // export -gl_Position = vec4(intBitsToFloat(R9i.x), intBitsToFloat(R9i.y), intBitsToFloat(R9i.z), intBitsToFloat(R9i.w)); +SET_POSITION(vec4(intBitsToFloat(R9i.x), intBitsToFloat(R9i.y), intBitsToFloat(R9i.z), intBitsToFloat(R9i.w))); if (isCurrentSizeEqualTo(vec2(56, 56)) || isCurrentSizeEqualTo(vec2(70, 70))) { gl_Position.y -= 9000.0; diff --git a/Mods/BreathOfTheWild_HUDRemover/rules.txt b/Mods/BreathOfTheWild_HUDRemover/rules.txt index e18a1d5b..3940b18a 100644 --- a/Mods/BreathOfTheWild_HUDRemover/rules.txt +++ b/Mods/BreathOfTheWild_HUDRemover/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = "Remove all HUD elements" path = "The Legend of Zelda: Breath of the Wild/Mods/HUD Remover (Pro HUD+)" description = Hides the rest of the HUD that isn't removed by the Pro mod for e.g. screenshots. -version = 3 +version = 4 [TextureRedefine] # Disable Hearts width = 48 diff --git a/Mods/BreathOfTheWild_ReshadeCompatibility/rules.txt b/Mods/BreathOfTheWild_ReshadeCompatibility/rules.txt index 9d381be6..04e839d8 100644 --- a/Mods/BreathOfTheWild_ReshadeCompatibility/rules.txt +++ b/Mods/BreathOfTheWild_ReshadeCompatibility/rules.txt @@ -3,4 +3,4 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Fixes Reshade depth buffer compatibility path = "The Legend of Zelda: Breath of the Wild/Mods/Reshade compatibility" description = DON'T ENABLE THIS IF YOU'RE NOT USING RESHADE. Makes some reshade effects like e.g. MXAO and ray tracing not have issues. Will make distant mountains and geometry have flickering textures. -version = 3 +version = 4 diff --git a/Resolutions/BreathOfTheWild_Resolution/01ba1a725afa0b96_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/01ba1a725afa0b96_0000000000000000_vs.txt index e7c548f5..6ba9c76e 100644 --- a/Resolutions/BreathOfTheWild_Resolution/01ba1a725afa0b96_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/01ba1a725afa0b96_0000000000000000_vs.txt @@ -1,7 +1,6 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable -#extension GL_ARB_shading_language_packing : enable #ifdef VULKAN #define gl_VertexID gl_VertexIndex #define gl_InstanceID gl_InstanceIndex @@ -9,27 +8,42 @@ #else #define SET_POSITION(_v) gl_Position = _v #endif +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + const float resScale = $height/720.0; // Night star (size) // shader 01ba1a725afa0b96 -layout(binding = 1, std140) -uniform uniformBlockVS1 +UNIFORM_BUFFER_LAYOUT(1, 0, 0) uniform uniformBlockVS1 { vec4 uf_blockVS1[1024]; }; -layout(binding = 2, std140) -uniform uniformBlockVS2 +UNIFORM_BUFFER_LAYOUT(2, 0, 1) uniform uniformBlockVS2 { vec4 uf_blockVS2[1024]; }; -layout(location = 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; diff --git a/Resolutions/BreathOfTheWild_Resolution/01bef64ec0cccd53_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/01bef64ec0cccd53_0000000000000000_vs.txt index d0af0228..89fd083a 100644 --- a/Resolutions/BreathOfTheWild_Resolution/01bef64ec0cccd53_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/01bef64ec0cccd53_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 01bef64ec0cccd53 // Used for: Fixing clouds in non-updated versions const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -69,7 +94,7 @@ R0i.y = floatBitsToInt(intBitsToFloat(R0i.y) / 2.0); PS0i = R0i.y; R3i.xy = ivec4(textureSize(textureUnitVS0, 0),1,1).xy; // export -gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z)); +SET_POSITION(vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.z))); // 0 PV0i.x = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[0].w)/resYScale)); PV0i.x = floatBitsToInt(intBitsToFloat(PV0i.x) / 2.0); diff --git a/Resolutions/BreathOfTheWild_Resolution/0b9b8f5dfa16ad58_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/0b9b8f5dfa16ad58_0000000000000000_vs.txt index 302b1d4b..1608638b 100644 --- a/Resolutions/BreathOfTheWild_Resolution/0b9b8f5dfa16ad58_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/0b9b8f5dfa16ad58_0000000000000000_vs.txt @@ -1,14 +1,39 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 0b9b8f5dfa16ad58 // Used For: Horizontal Menu Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -104,7 +129,7 @@ R1f.y = PV1f.z + -(R126f.x); R1f.z = PV1f.z + R126f.x; R1f.w = PV1f.z; // export -gl_Position = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +SET_POSITION(vec4(R0f.x, R0f.y, R0f.z, R0f.w)); // export passParameterSem0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); } diff --git a/Resolutions/BreathOfTheWild_Resolution/0bcd653c18367d59_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/0bcd653c18367d59_0000000000000000_vs.txt index 5b7f96b2..fd8cc2c8 100644 --- a/Resolutions/BreathOfTheWild_Resolution/0bcd653c18367d59_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/0bcd653c18367d59_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 0bcd653c18367d59 // Used for: Restoring the native BotW Anti-Aliasing implementation const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0x3db8b000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -125,7 +150,7 @@ PS0i = R6i.y; R1i.w = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.wz)).x); R1i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.xy)).xyz); // export -gl_Position = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +SET_POSITION(vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w))); // export // skipped export to semanticId 255 // 0 diff --git a/Resolutions/BreathOfTheWild_Resolution/0d6127fbed646d2b_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/0d6127fbed646d2b_0000000000000000_vs.txt index 392f74c9..7bfbd14d 100644 --- a/Resolutions/BreathOfTheWild_Resolution/0d6127fbed646d2b_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/0d6127fbed646d2b_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 0d6127fbed646d2b // Used for: Fixing Ambient-Occlusion const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0x3db8b000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -107,7 +132,7 @@ PS1i = R4i.x; R0i.w = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.wy)).x); R0i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R1i.xy)).xyz); // export -gl_Position = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +SET_POSITION(vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w))); // export // skipped export to semanticId 255 // 0 diff --git a/Resolutions/BreathOfTheWild_Resolution/0f2b9ee517917425_00000000000003c9_ps.txt b/Resolutions/BreathOfTheWild_Resolution/0f2b9ee517917425_00000000000003c9_ps.txt index 4ae1abed..29887ca1 100644 --- a/Resolutions/BreathOfTheWild_Resolution/0f2b9ee517917425_00000000000003c9_ps.txt +++ b/Resolutions/BreathOfTheWild_Resolution/0f2b9ee517917425_00000000000003c9_ps.txt @@ -1,17 +1,43 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 0f2b9ee517917425 - dumped cemu 1.15 // Used for: Restoring the native BotW Anti-Aliasing implementation in inventory screen const float resX = float($width)/float($gameWidth); const float resY = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[2]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf49b1800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x37b40000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[2]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { diff --git a/Resolutions/BreathOfTheWild_Resolution/141f484aff9b9f5a_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/141f484aff9b9f5a_0000000000000000_vs.txt index ae6e661d..9e8123f4 100644 --- a/Resolutions/BreathOfTheWild_Resolution/141f484aff9b9f5a_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/141f484aff9b9f5a_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 141f484aff9b9f5a // Used for: Anti-Aliasing Color Mix const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[3]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[3]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -71,7 +96,7 @@ PV1f.y = R123f.y; R2f.z = PV1f.y; R2f.w = PV1f.x; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem2 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); } diff --git a/Resolutions/BreathOfTheWild_Resolution/15afdae4307b9a3d_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/15afdae4307b9a3d_0000000000000000_vs.txt index eaf5831c..5aca9867 100644 --- a/Resolutions/BreathOfTheWild_Resolution/15afdae4307b9a3d_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/15afdae4307b9a3d_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 15afdae4307b9a3d // Used for: Vertical Ambient-Occlusion Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -70,7 +95,7 @@ R2f.w = R2f.y; R2f.y = backupReg0f + -(intBitsToFloat(uf_remappedVS[0].y))/resYScale; PS1f = R2f.y; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/1a14de8e58d5b30a_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/1a14de8e58d5b30a_0000000000000000_vs.txt index afc40515..98c17ada 100644 --- a/Resolutions/BreathOfTheWild_Resolution/1a14de8e58d5b30a_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/1a14de8e58d5b30a_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 1a14de8e58d5b30a // Used for: Restoring the native BotW Anti-Aliasing implementation const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0x3db8b000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -111,7 +136,7 @@ R3i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.wz)).xyz); R0i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.xy)).xyz); R4i.w = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R1i.xz)).y); // export -gl_Position = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +SET_POSITION(vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w))); // 0 R127i.x = uf_remappedVS[1].z; R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0); diff --git a/Resolutions/BreathOfTheWild_Resolution/381d034349896360_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/381d034349896360_0000000000000000_vs.txt index 43e0a54e..3067c34a 100644 --- a/Resolutions/BreathOfTheWild_Resolution/381d034349896360_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/381d034349896360_0000000000000000_vs.txt @@ -1,14 +1,39 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 381d034349896360 // Used for: Horizontal Volumetric Light Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -101,7 +126,7 @@ R1f.y = (-(intBitsToFloat(uf_remappedVS[4].z)) * 0.5 / resXScale + PV1f.y); R1f.z = (intBitsToFloat(uf_remappedVS[4].z) * 0.5 / resXScale + PV1f.y); R1f.w = PV1f.y; // export -gl_Position = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +SET_POSITION(vec4(R0f.x, R0f.y, R0f.z, R0f.w)); // export passParameterSem0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); } diff --git a/Resolutions/BreathOfTheWild_Resolution/44b73ce02e05c2e6_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/44b73ce02e05c2e6_0000000000000000_vs.txt index a16ffc1d..90ae48c6 100644 --- a/Resolutions/BreathOfTheWild_Resolution/44b73ce02e05c2e6_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/44b73ce02e05c2e6_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 44b73ce02e05c2e6 // Used for: Vertical Self-Shadowing Mask Fix Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -88,7 +113,7 @@ backupReg0f = R2f.y; R2f.y = backupReg0f + -(R126f.x); R2f.w = backupReg0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/4721609a424e9a1f_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/4721609a424e9a1f_0000000000000000_vs.txt index 4c82712d..687d91b8 100644 --- a/Resolutions/BreathOfTheWild_Resolution/4721609a424e9a1f_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/4721609a424e9a1f_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 4721609a424e9a1f // Used for: Restoring the native BotW Anti-Aliasing implementation const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0x3db8b000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -122,7 +147,7 @@ PS0i = R3i.y; R2i.w = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.wz)).x); R2i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.xy)).xyz); // export -gl_Position = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w)); +SET_POSITION(vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w))); // export // skipped export to semanticId 255 // 0 diff --git a/Resolutions/BreathOfTheWild_Resolution/5c1761d13feccdff_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/5c1761d13feccdff_0000000000000000_vs.txt index 56f4eda7..631de591 100644 --- a/Resolutions/BreathOfTheWild_Resolution/5c1761d13feccdff_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/5c1761d13feccdff_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 5c1761d13feccdff // Used for: Vertical+Horizontal Fullscreen Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -72,7 +97,7 @@ PS1f = R2f.x; // 2 R2f.w = PV1f.x; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem3 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); } diff --git a/Resolutions/BreathOfTheWild_Resolution/5c975b0e3dac0562_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/5c975b0e3dac0562_0000000000000000_vs.txt index 9a52f838..ca791181 100644 --- a/Resolutions/BreathOfTheWild_Resolution/5c975b0e3dac0562_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/5c975b0e3dac0562_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 5c975b0e3dac0562 // Used for: Horizontal Bloom Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -78,7 +103,7 @@ R2f.y = backupReg0f + -(PV1f.x); R2f.z = backupReg0f + PV1f.x; R2f.w = backupReg0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/75a85b0cbcab764b_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/75a85b0cbcab764b_0000000000000000_vs.txt index 72cab487..86861091 100644 --- a/Resolutions/BreathOfTheWild_Resolution/75a85b0cbcab764b_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/75a85b0cbcab764b_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 75a85b0cbcab764b // Used for: Horizontal Reflection Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -78,7 +103,7 @@ R2f.y = backupReg0f + -(PV1f.x); R2f.z = backupReg0f + PV1f.x; R2f.w = backupReg0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/771e24915acbb074_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/771e24915acbb074_0000000000000000_vs.txt index c87033dd..e98fefeb 100644 --- a/Resolutions/BreathOfTheWild_Resolution/771e24915acbb074_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/771e24915acbb074_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 771e24915acbb074 // Used for: Vertical Reflection Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -84,7 +109,7 @@ backupReg0f = R2f.y; R2f.y = backupReg0f + -(R127f.x); R2f.w = backupReg0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/81eb264a750163d9_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/81eb264a750163d9_0000000000000000_vs.txt index 317a51ca..297dce20 100644 --- a/Resolutions/BreathOfTheWild_Resolution/81eb264a750163d9_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/81eb264a750163d9_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 81eb264a750163d9 // Used for: Vertical Volumetric Light Blur // volumetric light blur v const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -101,7 +126,7 @@ R1f.y = (-(intBitsToFloat(uf_remappedVS[4].w)) * 0.5 / resYScale + PV1f.x); R1f.z = (intBitsToFloat(uf_remappedVS[4].w) * 0.5 / resYScale + PV1f.x); R1f.w = PV1f.x; // export -gl_Position = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +SET_POSITION(vec4(R0f.x, R0f.y, R0f.z, R0f.w)); // export passParameterSem0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); } diff --git a/Resolutions/BreathOfTheWild_Resolution/8cab2ed476b991ea_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/8cab2ed476b991ea_0000000000000000_vs.txt index 847f6371..14292753 100644 --- a/Resolutions/BreathOfTheWild_Resolution/8cab2ed476b991ea_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/8cab2ed476b991ea_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8cab2ed476b991ea // Used for: Restoring the native BotW Anti-Aliasing implementation const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -76,7 +101,7 @@ R2f.y = (mul_nonIEEE(R0f.y,intBitsToFloat(uf_remappedVS[0].y)*resYScale) + 0.5); R2f.z = PV1f.y; R2f.w = PV1f.x; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.z); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.z)); // export passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/93f16bf1d083933b_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/93f16bf1d083933b_0000000000000000_vs.txt index 953240c2..564be726 100644 --- a/Resolutions/BreathOfTheWild_Resolution/93f16bf1d083933b_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/93f16bf1d083933b_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 93f16bf1d083933b // Used for: Horizontal Self-Shadowing Mask Fix Blur // Self shadowing mask fix - h blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -85,7 +110,7 @@ PS0f = R0f.y; // 3 R0f.z = R2f.x + R127f.x; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem1 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/a1cb9f79d093badb_0000f0f0ff34db6d_ps.txt b/Resolutions/BreathOfTheWild_Resolution/a1cb9f79d093badb_0000f0f0ff34db6d_ps.txt index 7cbfac26..881329d2 100644 --- a/Resolutions/BreathOfTheWild_Resolution/a1cb9f79d093badb_0000f0f0ff34db6d_ps.txt +++ b/Resolutions/BreathOfTheWild_Resolution/a1cb9f79d093badb_0000f0f0ff34db6d_ps.txt @@ -1,19 +1,45 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a1cb9f79d093badb // Used for: Restoring the native BotW Anti-Aliasing implementation from water edges const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 8) uniform ufBlock +{ uniform ivec4 uf_remappedPS[20]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2DArray textureUnitPS2;// Tex2 addr 0xf5593000 res 640x360x2 dim 5 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x2) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf4ccf000 res 1280x720x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2DArray textureUnitPS7;// Tex7 addr 0x313ec000 res 512x512x8 dim 5 tm: 4 format 0035 compSel: 0 1 5 5 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x8) Sampler7 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 8) uniform sampler2DArray textureUnitPS8;// Tex8 addr 0x313ec000 res 512x512x8 dim 5 tm: 4 format 0035 compSel: 0 1 5 5 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x8) Sampler8 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 9) uniform sampler2DArray textureUnitPS9;// Tex9 addr 0x31391000 res 512x512x8 dim 5 tm: 4 format 0034 compSel: 0 0 0 0 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x8) Sampler9 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 10) uniform sampler2DArray textureUnitPS10;// Tex10 addr 0x313ec000 res 512x512x8 dim 5 tm: 4 format 0035 compSel: 0 1 5 5 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x8) Sampler10 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 11) uniform sampler2DArray textureUnitPS11;// Tex11 addr 0x313ec000 res 512x512x8 dim 5 tm: 4 format 0035 compSel: 0 1 5 5 mipView: 0x0 (num 0xa) sliceView: 0x0 (num 0x8) Sampler11 ClampX/Y/Z: 0 0 2 border: 0 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[20]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2DArray textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(7, 1, 3) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(8, 1, 4) uniform sampler2DArray textureUnitPS8; +TEXTURE_LAYOUT(9, 1, 5) uniform sampler2DArray textureUnitPS9; +TEXTURE_LAYOUT(10, 1, 6) uniform sampler2DArray textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2DArray textureUnitPS11; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 2) in vec4 passParameterSem2; @@ -29,7 +55,7 @@ layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 3) out vec4 passPixelColor3; layout(location = 5) out vec4 passPixelColor5; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/BreathOfTheWild_Resolution/a5b3a5e5ab2938bc_0000000000001e49_ps.txt b/Resolutions/BreathOfTheWild_Resolution/a5b3a5e5ab2938bc_0000000000001e49_ps.txt index 2373b508..083d0266 100644 --- a/Resolutions/BreathOfTheWild_Resolution/a5b3a5e5ab2938bc_0000000000001e49_ps.txt +++ b/Resolutions/BreathOfTheWild_Resolution/a5b3a5e5ab2938bc_0000000000001e49_ps.txt @@ -1,18 +1,44 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a5b3a5e5ab2938bc // Used for: Restoring the native BotW Anti-Aliasing implementation const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ad000 res 640x360x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem1; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/BreathOfTheWild_Resolution/b4a729584b6188ea_0000000000001e49_ps.txt b/Resolutions/BreathOfTheWild_Resolution/b4a729584b6188ea_0000000000001e49_ps.txt index c5eb3e3d..3d0647f9 100644 --- a/Resolutions/BreathOfTheWild_Resolution/b4a729584b6188ea_0000000000001e49_ps.txt +++ b/Resolutions/BreathOfTheWild_Resolution/b4a729584b6188ea_0000000000001e49_ps.txt @@ -1,17 +1,43 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader b4a729584b6188ea // Used for: Restoring the native BotW Anti-Aliasing implementation for distant trees const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[3]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ad000 res 640x360x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[3]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/BreathOfTheWild_Resolution/bb50d2ee4fa87bc2_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/bb50d2ee4fa87bc2_0000000000000000_vs.txt index 2ab76e47..3176b13d 100644 --- a/Resolutions/BreathOfTheWild_Resolution/bb50d2ee4fa87bc2_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/bb50d2ee4fa87bc2_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader bb50d2ee4fa87bc2 // Used for: Horizontal+Vertical Combat Targeting Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0x3db8b000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -108,7 +133,7 @@ PS1i = R4i.x; R0i.w = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.wy)).x); R0i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R1i.xy)).xyz); // export -gl_Position = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +SET_POSITION(vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w))); // export passParameterSem2 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w)); // 0 diff --git a/Resolutions/BreathOfTheWild_Resolution/c92c1c4c0a2fb839_0000000000001e49_ps.txt b/Resolutions/BreathOfTheWild_Resolution/c92c1c4c0a2fb839_0000000000001e49_ps.txt index 5c769204..7e2752a4 100644 --- a/Resolutions/BreathOfTheWild_Resolution/c92c1c4c0a2fb839_0000000000001e49_ps.txt +++ b/Resolutions/BreathOfTheWild_Resolution/c92c1c4c0a2fb839_0000000000001e49_ps.txt @@ -1,17 +1,43 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader c92c1c4c0a2fb839 // Used for: Camera Depth of Field Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 3) uniform ufBlock +{ uniform ivec4 uf_remappedPS[5]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[5]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Resolutions/BreathOfTheWild_Resolution/c9f2fd37115b0ee1_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/c9f2fd37115b0ee1_0000000000000000_vs.txt index 06d804f6..6e1597f1 100644 --- a/Resolutions/BreathOfTheWild_Resolution/c9f2fd37115b0ee1_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/c9f2fd37115b0ee1_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader c9f2fd37115b0ee1 // Used for: Horizontal+Vertical Combat Targeting Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 1) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0x3db8b000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +TEXTURE_LAYOUT(32, 0, 0) uniform sampler2D textureUnitVS0; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -107,7 +132,7 @@ R5i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R0i.wy)).xyz); R4i.xyz = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R1i.xy)).xyz); R1i.w = floatBitsToInt(texture(textureUnitVS0, intBitsToFloat(R1i.zw)).y); // export -gl_Position = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +SET_POSITION(vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w))); // 0 R127i.x = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z))); R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0); diff --git a/Resolutions/BreathOfTheWild_Resolution/cb0e6e8cbec4502a_0000000000000079_ps.txt b/Resolutions/BreathOfTheWild_Resolution/cb0e6e8cbec4502a_0000000000000079_ps.txt index 7427e50e..1c53e8d1 100644 --- a/Resolutions/BreathOfTheWild_Resolution/cb0e6e8cbec4502a_0000000000000079_ps.txt +++ b/Resolutions/BreathOfTheWild_Resolution/cb0e6e8cbec4502a_0000000000000079_ps.txt @@ -1,14 +1,38 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader cb0e6e8cbec4502a // Used for: 1 pass Battle, Camera and Scope Depth of Field Blur -layout(binding = 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; layout(location = 0) in vec4 passParameterSem3; layout(location = 0) out vec4 passPixelColor0; +#ifdef VULKAN +layout(set = 1, binding = 1) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int radius = int( roundEven(2.0/uf_fragCoordScale.y) ); vec2 resolution = vec2( textureSize(textureUnitPS0,0) ); diff --git a/Resolutions/BreathOfTheWild_Resolution/d1cf6920c3d5b194_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/d1cf6920c3d5b194_0000000000000000_vs.txt index 6c96a65b..6939273a 100644 --- a/Resolutions/BreathOfTheWild_Resolution/d1cf6920c3d5b194_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/d1cf6920c3d5b194_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader d1cf6920c3d5b194 // Used for: Restoring the native BotW Anti-Aliasing implementation for distant trees const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -67,7 +92,7 @@ PS0f = R122f.x; R2f.z = PV0f.w; R2f.w = PS0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.z); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.z)); // export passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); } diff --git a/Resolutions/BreathOfTheWild_Resolution/e06e20b2efe87a84_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/e06e20b2efe87a84_0000000000000000_vs.txt index cc68869e..67ea0973 100644 --- a/Resolutions/BreathOfTheWild_Resolution/e06e20b2efe87a84_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/e06e20b2efe87a84_0000000000000000_vs.txt @@ -1,15 +1,40 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader e06e20b2efe87a84 // Used for: Horizontal Ambient-Occlusion Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -73,7 +98,7 @@ R2f.w = backupReg0f; R2f.y = backupReg0f + -(intBitsToFloat(uf_remappedVS[0].x))/resXScale; PS1f = R2f.y; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/ea9a49a6185cf1e5_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/ea9a49a6185cf1e5_0000000000000000_vs.txt index 156bdeb8..8adeb78b 100644 --- a/Resolutions/BreathOfTheWild_Resolution/ea9a49a6185cf1e5_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/ea9a49a6185cf1e5_0000000000000000_vs.txt @@ -1,14 +1,39 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader ea9a49a6185cf1e5 // Used for: Fix Reflection const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[2]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[2]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -94,7 +119,7 @@ PS0f = R3f.x; // 5 R3f.y = (mul_nonIEEE(R126f.x,-(intBitsToFloat(uf_remappedVS[1].y))) + -(intBitsToFloat(uf_remappedVS[1].w))); // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.z); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/f14bb57cd5c9cb77_00000000000003c9_ps.txt b/Resolutions/BreathOfTheWild_Resolution/f14bb57cd5c9cb77_00000000000003c9_ps.txt index fbe56b7e..a0ac7b60 100644 --- a/Resolutions/BreathOfTheWild_Resolution/f14bb57cd5c9cb77_00000000000003c9_ps.txt +++ b/Resolutions/BreathOfTheWild_Resolution/f14bb57cd5c9cb77_00000000000003c9_ps.txt @@ -1,6 +1,23 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader f14bb57cd5c9cb77 - dumped 1.15 // Used for: Removing/Restoring the native BotW World Anti-Aliasing implementation @@ -8,12 +25,21 @@ const float resX = float($width)/float($gameWidth); const float resY = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 1, binding = 2) uniform ufBlock +{ uniform ivec4 uf_remappedPS[4]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf462d000 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x37f40000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[4]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; layout(location = 0) in vec4 passParameterSem2; layout(location = 0) out vec4 passPixelColor0; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock int clampFI32(int v) { diff --git a/Resolutions/BreathOfTheWild_Resolution/f69e84515ae56e70_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/f69e84515ae56e70_0000000000000000_vs.txt index 0af453c2..8ac8da85 100644 --- a/Resolutions/BreathOfTheWild_Resolution/f69e84515ae56e70_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/f69e84515ae56e70_0000000000000000_vs.txt @@ -1,16 +1,41 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader f69e84515ae56e70 // Used for: Vertical Bloom Blur // bloom blur v const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[1]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[1]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; out gl_PerVertex { vec4 gl_Position; @@ -85,7 +110,7 @@ backupReg0f = R2f.y; R2f.y = backupReg0f + -(R127f.x); R2f.w = backupReg0f; // export -gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w); +SET_POSITION(vec4(R1f.x, R1f.y, R1f.z, R1f.w)); // export passParameterSem0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w); // export diff --git a/Resolutions/BreathOfTheWild_Resolution/fc3e63a2007625f8_0000000000000000_vs.txt b/Resolutions/BreathOfTheWild_Resolution/fc3e63a2007625f8_0000000000000000_vs.txt index 7206111c..14c03131 100644 --- a/Resolutions/BreathOfTheWild_Resolution/fc3e63a2007625f8_0000000000000000_vs.txt +++ b/Resolutions/BreathOfTheWild_Resolution/fc3e63a2007625f8_0000000000000000_vs.txt @@ -1,14 +1,39 @@ #version 420 #extension GL_ARB_texture_gather : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader fc3e63a2007625f8 // Used For: Vertical Menu Blur const float resXScale = float($width)/float($gameWidth); const float resYScale = float($height)/float($gameHeight); +#ifdef VULKAN +layout(set = 0, binding = 0) uniform ufBlock +{ uniform ivec4 uf_remappedVS[5]; -uniform vec2 uf_windowSpaceToClipSpaceTransform; -layout(location = 0) in uvec4 attrDataSem0; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +}; +#else +uniform ivec4 uf_remappedVS[5]; +// uniform vec2 uf_windowSpaceToClipSpaceTransform; // Cemu optimized this uf_variable away in Cemu 1.15.7 +#endif +// uf_windowSpaceToClipSpaceTransform was moved to the ufBlock +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; out gl_PerVertex { vec4 gl_Position; @@ -101,7 +126,7 @@ R1f.y = PV1f.y + -(R126f.x); R1f.z = PV1f.y + R126f.x; R1f.w = PV1f.y; // export -gl_Position = vec4(R0f.x, R0f.y, R0f.z, R0f.w); +SET_POSITION(vec4(R0f.x, R0f.y, R0f.z, R0f.w)); // export passParameterSem0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); } \ No newline at end of file diff --git a/Resolutions/BreathOfTheWild_Resolution/rules.txt b/Resolutions/BreathOfTheWild_Resolution/rules.txt index 40774084..e3d5e6f2 100644 --- a/Resolutions/BreathOfTheWild_Resolution/rules.txt +++ b/Resolutions/BreathOfTheWild_Resolution/rules.txt @@ -3,7 +3,7 @@ titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 name = Resolution path = "The Legend of Zelda: Breath of the Wild/Graphics/Resolution" description = Changes the games resolution. You cannot change resolutions on the fly. -version = 3 +version = 4 [Preset] name = 1280x720 (16:9) (Default) diff --git a/Workarounds/BreathOfTheWild_!Intel_Shadows/09085793b5a9f364_00001ffe492e9249_ps.txt b/Workarounds/BreathOfTheWild_!Intel_Shadows/09085793b5a9f364_00001ffe492e9249_ps.txt new file mode 100644 index 00000000..f8b86200 --- /dev/null +++ b/Workarounds/BreathOfTheWild_!Intel_Shadows/09085793b5a9f364_00001ffe492e9249_ps.txt @@ -0,0 +1,1168 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + +// shader d2cb8f8abc8a00bc +UNIFORM_BUFFER_LAYOUT(33, 1, 12) uniform uniformBlockPS1 +{ +vec4 uf_blockPS1[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(38, 1, 13) uniform uniformBlockPS6 +{ +vec4 uf_blockPS6[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(42, 1, 14) uniform uniformBlockPS10 +{ +vec4 uf_blockPS10[1024]; +}; + +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 3) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 4) uniform samplerCubeArray textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 5) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(10, 1, 6) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(14, 1, 8) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 9) uniform sampler2D textureUnitPS15; +TEXTURE_LAYOUT(16, 1, 10) uniform sampler2D textureUnitPS16; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 1) in vec4 passParameterSem2; +layout(location = 2) in vec4 passParameterSem5; +layout(location = 3) in vec4 passParameterSem6; +layout(location = 0) out vec4 passPixelColor0; +layout(location = 1) out vec4 passPixelColor1; +layout(location = 2) out vec4 passPixelColor2; +#ifdef VULKAN +layout(set = 1, binding = 11) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else +uniform vec2 uf_fragCoordScale; +#endif +void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) +{ +// stm -> x .. s, y .. t, z .. MajorAxis*2.0 +vec3 inputCoord = normalize(vec3(src1.y, src1.x, src0.x)); +float rx = inputCoord.x; +float ry = inputCoord.y; +float rz = inputCoord.z; +if( abs(rx) > abs(ry) && abs(rx) > abs(rz) ) +{ +stm.z = rx*2.0; +stm.xy = vec2(ry,rz); +if( rx >= 0.0 ) +{ +faceId = 0; +} +else +{ +faceId = 1; +} +} +else if( abs(ry) > abs(rx) && abs(ry) > abs(rz) ) +{ +stm.z = ry*2.0; +stm.xy = vec2(rx,rz); +if( ry >= 0.0 ) +{ +faceId = 2; +} +else +{ +faceId = 3; +} +} +else //if( abs(rz) > abs(ry) && abs(rz) > abs(rx) ) +{ +stm.z = rz*2.0; +stm.xy = vec2(rx,ry); +if( rz >= 0.0 ) +{ +faceId = 4; +} +else +{ +faceId = 5; +} +} +} +vec3 redcCUBEReverse(vec2 st, int faceId) +{ +st.yx = st.xy; +vec3 v; +float majorAxis = 1.0; +if( faceId == 0 ) +{ +v.yz = (st-vec2(1.5))*(majorAxis*2.0); +v.x = 1.0; +} +else if( faceId == 1 ) +{ +v.yz = (st-vec2(1.5))*(majorAxis*2.0); +v.x = -1.0; +} +else if( faceId == 2 ) +{ +v.xz = (st-vec2(1.5))*(majorAxis*2.0); +v.y = 1.0; +} +else if( faceId == 3 ) +{ +v.xz = (st-vec2(1.5))*(majorAxis*2.0); +v.y = -1.0; +} +else if( faceId == 4 ) +{ +v.xy = (st-vec2(1.5))*(majorAxis*2.0); +v.z = 1.0; +} +else +{ +v.xy = (st-vec2(1.5))*(majorAxis*2.0); +v.z = -1.0; +} +return v; +} +int clampFI32(int v) +{ +if( v == 0x7FFFFFFF ) + return floatBitsToInt(1.0); +else if( v == 0xFFFFFFFF ) + return floatBitsToInt(0.0); +return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); +} +float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } +float textureShadow_1(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_2(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_3(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_4(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_5(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +void main() +{ +ivec4 R0i = ivec4(0); +ivec4 R1i = ivec4(0); +ivec4 R2i = ivec4(0); +ivec4 R3i = ivec4(0); +ivec4 R4i = ivec4(0); +ivec4 R5i = ivec4(0); +ivec4 R6i = ivec4(0); +ivec4 R7i = ivec4(0); +ivec4 R8i = ivec4(0); +ivec4 R9i = ivec4(0); +ivec4 R10i = ivec4(0); +ivec4 R11i = ivec4(0); +ivec4 R12i = ivec4(0); +ivec4 R13i = ivec4(0); +ivec4 R14i = ivec4(0); +ivec4 R15i = ivec4(0); +ivec4 R16i = ivec4(0); +ivec4 R17i = ivec4(0); +ivec4 R18i = ivec4(0); +ivec4 R19i = ivec4(0); +ivec4 R122i = ivec4(0); +ivec4 R123i = ivec4(0); +ivec4 R124i = ivec4(0); +ivec4 R125i = ivec4(0); +ivec4 R126i = ivec4(0); +ivec4 R127i = ivec4(0); +int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i; +ivec4 PV0i = ivec4(0), PV1i = ivec4(0); +int PS0i = 0, PS1i = 0; +ivec4 tempi = ivec4(0); +float tempResultf; +int tempResulti; +ivec4 ARi = ivec4(0); +bool predResult = true; +bool activeMaskStack[3]; +bool activeMaskStackC[4]; +activeMaskStack[0] = false; +activeMaskStack[1] = false; +activeMaskStackC[0] = false; +activeMaskStackC[1] = false; +activeMaskStackC[2] = false; +activeMaskStack[0] = true; +activeMaskStackC[0] = true; +activeMaskStackC[1] = true; +vec3 cubeMapSTM; +int cubeMapFaceId; +float cubeMapArrayIndex6 = 0.0; +R0i = floatBitsToInt(passParameterSem0); +R1i = floatBitsToInt(passParameterSem2); +R2i = floatBitsToInt(passParameterSem5); +R3i = floatBitsToInt(passParameterSem6); +if( activeMaskStackC[1] == true ) { +R4i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R5i.x = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R5i.z = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.zw)).x); +R5i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R3i.xyzw = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R3i.zw)).xyzw); +R13i.xy = floatBitsToInt(texture(textureUnitPS14, intBitsToFloat(R0i.xy)).xy); +} +if( activeMaskStackC[1] == true ) { +// 0 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.w)) + uf_blockPS1[14].x)); +PV0i.x = R123i.x; +R126i.y = floatBitsToInt((intBitsToFloat(R3i.x) * 2.0 + -(1.0))); +R125i.z = floatBitsToInt((intBitsToFloat(R3i.y) * 2.0 + -(1.0))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R4i.w),uf_blockPS1[16].x) + uf_blockPS1[14].x)); +PV0i.w = R123i.w; +R124i.z = floatBitsToInt((intBitsToFloat(R3i.z) * 2.0 + -(1.0))); +PS0i = R124i.z; +// 1 +R9i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), -(intBitsToFloat(PV0i.w)))); +PV1i.x = R9i.x; +R8i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), -(intBitsToFloat(PV0i.w)))); +R12i.z = floatBitsToInt(-(intBitsToFloat(PV0i.x))); +PV1i.w = floatBitsToInt(intBitsToFloat(R3i.w) * intBitsToFloat(0x437f0000)); +R127i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.z)) + uf_blockPS1[14].x)); +PS1i = R127i.z; +// 2 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), uf_blockPS6[45].x)); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), -(intBitsToFloat(PS1i)))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), -(intBitsToFloat(PS1i)))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), uf_blockPS6[43].x)); +PS0i = int(intBitsToFloat(PV1i.w)); +// 3 +PV1i.x = PS0i & int(1); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.y),uf_blockPS6[43].y) + intBitsToFloat(PV0i.w))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.y),uf_blockPS6[45].y) + intBitsToFloat(PV0i.x))); +PV1i.z = R123i.z; +PV1i.w = floatBitsToInt(-(intBitsToFloat(R127i.z))); +R4i.w = floatBitsToInt(-(intBitsToFloat(R9i.x)) + intBitsToFloat(PV0i.y)); +PS1i = R4i.w; +// 4 +R127i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),uf_blockPS6[45].z) + intBitsToFloat(PV1i.z))); +R3i.y = floatBitsToInt(-(intBitsToFloat(R8i.y)) + intBitsToFloat(R126i.z)); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),uf_blockPS6[43].z) + intBitsToFloat(PV1i.y))); +PV0i.z = R123i.z; +R8i.w = ((PV1i.x == 0)?(0):(0x3f800000)); +R3i.x = floatBitsToInt(-(intBitsToFloat(R12i.z)) + intBitsToFloat(PV1i.w)); +PS0i = R3i.x; +// 5 +R15i.x = floatBitsToInt(uf_blockPS6[43].w + intBitsToFloat(PV0i.z)); +PV1i.x = R15i.x; +R127i.y = floatBitsToInt(-(intBitsToFloat(R12i.z)) * intBitsToFloat(0x3d4ccccd)); +R0i.z = floatBitsToInt((-(intBitsToFloat(R12i.z)) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(0xc0600000))); +R0i.z = clampFI32(R0i.z); +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R9i.x), uf_blockPS6[44].x)); +R5i.w = 0x3f800000; +PS1i = R5i.w; +// 6 +R0i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),uf_blockPS6[39].z) + -(uf_blockPS6[39].x))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.z), intBitsToFloat(R124i.z))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R12i.z), intBitsToFloat(R12i.z))); +R12i.w = R13i.x; +R12i.w = clampFI32(R12i.w); +R13i.w = floatBitsToInt((-(intBitsToFloat(R12i.z)) * intBitsToFloat(0x3c23d70a) + -(0.5))); +R13i.w = clampFI32(R13i.w); +PS0i = R13i.w; +// 7 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R126i.y),intBitsToFloat(R125i.z),intBitsToFloat(PV0i.y),-0.0),vec4(intBitsToFloat(R126i.y),intBitsToFloat(R125i.z),1.0,0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.y),uf_blockPS6[44].y) + intBitsToFloat(R127i.w))); +PS1i = R122i.x; +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),uf_blockPS6[44].z) + intBitsToFloat(PS1i))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.y),intBitsToFloat(R8i.y)) + intBitsToFloat(R126i.z))); +PV0i.y = R123i.y; +R13i.z = floatBitsToInt((-(uf_blockPS6[53].z) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(R127i.y))); +R13i.z = clampFI32(R13i.z); +R6i.w = floatBitsToInt((-(uf_blockPS6[53].w) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(R127i.y))); +R6i.w = clampFI32(R6i.w); +tempResultf = 1.0 / sqrt(intBitsToFloat(PV1i.x)); +PS0i = floatBitsToInt(tempResultf); +// 9 +R8i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PS0i))); +R9i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.z), intBitsToFloat(PS0i))); +R10i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.z), intBitsToFloat(PS0i))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R9i.x),intBitsToFloat(R9i.x)) + intBitsToFloat(PV0i.y))); +PV1i.w = R123i.w; +R14i.z = floatBitsToInt(uf_blockPS6[44].w + intBitsToFloat(PV0i.x)); +PS1i = R14i.z; +// 10 +R12i.x = floatBitsToInt(uf_blockPS1[0].y); +R14i.y = PS1i; +PV0i.y = R14i.y; +R15i.z = floatBitsToInt(uf_blockPS6[45].w + intBitsToFloat(R127i.x)); +PV0i.z = R15i.z; +PS0i = floatBitsToInt(sqrt(intBitsToFloat(PV1i.w))); +// 11 +R0i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),uf_blockPS6[39].z) + -(uf_blockPS6[39].y))); +R3i.w = floatBitsToInt(-(intBitsToFloat(PV0i.y)) + uf_blockPS6[39].w); +R0i.w = floatBitsToInt(1.0 / intBitsToFloat(PS0i)); +PS1i = R0i.w; +} +if( activeMaskStackC[1] == true ) { +R0i.y = floatBitsToInt(textureLod(textureUnitPS11, intBitsToFloat(R0i.xy),0.0).x); +} +if( activeMaskStackC[1] == true ) { +// 0 +backupReg0i = R0i.w; +R13i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R8i.x),intBitsToFloat(R9i.y),intBitsToFloat(R10i.z),-0.0),vec4(uf_blockPS1[11].x,uf_blockPS1[11].y,uf_blockPS1[11].z,0.0))); +PV0i.x = R13i.x; +PV0i.y = R13i.x; +PV0i.z = R13i.x; +PV0i.w = R13i.x; +R14i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R9i.x), intBitsToFloat(backupReg0i))); +PS0i = R14i.x; +// 1 +backupReg0i = R0i.w; +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R8i.x),intBitsToFloat(R9i.y),intBitsToFloat(R10i.z),-0.0),vec4(uf_blockPS1[12].x,uf_blockPS1[12].y,uf_blockPS1[12].z,0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R15i.y = tempi.x; +R16i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R8i.y), intBitsToFloat(backupReg0i))); +PS1i = R16i.y; +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.x)) + uf_blockPS1[14].x)); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((intBitsToFloat(PV1i.x) * 2.0 + -(1.0))); +PV0i.y = R123i.y; +R16i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R12i.z), intBitsToFloat(R0i.w))); +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PS1i)),intBitsToFloat(PS1i)) + 1.0)); +PV0i.w = R123i.w; +// 3 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), -(intBitsToFloat(PV0i.x)))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.w), -(intBitsToFloat(PV0i.x)))); +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R8i.w)),intBitsToFloat(PV0i.y)) + intBitsToFloat(R3i.w))); +PV1i.z = R123i.z; +PV1i.w = floatBitsToInt(-(intBitsToFloat(PV0i.x))); +tempResultf = 1.0 / sqrt(intBitsToFloat(PV0i.w)); +R4i.y = floatBitsToInt(tempResultf); +PS1i = R4i.y; +// 4 +R2i.x = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(0x3fa66666)); +R126i.y = floatBitsToInt(-(intBitsToFloat(R9i.x)) + intBitsToFloat(PV1i.x)); +PV0i.y = R126i.y; +R125i.z = floatBitsToInt(-(intBitsToFloat(R12i.z)) + intBitsToFloat(PV1i.w)); +PV0i.z = R125i.z; +R127i.w = floatBitsToInt(-(intBitsToFloat(R8i.y)) + intBitsToFloat(PV1i.y)); +PV0i.w = R127i.w; +R2i.y = floatBitsToInt(intBitsToFloat(R0i.z) + uf_blockPS10[3].y); +PS0i = R2i.y; +// 5 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R3i.y), intBitsToFloat(PV0i.z))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R3i.x), intBitsToFloat(PV0i.y))); +PV1i.z = floatBitsToInt(uf_blockPS10[2].z + 1.0); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.w), intBitsToFloat(PV0i.w))); +R17i.y = floatBitsToInt(uf_blockPS1[1].y); +PS1i = R17i.y; +// 6 +backupReg0i = R3i.y; +R0i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.w)),intBitsToFloat(R3i.x)) + intBitsToFloat(PV1i.x))); +PV0i.x = R0i.x; +R3i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R125i.z)),intBitsToFloat(R4i.w)) + intBitsToFloat(PV1i.y))); +PV0i.y = R3i.y; +R0i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.y)),intBitsToFloat(backupReg0i)) + intBitsToFloat(PV1i.w))); +PV0i.z = R0i.z; +R0i.w = floatBitsToInt(mul_nonIEEE(-(intBitsToFloat(R12i.z)), uf_blockPS1[17].y)); +R18i.y = floatBitsToInt(-(intBitsToFloat(R6i.w)) + intBitsToFloat(PV1i.z)); +R18i.y = clampFI32(R18i.y); +PS0i = R18i.y; +// 7 +tempi.x = floatBitsToInt(dot(vec4(-(intBitsToFloat(PV0i.x)),-(intBitsToFloat(PV0i.y)),-(intBitsToFloat(PV0i.z)),-0.0),vec4(-(intBitsToFloat(PV0i.x)),-(intBitsToFloat(PV0i.y)),-(intBitsToFloat(PV0i.z)),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R17i.z = floatBitsToInt(uf_blockPS1[2].y); +PS1i = R17i.z; +// 8 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R8i.x),intBitsToFloat(R9i.y),intBitsToFloat(R10i.z),-0.0),vec4(uf_blockPS1[13].x,uf_blockPS1[13].y,uf_blockPS1[13].z,0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R18i.z = tempi.x; +tempResultf = 1.0 / sqrt(intBitsToFloat(PV1i.x)); +R2i.w = floatBitsToInt(tempResultf); +PS0i = R2i.w; +} +if( activeMaskStackC[1] == true ) { +// 0 +R123i.w = floatBitsToInt((mul_nonIEEE(-(uf_blockPS6[39].w),intBitsToFloat(R0i.y)) + intBitsToFloat(R2i.x))); +PV0i.w = R123i.w; +// 1 +R126i.y = floatBitsToInt(intBitsToFloat(PV0i.w) * 0.25); +R126i.y = clampFI32(R126i.y); +PV1i.y = R126i.y; +// 2 +PV0i.z = floatBitsToInt(-(intBitsToFloat(PV1i.y)) + 1.0); +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.y)),intBitsToFloat(PV0i.z)) + intBitsToFloat(PV0i.z))); +PV1i.x = R123i.x; +// 4 +R127i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.y)),intBitsToFloat(PV1i.x)) + intBitsToFloat(PV1i.x))); +PV0i.w = R127i.w; +// 5 +PV1i.z = floatBitsToInt(-(intBitsToFloat(PV0i.w)) + 1.0); +// 6 +R14i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(R2i.y)) + intBitsToFloat(R127i.w))); +R14i.w = clampFI32(R14i.w); +} +if( activeMaskStackC[1] == true ) { +activeMaskStack[1] = activeMaskStack[0]; +activeMaskStackC[2] = activeMaskStackC[1]; +// 0 +R10i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].x, uf_blockPS10[2].w)); +PV0i.x = R10i.x; +R10i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].y, uf_blockPS10[2].w)); +PV0i.y = R10i.y; +// 1 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.y)),intBitsToFloat(PV0i.y)) + 1.0)); +PV1i.x = R123i.x; +R4i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].z, uf_blockPS10[2].w)); +PV1i.z = R4i.z; +R9i.w = 0; +R2i.x = PV0i.x; +PS1i = R2i.x; +// 2 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.z), intBitsToFloat(PV1i.z))); +R0i.y = PV1i.z; +PV0i.y = R0i.y; +R2i.z = 0; +PV0i.z = R2i.z; +tempResultf = 1.0 / sqrt(intBitsToFloat(PV1i.x)); +PS0i = floatBitsToInt(tempResultf); +// 3 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R14i.x),intBitsToFloat(R16i.z),intBitsToFloat(R16i.z),-0.0),vec4(intBitsToFloat(R2i.x),intBitsToFloat(PV0i.y),intBitsToFloat(PV0i.z),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +PS1i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS0i), intBitsToFloat(R4i.y))); +// 4 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R14i.x),intBitsToFloat(R16i.y),intBitsToFloat(R127i.x),-0.0),vec4(intBitsToFloat(R10i.x),intBitsToFloat(R10i.y),1.0,0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R15i.w = tempi.x; +R19i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS1i), intBitsToFloat(PV1i.x))); +PS0i = R19i.y; +// 5 +predResult = (1.0 > intBitsToFloat(R13i.z)); +activeMaskStack[1] = predResult; +activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true; +} +else { +activeMaskStack[1] = false; +activeMaskStackC[2] = false; +} +if( activeMaskStackC[2] == true ) { +// 0 +R127i.x = ((-(intBitsToFloat(R12i.z)) > uf_blockPS1[58].y)?int(0xFFFFFFFF):int(0x0)); +PV0i.y = floatBitsToInt(intBitsToFloat(R8i.x) * 1.5); +PV0i.z = floatBitsToInt(intBitsToFloat(R9i.y) * 1.5); +PV0i.w = ((-(intBitsToFloat(R12i.z)) > uf_blockPS1[58].x)?int(0xFFFFFFFF):int(0x0)); +PS0i = floatBitsToInt(intBitsToFloat(R10i.z) * 1.5); +// 1 +backupReg0i = R0i.z; +R2i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.x)),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.y))); +R2i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R3i.y)),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.z))); +PV1i.z = PV0i.w & int(1); +R3i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R2i.w)) + intBitsToFloat(PS0i))); +R122i.x = floatBitsToInt((intBitsToFloat(R0i.w) * 0.25 + 1.0)); +PS1i = R122i.x; +// 2 +R3i.x = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R4i.y = PV1i.z - R127i.x; +PV0i.y = R4i.y; +R2i.z = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R4i.w = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +PS0i = floatBitsToInt(uf_blockPS6[53].y); +PS0i = floatBitsToInt(intBitsToFloat(PS0i) / 2.0); +// 3 +R4i.x = PS0i; +R3i.y = floatBitsToInt(uf_blockPS6[53].x); +R3i.y = floatBitsToInt(intBitsToFloat(R3i.y) / 2.0); +R3i.z = floatBitsToInt(-(intBitsToFloat(PS0i))); +PV1i.w = PV0i.y << 0x00000002; +PS1i = floatBitsToInt(float(PV0i.y)); +// 4 +R0i.x = PV1i.w + 0x0000002c; +R0i.y = PV1i.w + 0x0000002b; +R0i.z = PV1i.w + 0x0000002a; +R0i.w = PV1i.w + 0x0000002d; +R8i.z = floatBitsToInt(roundEven(intBitsToFloat(PS1i))); +PS0i = R8i.z; +// 5 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.y),intBitsToFloat(R3i.w),-0.0),vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.y),intBitsToFloat(R3i.w),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R2i.w = tempi.x; +R9i.z = PS0i; +PS1i = R9i.z; +} +if( activeMaskStackC[2] == true ) { +R5i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +R6i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +R7i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +} +if( activeMaskStackC[2] == true ) { +// 0 +R126i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R8i.x),intBitsToFloat(R9i.y),intBitsToFloat(R10i.z),intBitsToFloat(R10i.z)),vec4(-(intBitsToFloat(R10i.x)),-(intBitsToFloat(R10i.y)),-(intBitsToFloat(R4i.z)),-(intBitsToFloat(R9i.w))))); +R126i.x = clampFI32(R126i.x); +PV0i.x = R126i.x; +PV0i.y = R126i.x; +PV0i.z = R126i.x; +PV0i.w = R126i.x; +tempResultf = 1.0 / sqrt(intBitsToFloat(R2i.w)); +PS0i = floatBitsToInt(tempResultf); +// 1 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(PS0i))); +PV1i.x = R127i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(PS0i))); +PV1i.y = R127i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R3i.w), intBitsToFloat(PS0i))); +PV1i.z = R127i.z; +R127i.w = floatBitsToInt(-(intBitsToFloat(R3i.y))); +R10i.z = R8i.z; +PS1i = R10i.z; +// 2 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R10i.x),intBitsToFloat(R10i.y),intBitsToFloat(R4i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R11i.z = R8i.z; +PS0i = R11i.z; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(PV0i.x)) + 1.0)); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R4i.z)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.z))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R10i.y)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.y))); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R10i.x)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.x))); +PV1i.w = R123i.w; +// 4 +backupReg0i = R126i.x; +R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(R4i.w))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(R3i.x))); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(R2i.z))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(backupReg0i))); +// 5 +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R8i.w), intBitsToFloat(PV0i.w))); +// 6 +R16i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(PV1i.y)) + intBitsToFloat(R9i.x))); +PV0i.x = R16i.x; +R12i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.x),intBitsToFloat(PV1i.y)) + intBitsToFloat(R8i.y))); +R19i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(PV1i.y)) + intBitsToFloat(R12i.z))); +// 7 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R6i.x))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R7i.x))); +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R5i.x))); +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R6i.y)) + intBitsToFloat(PV1i.x))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R5i.y)) + intBitsToFloat(PV1i.z))); +PV0i.y = R123i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R0i.x))); +// 9 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R5i.z)) + intBitsToFloat(PV0i.y))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R7i.y)) + intBitsToFloat(R127i.y))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R6i.z)) + intBitsToFloat(PV0i.x))); +PV1i.z = R123i.z; +// 10 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R7i.z)) + intBitsToFloat(PV1i.y))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(R127i.z))); +PV0i.y = R123i.y; +R127i.z = floatBitsToInt(intBitsToFloat(R6i.w) + intBitsToFloat(PV1i.z)); +PV0i.w = floatBitsToInt(intBitsToFloat(R5i.w) + intBitsToFloat(PV1i.x)); +// 11 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R0i.z)) + intBitsToFloat(PV0i.y))); +PV1i.x = R123i.x; +PV1i.w = floatBitsToInt(intBitsToFloat(R7i.w) + intBitsToFloat(PV0i.x)); +R126i.z = floatBitsToInt(1.0 / intBitsToFloat(PV0i.w)); +PS1i = R126i.z; +// 12 +backupReg0i = R0i.w; +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PS1i))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(PS1i))); +PV0i.y = R127i.y; +PV0i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV1i.x)); +// 13 +R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R126i.z))); +PV1i.x = R126i.x; +R126i.w = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(0xbb03126f)); +R126i.w = clampFI32(R126i.w); +PV1i.w = R126i.w; +R8i.x = floatBitsToInt((uf_blockPS6[53].x * 0.5 + intBitsToFloat(PV0i.y))); +PS1i = R8i.x; +// 14 +R9i.x = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(R3i.y)); +R8i.y = floatBitsToInt((uf_blockPS6[53].y * 0.5 + intBitsToFloat(PV1i.x))); +R8i.w = PV1i.w; +R9i.y = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R3i.z)); +PS0i = R9i.y; +// 15 +R10i.x = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(R127i.w)); +R10i.y = floatBitsToInt(intBitsToFloat(R126i.x) + intBitsToFloat(R4i.x)); +R9i.w = R126i.w; +R10i.w = R126i.w; +PS1i = R10i.w; +// 16 +R11i.x = floatBitsToInt((-(uf_blockPS6[53].x) * 0.5 + intBitsToFloat(R127i.y))); +R11i.y = floatBitsToInt((-(uf_blockPS6[53].y) * 0.5 + intBitsToFloat(R126i.x))); +R11i.w = R126i.w; +} +if( activeMaskStackC[2] == true ) { +R8i.y = floatBitsToInt(textureShadow_1(textureUnitPS7, vec4(intBitsToFloat(R8i.x),intBitsToFloat(R8i.y),intBitsToFloat(R8i.z),intBitsToFloat(R8i.w)))); +R9i.x = floatBitsToInt(textureShadow_2(textureUnitPS7, vec4(intBitsToFloat(R9i.x),intBitsToFloat(R9i.y),intBitsToFloat(R9i.z),intBitsToFloat(R9i.w)))); +R10i.w = floatBitsToInt(textureShadow_3(textureUnitPS7, vec4(intBitsToFloat(R10i.x),intBitsToFloat(R10i.y),intBitsToFloat(R10i.z),intBitsToFloat(R10i.w)))); +R11i.z = floatBitsToInt(textureShadow_4(textureUnitPS7, vec4(intBitsToFloat(R11i.x),intBitsToFloat(R11i.y),intBitsToFloat(R11i.z),intBitsToFloat(R11i.w)))); +} +if( activeMaskStackC[2] == true ) { +activeMaskStack[2] = activeMaskStack[1]; +activeMaskStackC[3] = activeMaskStackC[2]; +// 0 +PV0i.y = floatBitsToInt(intBitsToFloat(R8i.y) + intBitsToFloat(R9i.x)); +PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0); +// 1 +R123i.y = floatBitsToInt((intBitsToFloat(R10i.w) * 0.5 + intBitsToFloat(PV0i.y))); +PV1i.y = R123i.y; +// 2 +R6i.w = floatBitsToInt((intBitsToFloat(R11i.z) * 0.5 + intBitsToFloat(PV1i.y))/2.0); +PV0i.w = R6i.w; +// 3 +PV1i.x = ((1.0 > intBitsToFloat(PV0i.w))?int(0xFFFFFFFF):int(0x0)); +// 4 +R0i.w = ((R4i.y > 0)?(PV1i.x):(0)); +// 5 +predResult = (R0i.w != 0); +activeMaskStack[2] = predResult; +activeMaskStackC[3] = predResult == true && activeMaskStackC[2] == true; +} +else { +activeMaskStack[2] = false; +activeMaskStackC[3] = false; +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.x = int(-1) + R4i.y; +// 1 +PV1i.w = PV0i.x << 0x00000002; +PS1i = floatBitsToInt(float(PV0i.x)); +// 2 +R0i.x = PV1i.w + 0x0000002c; +R0i.y = PV1i.w + 0x0000002a; +R0i.z = PV1i.w + 0x0000002b; +R0i.w = PV1i.w + 0x0000002d; +R5i.z = floatBitsToInt(roundEven(intBitsToFloat(PS1i))); +PS0i = R5i.z; +} +if( activeMaskStackC[3] == true ) { +R2i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +R3i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +R4i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R3i.x))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R2i.x))); +// 1 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R3i.y)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R4i.x))); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R2i.y)) + intBitsToFloat(PV0i.y))); +PV1i.z = R123i.z; +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R0i.x))); +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R2i.z)) + intBitsToFloat(PV1i.z))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(PV1i.w))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.y),intBitsToFloat(R4i.y)) + intBitsToFloat(PV1i.y))); +PV0i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R3i.z)) + intBitsToFloat(PV1i.x))); +PV0i.w = R123i.w; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R4i.z)) + intBitsToFloat(PV0i.z))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R19i.z),intBitsToFloat(R0i.z)) + intBitsToFloat(PV0i.y))); +PV1i.y = R123i.y; +R127i.z = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV0i.w)); +PV1i.w = floatBitsToInt(intBitsToFloat(R2i.w) + intBitsToFloat(PV0i.x)); +// 4 +PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.y)); +PV0i.w = floatBitsToInt(intBitsToFloat(R4i.w) + intBitsToFloat(PV1i.x)); +PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.w)); +// 5 +R5i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(PS0i))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PS0i))); +R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PS0i))); +PS1i = R5i.y; +// 6 +R5i.w = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(0xbb03126f)); +R5i.w = clampFI32(R5i.w); +} +if( activeMaskStackC[3] == true ) { +R5i.y = floatBitsToInt(textureShadow_5(textureUnitPS7, vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(R5i.z),intBitsToFloat(R5i.w)))); +} +if( activeMaskStackC[3] == true ) { +// 0 +backupReg0i = R6i.w; +R6i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R5i.y))); +} +activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true; +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = floatBitsToInt(-(intBitsToFloat(R6i.w)) + 1.0); +// 1 +R5i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(R13i.z)) + intBitsToFloat(R6i.w))); +} +activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; +if( activeMaskStackC[1] == true ) { +// 0 +R2i.x = floatBitsToInt(intBitsToFloat(R15i.x) * intBitsToFloat(0x3a83126f)); +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R12i.z)),uf_blockPS6[26].x) + -(uf_blockPS6[26].y))); +R123i.y = clampFI32(R123i.y); +PV0i.y = R123i.y; +R0i.z = floatBitsToInt(-(intBitsToFloat(R18i.z))); +PV0i.z = R0i.z; +R0i.w = 0x40400000; +R2i.y = floatBitsToInt(intBitsToFloat(R15i.z) * intBitsToFloat(0x3a83126f)); +PS0i = R2i.y; +// 1 +redcCUBE(vec4(intBitsToFloat(PV0i.z),intBitsToFloat(PV0i.z),intBitsToFloat(R13i.x),intBitsToFloat(R15i.y)),vec4(intBitsToFloat(R15i.y),intBitsToFloat(R13i.x),intBitsToFloat(PV0i.z),intBitsToFloat(PV0i.z)),cubeMapSTM,cubeMapFaceId); +R127i.x = floatBitsToInt(cubeMapSTM.x); +R127i.y = floatBitsToInt(cubeMapSTM.y); +R127i.z = floatBitsToInt(cubeMapSTM.z); +R127i.w = cubeMapFaceId; +PV1i.x = R127i.x; +PV1i.y = R127i.y; +PV1i.z = R127i.z; +PV1i.w = R127i.w; +R126i.x = floatBitsToInt(-(intBitsToFloat(PV0i.y)) + 1.0); +PS1i = R126i.x; +// 2 +R3i.x = floatBitsToInt((intBitsToFloat(R15i.x) * intBitsToFloat(0x38d1b717) + 0.5)); +PV0i.y = floatBitsToInt(intBitsToFloat(R15i.w) + -(intBitsToFloat(R19i.y))); +R0i.z = PV1i.w; +R3i.w = floatBitsToInt((intBitsToFloat(R15i.z) * intBitsToFloat(0x3903126f) + 0.5)); +PS0i = floatBitsToInt(1.0 / abs(intBitsToFloat(PV1i.z))); +// 3 +backupReg0i = R127i.y; +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(R126i.x)) + intBitsToFloat(R19i.y))); +PV1i.x = R123i.x; +R127i.y = floatBitsToInt(-(uf_blockPS6[27].w) + 1.0); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PS0i)) + 1.5)); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(PS0i)) + 1.5)); +PV1i.w = R123i.w; +tempResultf = log2(intBitsToFloat(R126i.x)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +R127i.w = floatBitsToInt(tempResultf); +PS1i = R127i.w; +// 4 +R0i.x = PV1i.w; +R0i.y = PV1i.z; +PV0i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[27].y, intBitsToFloat(PS1i))); +PV0i.w = floatBitsToInt(max(-(intBitsToFloat(PV1i.x)), intBitsToFloat(0xbf7d70a4))); +PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0); +R2i.w = 0x3f800000; +PS0i = R2i.w; +// 5 +R127i.x = floatBitsToInt(intBitsToFloat(PV0i.w) + 0.5); +PV1i.x = R127i.x; +R5i.y = 0; +R6i.z = floatBitsToInt(-(intBitsToFloat(R12i.z)) * intBitsToFloat(0x3ba3d70a)); +R123i.w = floatBitsToInt((-(intBitsToFloat(R15i.y)) * 0.5 + 0.5)); +PV1i.w = R123i.w; +PS1i = floatBitsToInt(exp2(intBitsToFloat(PV0i.z))); +// 6 +R123i.x = floatBitsToInt((intBitsToFloat(PV1i.x) * intBitsToFloat(0xbc996e30) + intBitsToFloat(0x3d981626))); +PV0i.x = R123i.x; +PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(0x40200000)); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(PS1i)) + uf_blockPS6[27].w)/2.0); +PV0i.z = R123i.z; +PV0i.w = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + 1.0); +R122i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R12i.z)),uf_blockPS6[28].x) + -(uf_blockPS6[28].y))); +R122i.x = clampFI32(R122i.x); +PS0i = R122i.x; +// 7 +R5i.x = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x3daaaaab)); +R4i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + 0.5); +PV1i.z = floatBitsToInt(-(intBitsToFloat(PS0i)) + 1.0); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PV0i.x)) + intBitsToFloat(0xbe593484))); +PV1i.w = R123i.w; +PS1i = floatBitsToInt(sqrt(intBitsToFloat(PV0i.w))); +// 8 +backupReg0i = R127i.w; +R8i.x = floatBitsToInt((intBitsToFloat(R14i.w) * intBitsToFloat(0xbdcccccd) + intBitsToFloat(0x3dcccccd))); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PV1i.w)) + intBitsToFloat(0x3fc90da4))); +PV0i.y = R123i.y; +PV0i.z = floatBitsToInt(intBitsToFloat(PS1i) * intBitsToFloat(0x3f22f983)); +R127i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[27].x, intBitsToFloat(backupReg0i))); +tempResultf = log2(intBitsToFloat(PV1i.z)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +R127i.y = floatBitsToInt(tempResultf); +PS0i = R127i.y; +// 9 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R15i.x),intBitsToFloat(R14i.y),intBitsToFloat(R15i.z),intBitsToFloat(R2i.w)),vec4(uf_blockPS1[37].x,uf_blockPS1[37].y,uf_blockPS1[37].z,uf_blockPS1[37].w))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R4i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),-(intBitsToFloat(PV0i.y))) + 1.0)); +PS1i = R4i.x; +// 10 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R15i.x),intBitsToFloat(R14i.y),intBitsToFloat(R15i.z),intBitsToFloat(R2i.w)),vec4(uf_blockPS1[35].x,uf_blockPS1[35].y,uf_blockPS1[35].z,uf_blockPS1[35].w))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R127i.z = floatBitsToInt(1.0 / intBitsToFloat(PV1i.x)); +PS0i = R127i.z; +// 11 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R15i.x),intBitsToFloat(R14i.y),intBitsToFloat(R15i.z),intBitsToFloat(R2i.w)),vec4(uf_blockPS1[36].x,uf_blockPS1[36].y,uf_blockPS1[36].z,uf_blockPS1[36].w))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R6i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PS0i))); +PS1i = R6i.x; +// 12 +R7i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[29].x, intBitsToFloat(R127i.y))); +R6i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(R127i.z))); +R2i.z = floatBitsToInt((intBitsToFloat(0xbf59999a) * intBitsToFloat(R13i.y) + 1.0)); +R2i.w = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(0xbe99999a)); +R4i.w = floatBitsToInt(exp2(intBitsToFloat(R127i.w))); +PS0i = R4i.w; +} +if( activeMaskStackC[1] == true ) { +R0i.xyz = floatBitsToInt(textureLod(textureUnitPS6, vec4(redcCUBEReverse(intBitsToFloat(R0i.xy),R0i.z),cubeMapArrayIndex6),intBitsToFloat(R0i.w)).xyz); +R0i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.xy)).x); +R3i.xyz = floatBitsToInt(textureLod(textureUnitPS15, intBitsToFloat(R3i.xw),0.0).xyz); +R4i.xyz = floatBitsToInt(texture(textureUnitPS10, intBitsToFloat(R4i.xy)).xyz); +R5i.xyz = floatBitsToInt(texture(textureUnitPS16, intBitsToFloat(R5i.xy)).xyz); +R6i.x = floatBitsToInt(textureLod(textureUnitPS4, intBitsToFloat(R6i.xy),intBitsToFloat(R6i.z)).x); +} +if( activeMaskStackC[1] == true ) { +// 0 +backupReg0i = R0i.y; +backupReg0i = R0i.y; +R123i.x = floatBitsToInt((intBitsToFloat(R0i.w) * 2.0 + -(1.0))); +PV0i.x = R123i.x; +PV0i.y = floatBitsToInt(min(intBitsToFloat(backupReg0i), intBitsToFloat(R0i.z))); +R127i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R12i.z)),uf_blockPS6[18].x) + uf_blockPS6[17].w)); +R127i.z = clampFI32(R127i.z); +PV0i.w = floatBitsToInt(max(intBitsToFloat(backupReg0i), intBitsToFloat(R0i.z))); +R126i.w = floatBitsToInt(exp2(intBitsToFloat(R7i.x))); +PS0i = R126i.w; +// 1 +R125i.x = floatBitsToInt(min(intBitsToFloat(R0i.x), intBitsToFloat(PV0i.y))); +R126i.y = floatBitsToInt(intBitsToFloat(R2i.w) * intBitsToFloat(0x40200001)); +R126i.y = clampFI32(R126i.y); +PV1i.y = R126i.y; +R124i.z = floatBitsToInt(max(intBitsToFloat(R0i.x), intBitsToFloat(PV0i.w))); +PV1i.z = R124i.z; +R123i.w = floatBitsToInt((intBitsToFloat(PV0i.x) * intBitsToFloat(0x41c80000) + intBitsToFloat(R14i.z))); +PV1i.w = R123i.w; +R126i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS6[27].z,-(intBitsToFloat(R4i.w))) + uf_blockPS6[27].z)); +PS1i = R126i.z; +// 2 +backupReg0i = R127i.z; +R127i.x = floatBitsToInt(intBitsToFloat(PV1i.y) * intBitsToFloat(0x3dcccccd)); +PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(0x2edbe6ff)); +R127i.z = floatBitsToInt(-(intBitsToFloat(PV1i.w)) + uf_blockPS6[52].x); +R127i.w = floatBitsToInt((-(intBitsToFloat(R12i.z)) * intBitsToFloat(0x3ba3d70a) + intBitsToFloat(0xbfe66666))); +tempResultf = log2(intBitsToFloat(backupReg0i)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +R125i.z = floatBitsToInt(tempResultf); +PS0i = R125i.z; +// 3 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R12i.x),intBitsToFloat(R17i.y),intBitsToFloat(R17i.z),-0.0),vec4(intBitsToFloat(R14i.x),intBitsToFloat(R16i.y),intBitsToFloat(R16i.z),0.0))); +tempi.x = clampFI32(tempi.x); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +PS1i = floatBitsToInt(1.0 / intBitsToFloat(PV0i.y)); +// 4 +R124i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.z), intBitsToFloat(R2i.z))); +PV0i.x = R124i.x; +R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),uf_blockPS6[15].x) + uf_blockPS6[14].w)); +R127i.y = clampFI32(R127i.y); +R127i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.x)),intBitsToFloat(R127i.w)) + intBitsToFloat(R127i.w))); +R127i.z = clampFI32(R127i.z); +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R125i.x)),intBitsToFloat(PS1i)) + 1.0)); +PV0i.w = R123i.w; +tempResultf = log2(intBitsToFloat(PV1i.x)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS0i = floatBitsToInt(tempResultf); +// 5 +R126i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[18].y, intBitsToFloat(R125i.z))); +PV1i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[29].z, intBitsToFloat(PS0i))); +R125i.z = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(0x2edbe6ff)); +R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R8i.x)); +R127i.w = clampFI32(R127i.w); +R125i.y = floatBitsToInt(-(intBitsToFloat(PV0i.x)) + 1.0); +PS1i = R125i.y; +// 6 +R127i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R3i.x),intBitsToFloat(R3i.y),intBitsToFloat(R3i.z),-0.0),vec4(uf_blockPS6[42].x,uf_blockPS6[42].y,uf_blockPS6[42].z,0.0))); +PV0i.x = R127i.x; +PV0i.y = R127i.x; +PV0i.z = R127i.x; +PV0i.w = R127i.x; +PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.y))); +// 7 +backupReg0i = R126i.y; +backupReg1i = R127i.w; +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), uf_blockPS6[13].w)); +R126i.y = floatBitsToInt(-(intBitsToFloat(R125i.x)) + intBitsToFloat(R124i.z)); +R123i.z = floatBitsToInt((mul_nonIEEE(-(uf_blockPS6[29].w),intBitsToFloat(PS0i)) + 1.0)); +PV1i.z = R123i.z; +R127i.w = floatBitsToInt((intBitsToFloat(backupReg0i) * intBitsToFloat(0x3dcccccd) + intBitsToFloat(R127i.z))); +tempResultf = log2(intBitsToFloat(backupReg1i)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS1i = floatBitsToInt(tempResultf); +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.w)),intBitsToFloat(PV1i.z)) + intBitsToFloat(PV1i.z))); +PV0i.x = R123i.x; +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.y), intBitsToFloat(PS1i))); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(R2i.z))); +R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.x), intBitsToFloat(R127i.x))); +R127i.y = floatBitsToInt(1.0 / intBitsToFloat(R125i.z)); +PS0i = R127i.y; +// 9 +backupReg0i = R0i.x; +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), uf_blockPS6[30].w)); +R124i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R125i.x))); +R125i.z = R1i.x; +R125i.z = floatBitsToInt(intBitsToFloat(R125i.z) / 2.0); +R125i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + -(intBitsToFloat(R125i.x))); +PS1i = floatBitsToInt(exp2(intBitsToFloat(PV0i.y))); +// 10 +R0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(R2i.z))); +PV0i.x = R0i.x; +R0i.y = floatBitsToInt(intBitsToFloat(R0i.z) + -(intBitsToFloat(R125i.x))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.w), intBitsToFloat(R126i.w))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PS1i))); +PS0i = floatBitsToInt(exp2(intBitsToFloat(R126i.x))); +// 11 +R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R127i.y))); +PV1i.x = R126i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(R125i.y)) + intBitsToFloat(R125i.y))); +PV1i.y = R123i.y; +PV1i.z = floatBitsToInt(-(intBitsToFloat(R127i.w)) + 1.0); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS0i), uf_blockPS6[16].w)); +R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R14i.w),intBitsToFloat(R125i.z)) + intBitsToFloat(R125i.z))); +PS1i = R127i.y; +// 12 +backupReg0i = R126i.y; +R1i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.z)),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.y))); +PV0i.x = R1i.x; +R126i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PV1i.y))); +R0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R13i.y), intBitsToFloat(PV1i.w))); +PV0i.z = R0i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.x)),intBitsToFloat(backupReg0i)) + intBitsToFloat(R124i.z))); +PV0i.w = R123i.w; +R125i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(R12i.w)) + intBitsToFloat(R127i.w))); +PS0i = R125i.x; +// 13 +backupReg0i = R126i.x; +backupReg0i = R126i.x; +backupReg0i = R126i.x; +R126i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(R0i.y)) + intBitsToFloat(PV0i.w))); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(R124i.y)) + intBitsToFloat(PV0i.w))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(R125i.w)) + intBitsToFloat(PV0i.w))); +PV1i.z = R123i.z; +R125i.w = floatBitsToInt(intBitsToFloat(R5i.w) + -(intBitsToFloat(R126i.z))); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(PV0i.x))); +PS1i = R127i.z; +// 14 +R127i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].x, intBitsToFloat(R126i.y))); +R124i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PV1i.z))); +R124i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].z, intBitsToFloat(R126i.y))); +R127i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].y, intBitsToFloat(R126i.y))); +R125i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PV1i.y))); +PS0i = R125i.z; +// 15 +backupReg0i = R4i.x; +R4i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R125i.w),intBitsToFloat(R18i.y)) + intBitsToFloat(R126i.z))); +R125i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(R126i.x))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R125i.x))); +R125i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R125i.x))); +R126i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.z), intBitsToFloat(R125i.x))); +PS1i = R126i.y; +// 16 +backupReg0i = R127i.x; +backupReg1i = R124i.z; +R127i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].y,intBitsToFloat(R127i.z)) + intBitsToFloat(R127i.w))); +R127i.y = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].x,intBitsToFloat(R127i.z)) + intBitsToFloat(backupReg0i))); +R124i.z = floatBitsToInt(intBitsToFloat(R5i.y) + -(intBitsToFloat(R125i.z))); +R127i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].z,intBitsToFloat(R127i.z)) + intBitsToFloat(backupReg1i))); +R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.x),-(intBitsToFloat(R0i.x))) + intBitsToFloat(R124i.x))); +PS0i = R127i.z; +// 17 +backupReg0i = R5i.z; +PV1i.x = floatBitsToInt(intBitsToFloat(R5i.x) + -(intBitsToFloat(R124i.y))); +R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R13i.y), uf_blockPS6[1].w)); +R5i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + -(intBitsToFloat(R125i.y))); +R126i.w = floatBitsToInt(uf_blockPS6[1].x + -(1.0)); +R124i.x = floatBitsToInt(uf_blockPS6[1].y + -(1.0)); +PS1i = R124i.x; +// 18 +backupReg0i = R127i.x; +backupReg1i = R126i.y; +backupReg2i = R127i.z; +R127i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.z),intBitsToFloat(R127i.z)) + intBitsToFloat(backupReg0i))); +R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R125i.w),intBitsToFloat(R127i.z)) + intBitsToFloat(R127i.y))); +R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg1i),intBitsToFloat(backupReg2i)) + intBitsToFloat(R127i.w))); +PV0i.w = floatBitsToInt(uf_blockPS6[1].z + -(1.0)); +R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),intBitsToFloat(R13i.w)) + intBitsToFloat(R124i.y))); +PS0i = R127i.y; +// 19 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.z),intBitsToFloat(R13i.w)) + intBitsToFloat(R125i.z))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.x),intBitsToFloat(R5i.y)) + 1.0)); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.w),intBitsToFloat(R5i.y)) + 1.0)); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.z),intBitsToFloat(R13i.w)) + intBitsToFloat(R125i.y))); +PV1i.w = R123i.w; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R5i.y)) + 1.0)); +PS1i = R122i.x; +// 20 +R5i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PV1i.z))); +R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PV1i.y))); +R5i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(PS1i))); +R3i.w = 0; +R2i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].x,intBitsToFloat(R0i.x)) + intBitsToFloat(R126i.y))); +PS0i = R2i.x; +// 21 +R2i.y = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].y,intBitsToFloat(R0i.x)) + intBitsToFloat(R127i.x))); +R2i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].z,intBitsToFloat(R0i.x)) + intBitsToFloat(R127i.z))); +R5i.w = 0x3f800000; +R3i.y = R14i.w; +PS1i = R3i.y; +// 22 +R3i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.z)),intBitsToFloat(R1i.x)) + intBitsToFloat(R1i.x))); +R2i.w = 0x3f800000; +} +if( activeMaskStackC[1] == true ) { +// 0 +R126i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS10[3].z,intBitsToFloat(R4i.x)) + uf_blockPS10[1].y)); +R126i.w = clampFI32(R126i.w); +// 1 +PV1i.y = floatBitsToInt(intBitsToFloat(R6i.x) + uf_blockPS10[1].z); +PV1i.y = clampFI32(PV1i.y); +// 2 +R3i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(R126i.w))); +// 3 +R6i.xyz = ivec3(R5i.x,R5i.y,R5i.z); +R6i.w = R5i.w; +// 4 +R5i.xyz = ivec3(R2i.x,R2i.y,R2i.z); +R5i.w = R2i.w; +// 5 +R4i.xyz = ivec3(R3i.x,R3i.y,R3i.z); +R4i.w = R3i.w; +} +// export +passPixelColor0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w)); +passPixelColor1 = vec4(intBitsToFloat(R5i.x), intBitsToFloat(R5i.y), intBitsToFloat(R5i.z), intBitsToFloat(R5i.w)); +passPixelColor2 = vec4(intBitsToFloat(R6i.x), intBitsToFloat(R6i.y), intBitsToFloat(R6i.z), intBitsToFloat(R6i.w)); +} diff --git a/Workarounds/BreathOfTheWild_!Intel_Shadows/45e72a252caba763_000003c000009269_ps.txt b/Workarounds/BreathOfTheWild_!Intel_Shadows/45e72a252caba763_000003c000009269_ps.txt new file mode 100644 index 00000000..05a88c35 --- /dev/null +++ b/Workarounds/BreathOfTheWild_!Intel_Shadows/45e72a252caba763_000003c000009269_ps.txt @@ -0,0 +1,581 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + +// shader cbbcf83b05c6d921 +UNIFORM_BUFFER_LAYOUT(33, 1, 7) uniform uniformBlockPS1 +{ +vec4 uf_blockPS1[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(38, 1, 8) uniform uniformBlockPS6 +{ +vec4 uf_blockPS6[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(42, 1, 9) uniform uniformBlockPS10 +{ +vec4 uf_blockPS10[1024]; +}; + +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(14, 1, 5) uniform sampler2D textureUnitPS14; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 1) in vec4 passParameterSem5; +layout(location = 2) in vec4 passParameterSem6; +layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else +uniform vec2 uf_fragCoordScale; +#endif +int clampFI32(int v) +{ +if( v == 0x7FFFFFFF ) + return floatBitsToInt(1.0); +else if( v == 0xFFFFFFFF ) + return floatBitsToInt(0.0); +return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); +} +float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } +float textureShadow_1(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_2(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_3(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_4(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +void main() +{ +ivec4 R0i = ivec4(0); +ivec4 R1i = ivec4(0); +ivec4 R2i = ivec4(0); +ivec4 R3i = ivec4(0); +ivec4 R4i = ivec4(0); +ivec4 R5i = ivec4(0); +ivec4 R6i = ivec4(0); +ivec4 R7i = ivec4(0); +ivec4 R8i = ivec4(0); +ivec4 R9i = ivec4(0); +ivec4 R10i = ivec4(0); +ivec4 R11i = ivec4(0); +ivec4 R122i = ivec4(0); +ivec4 R123i = ivec4(0); +ivec4 R124i = ivec4(0); +ivec4 R125i = ivec4(0); +ivec4 R126i = ivec4(0); +ivec4 R127i = ivec4(0); +int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i; +ivec4 PV0i = ivec4(0), PV1i = ivec4(0); +int PS0i = 0, PS1i = 0; +ivec4 tempi = ivec4(0); +float tempResultf; +int tempResulti; +ivec4 ARi = ivec4(0); +bool predResult = true; +bool activeMaskStack[2]; +bool activeMaskStackC[3]; +activeMaskStack[0] = false; +activeMaskStackC[0] = false; +activeMaskStackC[1] = false; +activeMaskStack[0] = true; +activeMaskStackC[0] = true; +activeMaskStackC[1] = true; +vec3 cubeMapSTM; +int cubeMapFaceId; +R0i = floatBitsToInt(passParameterSem0); +R1i = floatBitsToInt(passParameterSem5); +R2i = floatBitsToInt(passParameterSem6); +if( activeMaskStackC[1] == true ) { +R3i.w = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.xy)).x); +R6i.x = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.xy)).x); +R6i.z = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.zw)).x); +R6i.w = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.xy)).x); +R4i.xyzw = floatBitsToInt(texture(textureUnitPS3, intBitsToFloat(R2i.zw)).xyzw); +R2i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R2i.zw)).w); +} +if( activeMaskStackC[1] == true ) { +// 0 +backupReg0i = R4i.z; +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.w)) + uf_blockPS1[14].x)); +PV0i.x = R123i.x; +R124i.y = floatBitsToInt((intBitsToFloat(R4i.x) * 2.0 + -(1.0))); +R4i.z = floatBitsToInt((intBitsToFloat(R4i.y) * 2.0 + -(1.0))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R3i.w),uf_blockPS1[16].x) + uf_blockPS1[14].x)); +PV0i.w = R123i.w; +R3i.z = floatBitsToInt((intBitsToFloat(backupReg0i) * 2.0 + -(1.0))); +PS0i = R3i.z; +// 1 +R6i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), -(intBitsToFloat(PV0i.w)))); +R7i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), -(intBitsToFloat(PV0i.w)))); +R127i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.z)) + uf_blockPS1[14].x)); +PV1i.z = R127i.z; +R127i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.x)) + uf_blockPS1[14].x)); +R9i.z = floatBitsToInt(-(intBitsToFloat(PV0i.x))); +PS1i = R9i.z; +// 2 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R124i.y),intBitsToFloat(R4i.z),intBitsToFloat(R3i.z),-0.0),vec4(intBitsToFloat(R124i.y),intBitsToFloat(R4i.z),intBitsToFloat(R3i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R126i.z = tempi.x; +R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), -(intBitsToFloat(PV1i.z)))); +PS0i = R126i.w; +// 3 +backupReg0i = R127i.z; +backupReg1i = R127i.w; +backupReg1i = R127i.w; +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), -(intBitsToFloat(R127i.w)))); +R127i.y = floatBitsToInt(-(intBitsToFloat(R127i.z))); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.y), -(intBitsToFloat(backupReg0i)))); +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.w), -(intBitsToFloat(backupReg1i)))); +R125i.z = floatBitsToInt(-(intBitsToFloat(backupReg1i))); +PS1i = R125i.z; +// 4 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R6i.x),intBitsToFloat(R7i.y),intBitsToFloat(R9i.z),-0.0),vec4(intBitsToFloat(R6i.x),intBitsToFloat(R7i.y),intBitsToFloat(R9i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R124i.z = tempi.x; +R126i.y = floatBitsToInt(intBitsToFloat(R2i.z) * intBitsToFloat(0x437f0000)); +PS0i = R126i.y; +// 5 +R126i.x = floatBitsToInt(-(intBitsToFloat(R7i.y)) + intBitsToFloat(R127i.z)); +R125i.y = floatBitsToInt(-(intBitsToFloat(R6i.x)) + intBitsToFloat(R126i.w)); +R127i.z = floatBitsToInt(-(intBitsToFloat(R6i.x)) + intBitsToFloat(R127i.x)); +PV1i.z = R127i.z; +R126i.w = floatBitsToInt(-(intBitsToFloat(R9i.z)) + intBitsToFloat(R127i.y)); +PV1i.w = R126i.w; +R125i.x = floatBitsToInt(sqrt(intBitsToFloat(R126i.z))); +PS1i = R125i.x; +// 6 +R127i.x = floatBitsToInt(-(intBitsToFloat(R9i.z)) + intBitsToFloat(R125i.z)); +PV0i.x = R127i.x; +R127i.y = floatBitsToInt(-(intBitsToFloat(R7i.y)) + intBitsToFloat(R127i.w)); +PV0i.y = R127i.y; +R125i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(PV1i.z))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R6i.x), uf_blockPS6[43].x)); +R125i.w = floatBitsToInt(sqrt(intBitsToFloat(R124i.z))); +PS0i = R125i.w; +// 7 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.y), intBitsToFloat(PV0i.y))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R6i.x), uf_blockPS6[45].x)); +R124i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.y),uf_blockPS6[43].y) + intBitsToFloat(PV0i.w))); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.x), intBitsToFloat(PV0i.x))); +R127i.w = int(intBitsToFloat(R126i.y)); +PS1i = R127i.w; +// 8 +backupReg0i = R126i.x; +R126i.x = PS1i & 0x0000001c; +R0i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.x)),intBitsToFloat(R125i.y)) + intBitsToFloat(R125i.z))); +R0i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.z)),intBitsToFloat(backupReg0i)) + intBitsToFloat(PV1i.x))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.y),uf_blockPS6[45].y) + intBitsToFloat(PV1i.y))); +PV0i.w = R123i.w; +R0i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.y)),intBitsToFloat(R126i.w)) + intBitsToFloat(PV1i.w))); +PS0i = R0i.x; +// 9 +R127i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R9i.z),uf_blockPS6[43].z) + intBitsToFloat(R124i.z))); +R127i.y = floatBitsToInt(-(intBitsToFloat(R9i.z)) * intBitsToFloat(0x3d4ccccd)); +PV1i.y = R127i.y; +R127i.z = R127i.w & 0x00000002; +R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R9i.z),uf_blockPS6[45].z) + intBitsToFloat(PV0i.w))); +R2i.w = 0x3f800000; +PS1i = R2i.w; +// 10 +backupReg0i = R0i.y; +backupReg0i = R0i.y; +backupReg1i = R0i.z; +backupReg1i = R0i.z; +R124i.x = floatBitsToInt(dot(vec4(-(intBitsToFloat(R0i.x)),-(intBitsToFloat(backupReg0i)),-(intBitsToFloat(backupReg1i)),-0.0),vec4(-(intBitsToFloat(R0i.x)),-(intBitsToFloat(backupReg0i)),-(intBitsToFloat(backupReg1i)),0.0))); +PV0i.x = R124i.x; +PV0i.y = R124i.x; +PV0i.z = R124i.x; +PV0i.w = R124i.x; +R1i.x = floatBitsToInt((-(uf_blockPS6[53].w) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(PV1i.y))); +R1i.x = clampFI32(R1i.x); +PS0i = R1i.x; +// 11 +R9i.x = floatBitsToInt(uf_blockPS6[43].w + intBitsToFloat(R127i.x)); +R10i.z = floatBitsToInt(uf_blockPS6[45].w + intBitsToFloat(R127i.w)); +PS1i = floatBitsToInt(1.0 / intBitsToFloat(R125i.x)); +// 12 +R2i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.y), intBitsToFloat(PS1i))); +PV0i.x = R2i.x; +R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.z), intBitsToFloat(PS1i))); +PV0i.y = R1i.y; +R1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R3i.z), intBitsToFloat(PS1i))); +R11i.w = floatBitsToInt((-(uf_blockPS6[53].z) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(R127i.y))); +R11i.w = clampFI32(R11i.w); +PS0i = floatBitsToInt(1.0 / intBitsToFloat(R125i.w)); +// 13 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R6i.x), intBitsToFloat(PS0i))); +PV1i.x = R127i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R7i.y), intBitsToFloat(PS0i))); +PV1i.y = R127i.y; +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R9i.z), intBitsToFloat(PS0i))); +R125i.w = PV0i.x; +R125i.w = floatBitsToInt(intBitsToFloat(R125i.w) * 2.0); +R124i.z = PV0i.y; +R124i.z = floatBitsToInt(intBitsToFloat(R124i.z) * 2.0); +PS1i = R124i.z; +// 14 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +PS0i = floatBitsToInt(float(R126i.x)); +// 15 +backupReg0i = R127i.y; +R10i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(R125i.w)) + intBitsToFloat(R127i.x))); +R127i.y = floatBitsToInt(intBitsToFloat(PS0i) * intBitsToFloat(0x3d124925)); +R10i.w = floatBitsToInt(intBitsToFloat(PV0i.x) + 1.0); +R10i.w = clampFI32(R10i.w); +R9i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(R124i.z)) + intBitsToFloat(backupReg0i))); +PS1i = R9i.y; +// 16 +PS0i = floatBitsToInt(float(R127i.z)); +PS0i = floatBitsToInt(intBitsToFloat(PS0i) / 2.0); +// 17 +R0i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),-(intBitsToFloat(PS0i))) + intBitsToFloat(R127i.y))); +tempResultf = 1.0 / sqrt(intBitsToFloat(R124i.x)); +R2i.z = floatBitsToInt(tempResultf); +PS1i = R2i.z; +} +if( activeMaskStackC[1] == true ) { +activeMaskStack[1] = activeMaskStack[0]; +activeMaskStackC[2] = activeMaskStackC[1]; +// 0 +R7i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].x, uf_blockPS10[2].w)); +R6i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].y, uf_blockPS10[2].w)); +PV0i.z = floatBitsToInt(uf_blockPS10[2].z + 1.0); +// 1 +R8i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].z, uf_blockPS10[2].w)); +PV1i.z = R8i.z; +R1i.w = 0; +PV1i.w = R1i.w; +R9i.w = floatBitsToInt(-(intBitsToFloat(R1i.x)) + intBitsToFloat(PV0i.z)); +R9i.w = clampFI32(R9i.w); +PS1i = R9i.w; +// 2 +R1i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.z),intBitsToFloat(R1i.z)),vec4(-(intBitsToFloat(R7i.x)),-(intBitsToFloat(R6i.y)),-(intBitsToFloat(PV1i.z)),-(intBitsToFloat(PV1i.w))))); +PV0i.x = R1i.x; +PV0i.y = R1i.x; +PV0i.z = R1i.x; +PV0i.w = R1i.x; +// 3 +predResult = (1.0 > intBitsToFloat(R11i.w)); +activeMaskStack[1] = predResult; +activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true; +} +else { +activeMaskStack[1] = false; +activeMaskStackC[2] = false; +} +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = ((-(intBitsToFloat(R9i.z)) > uf_blockPS1[58].x)?int(0xFFFFFFFF):int(0x0)); +R127i.y = ((-(intBitsToFloat(R9i.z)) > uf_blockPS1[58].y)?int(0xFFFFFFFF):int(0x0)); +PV0i.z = floatBitsToInt(intBitsToFloat(R2i.x) * 1.5); +PV0i.w = floatBitsToInt(intBitsToFloat(R1i.y) * 1.5); +PS0i = floatBitsToInt(intBitsToFloat(R1i.z) * 1.5); +// 1 +backupReg0i = R2i.z; +backupReg1i = R1i.x; +R1i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.x)),intBitsToFloat(R2i.z)) + intBitsToFloat(PV0i.z))); +R1i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.y)),intBitsToFloat(R2i.z)) + intBitsToFloat(PV0i.w))); +R2i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.z)),intBitsToFloat(backupReg0i)) + intBitsToFloat(PS0i))); +PV1i.w = PV0i.x & int(1); +PS1i = ((intBitsToFloat(0x3eb33333) > intBitsToFloat(backupReg1i))?int(0xFFFFFFFF):int(0x0)); +// 2 +R2i.x = floatBitsToInt((intBitsToFloat(R0i.w) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(0x3ac49ba6))); +R2i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R9i.z)),uf_blockPS1[17].y) + 1.0)); +PV0i.z = PV1i.w - R127i.y; +R1i.w = ((PS1i == 0)?(0x3f800000):(0)); +R2i.w = 0x3f000000; +PS0i = R2i.w; +// 3 +PV1i.x = PV0i.z << 0x00000002; +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(R2i.z))); +R127i.w = floatBitsToInt(float(PV0i.z)); +PS1i = R127i.w; +// 4 +R0i.x = PV1i.x + 0x0000002d; +R0i.y = PV1i.x + 0x0000002c; +R0i.z = PV1i.x + 0x0000002b; +R0i.w = PV1i.x + 0x0000002a; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R1i.y)) + intBitsToFloat(PV1i.y))); +PS0i = R122i.x; +// 5 +R1i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(R1i.x)) + intBitsToFloat(PS0i))); +R6i.z = floatBitsToInt(roundEven(intBitsToFloat(R127i.w))); +PS1i = R6i.z; +} +if( activeMaskStackC[2] == true ) { +R3i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +R4i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +R5i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +} +if( activeMaskStackC[2] == true ) { +// 0 +R126i.y = floatBitsToInt(uf_blockPS6[53].y); +R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) / 2.0); +PV0i.y = R126i.y; +R126i.z = floatBitsToInt(uf_blockPS6[53].x); +R126i.z = floatBitsToInt(intBitsToFloat(R126i.z) / 2.0); +tempResultf = 1.0 / sqrt(intBitsToFloat(R1i.z)); +PS0i = floatBitsToInt(tempResultf); +// 1 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(PS0i))); +PV1i.x = R127i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.y), intBitsToFloat(PS0i))); +PV1i.y = R127i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(PS0i))); +PV1i.z = R127i.z; +R126i.w = floatBitsToInt(-(intBitsToFloat(PV0i.y))); +R7i.z = R6i.z; +PS1i = R7i.z; +// 2 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R7i.x),intBitsToFloat(R6i.y),intBitsToFloat(R8i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R125i.y = floatBitsToInt(-(intBitsToFloat(R126i.z))); +PS0i = R125i.y; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(PV0i.x)) + 1.0)); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R8i.z)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.z))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R6i.y)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.y))); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R7i.x)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.x))); +PV1i.w = R123i.w; +R8i.z = R6i.z; +PS1i = R8i.z; +// 4 +backupReg0i = R126i.y; +R127i.x = floatBitsToInt(intBitsToFloat(PV1i.z) * intBitsToFloat(0x3b449ba7)); +R126i.y = floatBitsToInt(intBitsToFloat(PV1i.y) * intBitsToFloat(0x3b449ba7)); +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(R1i.w))); +R127i.w = floatBitsToInt(intBitsToFloat(PV1i.w) * intBitsToFloat(0x3b449ba7)); +R126i.x = backupReg0i; +PS0i = R126i.x; +// 5 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(R2i.y))); +R1i.z = R6i.z; +// 6 +backupReg0i = R127i.w; +R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.y),intBitsToFloat(PV1i.x)) + intBitsToFloat(R9i.z))); +R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PV1i.x)) + intBitsToFloat(R7i.y))); +R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(PV1i.x)) + intBitsToFloat(R6i.x))); +PV0i.w = R127i.w; +// 7 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R4i.x))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R5i.x))); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R3i.x))); +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R4i.y)) + intBitsToFloat(PV1i.x))); +PV0i.x = R123i.x; +R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R5i.y)) + intBitsToFloat(PV1i.y))); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R3i.y)) + intBitsToFloat(PV1i.w))); +PV0i.z = R123i.z; +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(R0i.x))); +// 9 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(R4i.z)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(R3i.z)) + intBitsToFloat(PV0i.z))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R0i.y)) + intBitsToFloat(PV0i.w))); +PV1i.z = R123i.z; +// 10 +PV0i.x = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV1i.y)); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(R5i.z)) + intBitsToFloat(R126i.y))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(R0i.z)) + intBitsToFloat(PV1i.z))); +PV0i.z = R123i.z; +R127i.w = floatBitsToInt(intBitsToFloat(R4i.w) + intBitsToFloat(PV1i.x)); +// 11 +PV1i.x = floatBitsToInt(intBitsToFloat(R5i.w) + intBitsToFloat(PV0i.y)); +PV1i.y = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV0i.z)); +PS1i = floatBitsToInt(1.0 / intBitsToFloat(PV0i.x)); +// 12 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PS1i))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(PS1i))); +PV0i.y = R127i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PS1i))); +PV0i.z = R127i.z; +// 13 +R127i.x = floatBitsToInt(-(intBitsToFloat(R2i.x)) + intBitsToFloat(PV0i.x)); +R127i.x = clampFI32(R127i.x); +PV1i.x = R127i.x; +R6i.y = floatBitsToInt((uf_blockPS6[53].y * 0.5 + intBitsToFloat(PV0i.y))); +R6i.x = floatBitsToInt((uf_blockPS6[53].x * 0.5 + intBitsToFloat(PV0i.z))); +PS1i = R6i.x; +// 14 +R7i.x = floatBitsToInt(intBitsToFloat(R127i.z) + intBitsToFloat(R126i.z)); +R7i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(R126i.w)); +R6i.w = PV1i.x; +R7i.w = PV1i.x; +PS0i = R7i.w; +// 15 +R8i.x = floatBitsToInt(intBitsToFloat(R127i.z) + intBitsToFloat(R125i.y)); +R8i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(R126i.x)); +R8i.w = R127i.x; +R1i.x = floatBitsToInt((-(uf_blockPS6[53].x) * 0.5 + intBitsToFloat(R127i.z))); +PS1i = R1i.x; +// 16 +R1i.y = floatBitsToInt((-(uf_blockPS6[53].y) * 0.5 + intBitsToFloat(R127i.y))); +R1i.w = R127i.x; +} +if( activeMaskStackC[2] == true ) { +R6i.y = floatBitsToInt(textureShadow_1(textureUnitPS7, vec4(intBitsToFloat(R6i.x),intBitsToFloat(R6i.y),intBitsToFloat(R6i.z),intBitsToFloat(R6i.w)))); +R7i.x = floatBitsToInt(textureShadow_2(textureUnitPS7, vec4(intBitsToFloat(R7i.x),intBitsToFloat(R7i.y),intBitsToFloat(R7i.z),intBitsToFloat(R7i.w)))); +R8i.w = floatBitsToInt(textureShadow_3(textureUnitPS7, vec4(intBitsToFloat(R8i.x),intBitsToFloat(R8i.y),intBitsToFloat(R8i.z),intBitsToFloat(R8i.w)))); +R1i.z = floatBitsToInt(textureShadow_4(textureUnitPS7, vec4(intBitsToFloat(R1i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.z),intBitsToFloat(R1i.w)))); +} +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.z = floatBitsToInt(intBitsToFloat(R6i.y) + intBitsToFloat(R7i.x)); +PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0); +// 1 +R123i.z = floatBitsToInt((intBitsToFloat(R8i.w) * 0.5 + intBitsToFloat(PV0i.z))); +PV1i.z = R123i.z; +// 2 +R127i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + intBitsToFloat(PV1i.z))/2.0); +PV0i.y = R127i.y; +// 3 +PV1i.x = floatBitsToInt(-(intBitsToFloat(PV0i.y)) + 1.0); +// 4 +R0i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),intBitsToFloat(R11i.w)) + intBitsToFloat(R127i.y))); +} +activeMaskStack[1] = activeMaskStack[1] == false; +activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true; +if( activeMaskStackC[2] == true ) { +// 0 +R0i.w = R2i.w; +} +activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; +if( activeMaskStackC[1] == true ) { +// 0 +R0i.x = floatBitsToInt((intBitsToFloat(R9i.x) * intBitsToFloat(0x38d1b717) + 0.5)); +R0i.y = floatBitsToInt((intBitsToFloat(R10i.z) * intBitsToFloat(0x3903126f) + 0.5)); +PV0i.z = floatBitsToInt(-(intBitsToFloat(R9i.y))); +PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0); +PV0i.w = R10i.x; +PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0); +R2i.z = R2i.w; +PS0i = R2i.z; +// 1 +R1i.x = floatBitsToInt(intBitsToFloat(PV0i.w) + 0.5); +R1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + 0.5); +R2i.w = 0x3f800000; +} +if( activeMaskStackC[1] == true ) { +R0i.xyz = floatBitsToInt(textureLod(textureUnitPS14, intBitsToFloat(R0i.xy),0.0).xyz); +R1i.y = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R1i.xy),0.0).x); +} +if( activeMaskStackC[1] == true ) { +// 0 +backupReg0i = R0i.x; +backupReg1i = R0i.y; +backupReg2i = R0i.z; +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg2i),-0.0),vec4(uf_blockPS6[42].x,uf_blockPS6[42].y,uf_blockPS6[42].z,0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R2i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),-(intBitsToFloat(R10i.w))) + intBitsToFloat(R1i.y))); +PS0i = R2i.y; +// 1 +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PV0i.x))); +// 2 +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(PV1i.w))); +PV0i.z = R127i.z; +// 3 +PV1i.y = floatBitsToInt(intBitsToFloat(R0i.w) + -(intBitsToFloat(PV0i.z))); +// 4 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.y),intBitsToFloat(R9i.w)) + intBitsToFloat(R127i.z))); +PV0i.x = R123i.x; +// 5 +R2i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + uf_blockPS10[1].y); +R2i.x = clampFI32(R2i.x); +} +// export +passPixelColor5 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +} diff --git a/Workarounds/BreathOfTheWild_!Intel_Shadows/59cba7eb9a9c1df6_00000007f924d249_ps.txt b/Workarounds/BreathOfTheWild_!Intel_Shadows/59cba7eb9a9c1df6_00000007f924d249_ps.txt new file mode 100644 index 00000000..a7d568a1 --- /dev/null +++ b/Workarounds/BreathOfTheWild_!Intel_Shadows/59cba7eb9a9c1df6_00000007f924d249_ps.txt @@ -0,0 +1,848 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + +// shader 9c98a67271f8cc75 +UNIFORM_BUFFER_LAYOUT(33, 1, 10) uniform uniformBlockPS1 +{ +vec4 uf_blockPS1[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(38, 1, 11) uniform uniformBlockPS6 +{ +vec4 uf_blockPS6[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(42, 1, 12) uniform uniformBlockPS10 +{ +vec4 uf_blockPS10[1024]; +}; + +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 3) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(10, 1, 5) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 6) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(14, 1, 7) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 8) uniform sampler2D textureUnitPS15; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 1) in vec4 passParameterSem2; +layout(location = 2) in vec4 passParameterSem5; +layout(location = 3) in vec4 passParameterSem6; +layout(location = 0) out vec4 passPixelColor0; +layout(location = 1) out vec4 passPixelColor1; +#ifdef VULKAN +layout(set = 1, binding = 9) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else +uniform vec2 uf_fragCoordScale; +#endif +int clampFI32(int v) +{ +if( v == 0x7FFFFFFF ) + return floatBitsToInt(1.0); +else if( v == 0xFFFFFFFF ) + return floatBitsToInt(0.0); +return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); +} +float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } +float textureShadow_1(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_2(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +void main() +{ +ivec4 R0i = ivec4(0); +ivec4 R1i = ivec4(0); +ivec4 R2i = ivec4(0); +ivec4 R3i = ivec4(0); +ivec4 R4i = ivec4(0); +ivec4 R5i = ivec4(0); +ivec4 R6i = ivec4(0); +ivec4 R7i = ivec4(0); +ivec4 R8i = ivec4(0); +ivec4 R9i = ivec4(0); +ivec4 R10i = ivec4(0); +ivec4 R11i = ivec4(0); +ivec4 R12i = ivec4(0); +ivec4 R13i = ivec4(0); +ivec4 R14i = ivec4(0); +ivec4 R15i = ivec4(0); +ivec4 R16i = ivec4(0); +ivec4 R17i = ivec4(0); +ivec4 R18i = ivec4(0); +ivec4 R122i = ivec4(0); +ivec4 R123i = ivec4(0); +ivec4 R124i = ivec4(0); +ivec4 R125i = ivec4(0); +ivec4 R126i = ivec4(0); +ivec4 R127i = ivec4(0); +int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i; +ivec4 PV0i = ivec4(0), PV1i = ivec4(0); +int PS0i = 0, PS1i = 0; +ivec4 tempi = ivec4(0); +float tempResultf; +int tempResulti; +ivec4 ARi = ivec4(0); +bool predResult = true; +bool activeMaskStack[3]; +bool activeMaskStackC[4]; +activeMaskStack[0] = false; +activeMaskStack[1] = false; +activeMaskStackC[0] = false; +activeMaskStackC[1] = false; +activeMaskStackC[2] = false; +activeMaskStack[0] = true; +activeMaskStackC[0] = true; +activeMaskStackC[1] = true; +vec3 cubeMapSTM; +int cubeMapFaceId; +R0i = floatBitsToInt(passParameterSem0); +R1i = floatBitsToInt(passParameterSem2); +R2i = floatBitsToInt(passParameterSem5); +R3i = floatBitsToInt(passParameterSem6); +if( activeMaskStackC[1] == true ) { +R4i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R5i.x = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R5i.z = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.zw)).x); +R5i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R3i.xyzw = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R3i.zw)).xyzw); +R13i.xy = floatBitsToInt(texture(textureUnitPS14, intBitsToFloat(R0i.xy)).xy); +} +if( activeMaskStackC[1] == true ) { +// 0 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.w)) + uf_blockPS1[14].x)); +PV0i.x = R123i.x; +R127i.y = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.z)) + uf_blockPS1[14].x)); +PV0i.y = R127i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R4i.w),uf_blockPS1[16].x) + uf_blockPS1[14].x)); +PV0i.z = R123i.z; +R127i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.x)) + uf_blockPS1[14].x)); +R5i.x = floatBitsToInt((intBitsToFloat(R3i.x) * 2.0 + -(1.0))); +PS0i = R5i.x; +// 1 +R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), -(intBitsToFloat(PV0i.z)))); +PV1i.x = R1i.x; +R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), -(intBitsToFloat(PV0i.z)))); +R1i.z = floatBitsToInt(-(intBitsToFloat(PV0i.x))); +R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), -(intBitsToFloat(PV0i.y)))); +R125i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), -(intBitsToFloat(PV0i.y)))); +PS1i = R125i.w; +// 2 +R127i.x = floatBitsToInt(-(intBitsToFloat(R127i.y))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), uf_blockPS6[43].x)); +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), uf_blockPS6[45].x)); +R124i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), -(intBitsToFloat(R127i.w)))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.w), -(intBitsToFloat(R127i.w)))); +PS0i = R127i.y; +// 3 +backupReg0i = R127i.w; +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),uf_blockPS6[45].y) + intBitsToFloat(PV0i.z))); +PV1i.x = R123i.x; +R126i.y = floatBitsToInt(-(intBitsToFloat(R1i.x)) + intBitsToFloat(R126i.w)); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),uf_blockPS6[43].y) + intBitsToFloat(PV0i.y))); +PV1i.z = R123i.z; +R127i.w = floatBitsToInt(-(intBitsToFloat(backupReg0i))); +R126i.x = floatBitsToInt(-(intBitsToFloat(R1i.y)) + intBitsToFloat(R125i.w)); +PS1i = R126i.x; +// 4 +backupReg0i = R127i.x; +R127i.x = floatBitsToInt(-(intBitsToFloat(R1i.z)) + intBitsToFloat(backupReg0i)); +R125i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.z),uf_blockPS6[45].z) + intBitsToFloat(PV1i.x))); +R125i.z = floatBitsToInt(-(intBitsToFloat(R1i.x)) + intBitsToFloat(R124i.w)); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.z),uf_blockPS6[43].z) + intBitsToFloat(PV1i.z))); +PV0i.w = R123i.w; +R127i.z = floatBitsToInt(-(intBitsToFloat(R1i.y)) + intBitsToFloat(R127i.y)); +PS0i = R127i.z; +// 5 +R9i.x = floatBitsToInt(uf_blockPS6[43].w + intBitsToFloat(PV0i.w)); +PV1i.x = R9i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), uf_blockPS6[44].x)); +R126i.z = floatBitsToInt(-(intBitsToFloat(R1i.z)) + intBitsToFloat(R127i.w)); +PV1i.z = R126i.z; +R4i.w = floatBitsToInt((intBitsToFloat(R3i.y) * 2.0 + -(1.0))); +R5i.z = floatBitsToInt((intBitsToFloat(R3i.z) * 2.0 + -(1.0))); +PS1i = R5i.z; +// 6 +R3i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),uf_blockPS6[39].z) + -(uf_blockPS6[39].x))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.x), intBitsToFloat(PV1i.z))); +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.z))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.x), intBitsToFloat(R125i.z))); +R2i.y = floatBitsToInt(intBitsToFloat(R3i.w) * intBitsToFloat(0x437f0000)); +PS0i = R2i.y; +// 7 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),uf_blockPS6[44].y) + intBitsToFloat(R127i.y))); +PV1i.x = R123i.x; +R0i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.z)),intBitsToFloat(R126i.y)) + intBitsToFloat(PV0i.w))); +R4i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R125i.z)),intBitsToFloat(R126i.x)) + intBitsToFloat(PV0i.z))); +R5i.w = 0x3f800000; +R4i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.z)),intBitsToFloat(R127i.x)) + intBitsToFloat(PV0i.y))); +PS1i = R4i.x; +// 8 +R2i.x = floatBitsToInt((-(intBitsToFloat(R1i.z)) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(0xc0600000))); +R2i.x = clampFI32(R2i.x); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R1i.z))); +R0i.z = floatBitsToInt(-(intBitsToFloat(R1i.z)) * intBitsToFloat(0x3d4ccccd)); +PV0i.z = R0i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.z),uf_blockPS6[44].z) + intBitsToFloat(PV1i.x))); +PV0i.w = R123i.w; +R10i.x = floatBitsToInt(uf_blockPS1[0].y); +PS0i = R10i.x; +// 9 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R1i.y)) + intBitsToFloat(PV0i.y))); +PV1i.x = R123i.x; +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.z), intBitsToFloat(R5i.z))); +R15i.z = floatBitsToInt(uf_blockPS6[44].w + intBitsToFloat(PV0i.w)); +PV1i.z = R15i.z; +R0i.w = floatBitsToInt((-(uf_blockPS6[53].w) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(PV0i.z))); +R0i.w = clampFI32(R0i.w); +R9i.w = R13i.x; +R9i.w = clampFI32(R9i.w); +PS1i = R9i.w; +// 10 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(R1i.x)) + intBitsToFloat(PV1i.x))); +PV0i.x = R123i.x; +R12i.y = PV1i.z; +PV0i.y = R12i.y; +R9i.z = floatBitsToInt(uf_blockPS6[45].w + intBitsToFloat(R125i.y)); +PV0i.z = R9i.z; +R6i.w = floatBitsToInt(mul_nonIEEE(-(intBitsToFloat(R1i.z)), uf_blockPS1[17].y)); +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R4i.w),intBitsToFloat(R4i.w)) + intBitsToFloat(PV1i.y))); +PS0i = R122i.x; +// 11 +R0i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.x),intBitsToFloat(R5i.x)) + intBitsToFloat(PS0i))); +R3i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),uf_blockPS6[39].z) + -(uf_blockPS6[39].y))); +R2i.z = floatBitsToInt(-(intBitsToFloat(PV0i.y)) + uf_blockPS6[39].w); +R3i.w = floatBitsToInt(mul_nonIEEE(-(intBitsToFloat(R4i.z)), -(intBitsToFloat(R4i.z)))); +R2i.w = floatBitsToInt(sqrt(intBitsToFloat(PV0i.x))); +PS1i = R2i.w; +} +if( activeMaskStackC[1] == true ) { +R3i.z = floatBitsToInt(textureLod(textureUnitPS11, intBitsToFloat(R3i.xy),0.0).x); +} +if( activeMaskStackC[1] == true ) { +// 0 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.y)),-(intBitsToFloat(R0i.y))) + intBitsToFloat(R3i.w))); +PV0i.x = R123i.x; +R125i.y = floatBitsToInt(uf_blockPS10[2].z + 1.0); +R123i.w = floatBitsToInt((mul_nonIEEE(-(uf_blockPS6[39].w),intBitsToFloat(R3i.z)) + intBitsToFloat(R2i.z))); +PV0i.w = R123i.w; +PS0i = floatBitsToInt(1.0 / intBitsToFloat(R2i.w)); +// 1 +R11i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(PS0i))); +R11i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.y), intBitsToFloat(PS0i))); +PV1i.y = R11i.y; +R127i.z = floatBitsToInt(intBitsToFloat(PV0i.w) * 0.25); +R127i.z = clampFI32(R127i.z); +PV1i.z = R127i.z; +R127i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R4i.x)),-(intBitsToFloat(R4i.x))) + intBitsToFloat(PV0i.x))); +R10i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PS0i))); +PS1i = R10i.z; +// 2 +PV0i.x = floatBitsToInt(-(intBitsToFloat(PV1i.z)) + 1.0); +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.y)),intBitsToFloat(PV1i.y)) + 1.0)); +PV0i.y = R123i.y; +R16i.z = floatBitsToInt(-(intBitsToFloat(R0i.w)) + intBitsToFloat(R125i.y)); +R16i.z = clampFI32(R16i.z); +R11i.z = floatBitsToInt((-(uf_blockPS6[53].z) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(R0i.z))); +R11i.z = clampFI32(R11i.z); +PS0i = R11i.z; +// 3 +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.z)),intBitsToFloat(PV0i.x)) + intBitsToFloat(PV0i.x))); +PV1i.y = R123i.y; +R17i.z = floatBitsToInt(intBitsToFloat(R2i.x) + uf_blockPS10[3].y); +tempResultf = 1.0 / sqrt(intBitsToFloat(PV0i.y)); +R0i.z = floatBitsToInt(tempResultf); +PS1i = R0i.z; +// 4 +R10i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.z)),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.y))); +PV0i.w = R10i.w; +PS0i = int(intBitsToFloat(R2i.y)); +// 5 +PV1i.w = PS0i & int(1); +R11i.w = floatBitsToInt(-(intBitsToFloat(PV0i.w)) + 1.0); +PS1i = R11i.w; +// 6 +R12i.z = ((PV1i.w == 0)?(0):(0x3f800000)); +tempResultf = 1.0 / sqrt(intBitsToFloat(R0i.x)); +PS0i = floatBitsToInt(tempResultf); +// 7 +R3i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(PS0i))); +R4i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.w), intBitsToFloat(PS0i))); +R13i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.z), intBitsToFloat(PS0i))); +R4i.w = floatBitsToInt(uf_blockPS10[2].w); +tempResultf = 1.0 / sqrt(intBitsToFloat(R127i.w)); +R2i.w = floatBitsToInt(tempResultf); +PS1i = R2i.w; +} +if( activeMaskStackC[1] == true ) { +activeMaskStack[1] = activeMaskStack[0]; +activeMaskStackC[2] = activeMaskStackC[1]; +// 0 +R5i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].x, intBitsToFloat(R4i.w))); +PV0i.x = R5i.x; +R5i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].y, intBitsToFloat(R4i.w))); +PV0i.y = R5i.y; +R14i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].z, intBitsToFloat(R4i.w))); +PV0i.z = R14i.z; +R0i.w = 0; +// 1 +R127i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.y)),intBitsToFloat(PV0i.y)) + 1.0)); +R2i.y = PV0i.z; +PV1i.y = R2i.y; +R2i.z = 0; +PV1i.z = R2i.z; +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R10i.z), intBitsToFloat(PV0i.z))); +R0i.x = PV0i.x; +PS1i = R0i.x; +// 2 +R126i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R11i.x),intBitsToFloat(R10i.z),intBitsToFloat(R10i.z),-0.0),vec4(intBitsToFloat(PS1i),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = R126i.x; +PV0i.y = R126i.x; +PV0i.z = R126i.x; +PV0i.w = R126i.x; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R11i.y),intBitsToFloat(R5i.y)) + intBitsToFloat(PV1i.w))); +PS0i = R122i.x; +// 3 +R10i.y = floatBitsToInt(uf_blockPS1[1].y); +R18i.z = floatBitsToInt(uf_blockPS1[2].y); +R12i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R11i.x),intBitsToFloat(R5i.x)) + intBitsToFloat(PS0i))); +tempResultf = 1.0 / sqrt(intBitsToFloat(R127i.x)); +PS1i = floatBitsToInt(tempResultf); +// 4 +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS1i), intBitsToFloat(R0i.z))); +// 5 +R9i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R126i.x))); +// 6 +predResult = (1.0 > intBitsToFloat(R11i.z)); +activeMaskStack[1] = predResult; +activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true; +} +else { +activeMaskStack[1] = false; +activeMaskStackC[2] = false; +} +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = floatBitsToInt(intBitsToFloat(R3i.x) * 1.5); +R127i.y = ((-(intBitsToFloat(R1i.z)) > uf_blockPS1[58].y)?int(0xFFFFFFFF):int(0x0)); +PV0i.z = ((-(intBitsToFloat(R1i.z)) > uf_blockPS1[58].x)?int(0xFFFFFFFF):int(0x0)); +PV0i.w = floatBitsToInt(intBitsToFloat(R4i.y) * 1.5); +PS0i = floatBitsToInt(intBitsToFloat(R13i.z) * 1.5); +// 1 +backupReg0i = R2i.w; +PV1i.x = PV0i.z & int(1); +R2i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R4i.x)),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.x))); +R2i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.y)),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.w))); +R2i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R4i.z)),intBitsToFloat(backupReg0i)) + intBitsToFloat(PS0i))); +PV1i.w = R2i.w; +R122i.x = floatBitsToInt((intBitsToFloat(R6i.w) * 0.25 + 1.0)); +PS1i = R122i.x; +// 2 +R2i.x = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R3i.y = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R5i.z = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R4i.w = PV1i.x - R127i.y; +PV0i.w = R4i.w; +PS0i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(PV1i.w))); +// 3 +PV1i.x = PV0i.w << 0x00000002; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R18i.z), intBitsToFloat(R13i.z))); +R4i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R13i.z), -(intBitsToFloat(R0i.w)))); +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.z),intBitsToFloat(R2i.z)) + intBitsToFloat(PS0i))); +PS1i = R122i.x; +// 4 +R0i.x = PV1i.x + 0x0000002d; +R0i.y = PV1i.x + 0x0000002b; +R0i.z = PV1i.x + 0x0000002c; +R0i.w = PV1i.x + 0x0000002a; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.y),intBitsToFloat(R2i.y)) + intBitsToFloat(PS1i))); +PS0i = R122i.x; +// 5 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R10i.x),intBitsToFloat(R10i.y),intBitsToFloat(R127i.y),-0.0),vec4(intBitsToFloat(R3i.x),intBitsToFloat(R4i.y),1.0,0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R3i.z = tempi.x; +tempResultf = 1.0 / sqrt(intBitsToFloat(PS0i)); +R3i.w = floatBitsToInt(tempResultf); +PS1i = R3i.w; +} +if( activeMaskStackC[2] == true ) { +R6i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +R7i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +R8i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +} +if( activeMaskStackC[2] == true ) { +// 0 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(R3i.w))); +PV0i.x = R127i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(R3i.w))); +PV0i.y = R127i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.w), intBitsToFloat(R3i.w))); +PV0i.z = R127i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R10i.x)),intBitsToFloat(R3i.z)) + intBitsToFloat(R3i.x))); +PV0i.w = R123i.w; +R126i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R10i.y)),intBitsToFloat(R3i.z)) + intBitsToFloat(R4i.y))); +PS0i = R126i.w; +// 1 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(R14i.z),-0.0),vec4(intBitsToFloat(PV0i.x),intBitsToFloat(PV0i.y),intBitsToFloat(PV0i.z),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R126i.y = tempi.x; +R126i.z = floatBitsToInt((intBitsToFloat(PV0i.w) * intBitsToFloat(0x3f19999a) + intBitsToFloat(R1i.x))); +PS1i = R126i.z; +// 2 +backupReg0i = R127i.x; +R127i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R5i.y)),intBitsToFloat(PV1i.x)) + intBitsToFloat(R127i.y))); +R125i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R18i.z)),intBitsToFloat(R3i.z)) + intBitsToFloat(R13i.z))); +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R5i.x)),intBitsToFloat(PV1i.x)) + intBitsToFloat(backupReg0i))); +PV0i.z = R123i.z; +R127i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.x)),intBitsToFloat(PV1i.x)) + 1.0)); +R127i.y = floatBitsToInt(float(R4i.w)); +PS0i = R127i.y; +// 3 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R3i.x),intBitsToFloat(R4i.y),intBitsToFloat(R13i.z),intBitsToFloat(R4i.z)),vec4(-(intBitsToFloat(R5i.x)),-(intBitsToFloat(R5i.y)),-(intBitsToFloat(R14i.z)),1.0))); +tempi.x = clampFI32(tempi.x); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R124i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(R2i.x))); +PS1i = R124i.y; +// 4 +backupReg0i = R127i.x; +R127i.x = floatBitsToInt((intBitsToFloat(R126i.w) * intBitsToFloat(0x3f19999a) + intBitsToFloat(R1i.y))); +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R14i.z)),intBitsToFloat(R126i.y)) + intBitsToFloat(R127i.z))); +PV0i.y = R123i.y; +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PV1i.x))); +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R5i.z))); +R5i.z = floatBitsToInt(roundEven(intBitsToFloat(R127i.y))); +PS0i = R5i.z; +// 5 +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R12i.z), intBitsToFloat(PV0i.z))); +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(R3i.y))); +R123i.w = floatBitsToInt((intBitsToFloat(R125i.y) * intBitsToFloat(0x3f19999a) + intBitsToFloat(R1i.z))); +PV1i.w = R123i.w; +// 6 +R1i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.y),intBitsToFloat(PV1i.y)) + intBitsToFloat(R126i.z))); +PV0i.x = R1i.x; +R1i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(PV1i.y)) + intBitsToFloat(R127i.x))); +R12i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.w))); +// 7 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R7i.x))); +R124i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R8i.x))); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R6i.x))); +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R7i.y)) + intBitsToFloat(PV1i.x))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R6i.y)) + intBitsToFloat(PV1i.w))); +PV0i.y = R123i.y; +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R0i.x))); +// 9 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R7i.z)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R8i.y)) + intBitsToFloat(R124i.y))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R6i.z)) + intBitsToFloat(PV0i.y))); +PV1i.z = R123i.z; +// 10 +PV0i.x = floatBitsToInt(intBitsToFloat(R6i.w) + intBitsToFloat(PV1i.z)); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(R127i.w))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R8i.z)) + intBitsToFloat(PV1i.y))); +PV0i.z = R123i.z; +R127i.w = floatBitsToInt(intBitsToFloat(R7i.w) + intBitsToFloat(PV1i.x)); +// 11 +PV1i.x = floatBitsToInt(intBitsToFloat(R8i.w) + intBitsToFloat(PV0i.z)); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R0i.z)) + intBitsToFloat(PV0i.y))); +PV1i.z = R123i.z; +R126i.w = floatBitsToInt(1.0 / intBitsToFloat(PV0i.x)); +PS1i = R126i.w; +// 12 +PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.z)); +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PS1i))); +R5i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PS1i))); +PS0i = R5i.x; +// 13 +R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R126i.w))); +R5i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(0xbb03126f)); +R5i.w = clampFI32(R5i.w); +} +if( activeMaskStackC[2] == true ) { +R6i.y = floatBitsToInt(textureShadow_1(textureUnitPS7, vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(R5i.z),intBitsToFloat(R5i.w)))); +} +if( activeMaskStackC[2] == true ) { +activeMaskStack[2] = activeMaskStack[1]; +activeMaskStackC[3] = activeMaskStackC[2]; +// 0 +PV0i.x = ((1.0 > intBitsToFloat(R6i.y))?int(0xFFFFFFFF):int(0x0)); +// 1 +R0i.w = ((R4i.w > 0)?(PV0i.x):(0)); +// 2 +predResult = (R0i.w != 0); +activeMaskStack[2] = predResult; +activeMaskStackC[3] = predResult == true && activeMaskStackC[2] == true; +} +else { +activeMaskStack[2] = false; +activeMaskStackC[3] = false; +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.z = int(-1) + R4i.w; +// 1 +PV1i.y = PV0i.z << 0x00000002; +PS1i = floatBitsToInt(float(PV0i.z)); +// 2 +R0i.x = PV1i.y + 0x0000002a; +R0i.y = PV1i.y + 0x0000002d; +R0i.z = PV1i.y + 0x0000002c; +R0i.w = PV1i.y + 0x0000002b; +R5i.z = floatBitsToInt(roundEven(intBitsToFloat(PS1i))); +PS0i = R5i.z; +} +if( activeMaskStackC[3] == true ) { +R2i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +R3i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +R4i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R2i.x))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R3i.x))); +// 1 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R3i.y)) + intBitsToFloat(PV0i.y))); +PV1i.x = R123i.x; +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R4i.x))); +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R0i.x))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R2i.y)) + intBitsToFloat(PV0i.x))); +PV1i.w = R123i.w; +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(PV1i.z))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R3i.z)) + intBitsToFloat(PV1i.x))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R2i.z)) + intBitsToFloat(PV1i.w))); +PV0i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(R4i.y)) + intBitsToFloat(PV1i.y))); +PV0i.w = R123i.w; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R0i.z)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +R127i.y = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV0i.y)); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),intBitsToFloat(R4i.z)) + intBitsToFloat(PV0i.w))); +PV1i.z = R123i.z; +PV1i.w = floatBitsToInt(intBitsToFloat(R2i.w) + intBitsToFloat(PV0i.z)); +// 4 +PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.x)); +PV0i.y = floatBitsToInt(intBitsToFloat(R4i.w) + intBitsToFloat(PV1i.z)); +PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.w)); +// 5 +R5i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(PS0i))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PS0i))); +R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PS0i))); +PS1i = R5i.y; +// 6 +R5i.w = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(0xbb03126f)); +R5i.w = clampFI32(R5i.w); +} +if( activeMaskStackC[3] == true ) { +R5i.x = floatBitsToInt(textureShadow_2(textureUnitPS7, vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(R5i.z),intBitsToFloat(R5i.w)))); +} +if( activeMaskStackC[3] == true ) { +// 0 +backupReg0i = R6i.y; +R6i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R5i.x))); +} +activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true; +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = floatBitsToInt(-(intBitsToFloat(R6i.y)) + 1.0); +// 1 +R5i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(R11i.z)) + intBitsToFloat(R6i.y))); +} +activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; +if( activeMaskStackC[1] == true ) { +// 0 +R0i.x = floatBitsToInt(intBitsToFloat(R9i.x) * intBitsToFloat(0x3a83126f)); +R0i.y = floatBitsToInt(intBitsToFloat(R9i.z) * intBitsToFloat(0x3a83126f)); +R127i.z = floatBitsToInt(intBitsToFloat(R12i.w) + -(intBitsToFloat(R9i.y))); +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.z)),uf_blockPS6[26].x) + -(uf_blockPS6[26].y))); +R123i.w = clampFI32(R123i.w); +PV0i.w = R123i.w; +R1i.x = floatBitsToInt((intBitsToFloat(R9i.x) * intBitsToFloat(0x38d1b717) + 0.5)); +PS0i = R1i.x; +// 1 +PV1i.x = floatBitsToInt(-(intBitsToFloat(PV0i.w)) + 1.0); +R1i.y = floatBitsToInt((intBitsToFloat(R9i.z) * intBitsToFloat(0x3903126f) + 0.5)); +R126i.z = floatBitsToInt(-(uf_blockPS6[27].w) + 1.0); +R2i.w = 0x3f800000; +R3i.w = floatBitsToInt(-(intBitsToFloat(R1i.z)) * intBitsToFloat(0x3ba3d70a)); +PS1i = R3i.w; +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(PV1i.x)) + intBitsToFloat(R9i.y))); +PV0i.x = R123i.x; +PV0i.y = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(0xbe99999a)); +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.z)),uf_blockPS6[28].x) + -(uf_blockPS6[28].y))); +R123i.z = clampFI32(R123i.z); +PV0i.z = R123i.z; +R0i.w = floatBitsToInt((intBitsToFloat(0xbf59999a) * intBitsToFloat(R13i.y) + 1.0)); +tempResultf = log2(intBitsToFloat(PV1i.x)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS0i = floatBitsToInt(tempResultf); +// 3 +R127i.x = floatBitsToInt(-(intBitsToFloat(PV0i.z)) + 1.0); +PV1i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[27].y, intBitsToFloat(PS0i))); +PV1i.z = floatBitsToInt(max(-(intBitsToFloat(PV0i.x)), intBitsToFloat(0xbf7d70a4))); +PV1i.z = floatBitsToInt(intBitsToFloat(PV1i.z) / 2.0); +R126i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[27].x, intBitsToFloat(PS0i))); +R127i.y = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x40200001)); +R127i.y = clampFI32(R127i.y); +PS1i = R127i.y; +// 4 +PV0i.x = floatBitsToInt(intBitsToFloat(PS1i) * intBitsToFloat(0x3dcccccd)); +R123i.y = floatBitsToInt((-(intBitsToFloat(R1i.z)) * intBitsToFloat(0x3ba3d70a) + intBitsToFloat(0xbfe66666))); +PV0i.y = R123i.y; +R0i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.z)),uf_blockPS6[18].x) + uf_blockPS6[17].w)); +R0i.z = clampFI32(R0i.z); +R127i.w = floatBitsToInt(intBitsToFloat(PV1i.z) + 0.5); +PV0i.w = R127i.w; +PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.y))); +// 5 +PV1i.x = floatBitsToInt(-(intBitsToFloat(PV0i.w)) + 1.0); +R123i.y = floatBitsToInt((intBitsToFloat(PV0i.w) * intBitsToFloat(0xbc996e30) + intBitsToFloat(0x3d981626))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.z),intBitsToFloat(PS0i)) + uf_blockPS6[27].w)/2.0); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(PV0i.y)) + intBitsToFloat(PV0i.y))); +R123i.w = clampFI32(R123i.w); +PV1i.w = R123i.w; +tempResultf = log2(intBitsToFloat(R127i.x)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS1i = floatBitsToInt(tempResultf); +// 6 +R127i.x = floatBitsToInt((intBitsToFloat(R127i.y) * intBitsToFloat(0x3dcccccd) + intBitsToFloat(PV1i.w))); +PV0i.x = R127i.x; +R2i.y = floatBitsToInt(intBitsToFloat(PV1i.z) + 0.5); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(PV1i.y)) + intBitsToFloat(0xbe593484))); +PV0i.z = R123i.z; +R125i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[29].x, intBitsToFloat(PS1i))); +PS0i = floatBitsToInt(sqrt(intBitsToFloat(PV1i.x))); +// 7 +PV1i.x = floatBitsToInt(intBitsToFloat(PS0i) * intBitsToFloat(0x3f22f983)); +R127i.y = floatBitsToInt(-(intBitsToFloat(PV0i.x)) + 1.0); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R18i.z), intBitsToFloat(R10i.z))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(PV0i.z)) + intBitsToFloat(0x3fc90da4))); +PV1i.w = R123i.w; +R125i.z = floatBitsToInt(exp2(intBitsToFloat(R126i.w))); +PS1i = R125i.z; +// 8 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R9i.x),intBitsToFloat(R12i.y),intBitsToFloat(R9i.z),intBitsToFloat(R2i.w)),vec4(uf_blockPS1[37].x,uf_blockPS1[37].y,uf_blockPS1[37].z,uf_blockPS1[37].w))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R2i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),-(intBitsToFloat(PV1i.w))) + 1.0)); +PS0i = R2i.x; +// 9 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R9i.x),intBitsToFloat(R12i.y),intBitsToFloat(R9i.z),intBitsToFloat(R2i.w)),vec4(uf_blockPS1[35].x,uf_blockPS1[35].y,uf_blockPS1[35].z,uf_blockPS1[35].w))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R126i.z = floatBitsToInt(1.0 / intBitsToFloat(PV0i.x)); +PS1i = R126i.z; +// 10 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R9i.x),intBitsToFloat(R12i.y),intBitsToFloat(R9i.z),intBitsToFloat(R2i.w)),vec4(uf_blockPS1[36].x,uf_blockPS1[36].y,uf_blockPS1[36].z,uf_blockPS1[36].w))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R3i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PS1i))); +PS0i = R3i.x; +// 11 +R4i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.y),intBitsToFloat(R11i.y)) + intBitsToFloat(R127i.z))); +R3i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R126i.z))); +R1i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS6[27].z,-(intBitsToFloat(R125i.z))) + uf_blockPS6[27].z)); +R1i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(R9i.w)) + intBitsToFloat(R127i.x))); +R3i.z = floatBitsToInt(exp2(intBitsToFloat(R125i.w))); +PS1i = R3i.z; +} +if( activeMaskStackC[1] == true ) { +R0i.x = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x); +R5i.xyz = floatBitsToInt(textureLod(textureUnitPS15, intBitsToFloat(R1i.xy),0.0).xyz); +R2i.xyz = floatBitsToInt(texture(textureUnitPS10, intBitsToFloat(R2i.xy)).xyz); +R3i.w = floatBitsToInt(textureLod(textureUnitPS4, intBitsToFloat(R3i.xy),intBitsToFloat(R3i.w)).x); +} +if( activeMaskStackC[1] == true ) { +// 0 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.x),intBitsToFloat(R11i.x)) + intBitsToFloat(R4i.x))); +R123i.x = clampFI32(R123i.x); +PV0i.x = R123i.x; +R3i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(R1i.w))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R0i.w))); +PV0i.z = R126i.z; +R2i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(R1i.w))); +tempResultf = log2(intBitsToFloat(R0i.z)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS0i = floatBitsToInt(tempResultf); +// 1 +backupReg0i = R0i.x; +PV1i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[18].y, intBitsToFloat(PS0i))); +R127i.y = floatBitsToInt(-(intBitsToFloat(PV0i.z)) + 1.0); +R0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(R1i.w))); +R123i.w = floatBitsToInt((intBitsToFloat(backupReg0i) * 2.0 + -(1.0))); +PV1i.w = R123i.w; +tempResultf = log2(intBitsToFloat(PV0i.x)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS1i = floatBitsToInt(tempResultf); +// 2 +R127i.x = floatBitsToInt(intBitsToFloat(R3i.w) + uf_blockPS10[1].z); +R127i.x = clampFI32(R127i.x); +R6i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R11i.w),intBitsToFloat(R17i.z)) + intBitsToFloat(R10i.w))); +R6i.y = clampFI32(R6i.y); +R2i.z = floatBitsToInt((intBitsToFloat(PV1i.w) * intBitsToFloat(0x41c80000) + intBitsToFloat(R15i.z))); +PV0i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[29].z, intBitsToFloat(PS1i))); +R125i.w = floatBitsToInt(exp2(intBitsToFloat(PV1i.x))); +PS0i = R125i.w; +// 3 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(R5i.z),-0.0),vec4(uf_blockPS6[42].x,uf_blockPS6[42].y,uf_blockPS6[42].z,0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +PS1i = floatBitsToInt(exp2(intBitsToFloat(PV0i.w))); +// 4 +R123i.y = floatBitsToInt((mul_nonIEEE(-(uf_blockPS6[29].w),intBitsToFloat(PS1i)) + 1.0)); +PV0i.y = R123i.y; +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.w), uf_blockPS6[16].w)); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PV1i.x))); +R6i.w = 0; +PS0i = R6i.w; +// 5 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R3i.z)),intBitsToFloat(PV0i.y)) + intBitsToFloat(PV0i.y))); +PV1i.x = R123i.x; +R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R13i.y), intBitsToFloat(PV0i.z))); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(PV0i.w))); +PV1i.z = R127i.z; +R4i.w = 0x3f800000; +// 6 +PV0i.x = floatBitsToInt(intBitsToFloat(R5i.w) + -(intBitsToFloat(PV1i.z))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), uf_blockPS6[30].w)); +// 7 +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(R16i.z)) + intBitsToFloat(R127i.z))); +PV1i.y = R123i.y; +R1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R0i.w))); +PV1i.w = R1i.w; +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS10[3].z,intBitsToFloat(PV1i.y)) + uf_blockPS10[1].y)); +R123i.x = clampFI32(R123i.x); +PV0i.x = R123i.x; +R2i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.z),-(intBitsToFloat(PV1i.w))) + intBitsToFloat(R126i.z))); +R3i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.w)),intBitsToFloat(R127i.y)) + intBitsToFloat(R127i.y))); +// 9 +R6i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.x), intBitsToFloat(PV0i.x))); +} +if( activeMaskStackC[1] == true ) { +// 0 +PV0i.y = floatBitsToInt(-(intBitsToFloat(R2i.z)) + uf_blockPS6[52].x); +// 1 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),uf_blockPS6[15].x) + uf_blockPS6[14].w)); +R123i.x = clampFI32(R123i.x); +PV1i.x = R123i.x; +// 2 +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), uf_blockPS6[13].w)); +// 3 +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(R0i.w))); +// 4 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(R3i.w))); +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.y)),intBitsToFloat(R3i.w)) + intBitsToFloat(R3i.w))); +PV0i.z = R123i.z; +// 5 +PV1i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].z, intBitsToFloat(PV0i.x))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.y), intBitsToFloat(PV0i.z))); +PV1i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].y, intBitsToFloat(PV0i.x))); +PV1i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].x, intBitsToFloat(PV0i.x))); +R6i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R5i.y)),intBitsToFloat(PV0i.z)) + intBitsToFloat(PV0i.z))); +PS1i = R6i.z; +// 6 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].x,intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.w))); +PV0i.x = R123i.x; +R123i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].z,intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.x))); +PV0i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].y,intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.z))); +PV0i.w = R123i.w; +// 7 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R2i.y)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.w),intBitsToFloat(R2i.y)) + intBitsToFloat(PV0i.z))); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R3i.y),intBitsToFloat(R2i.y)) + intBitsToFloat(PV0i.w))); +PV1i.w = R123i.w; +// 8 +R4i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].x,intBitsToFloat(R1i.w)) + intBitsToFloat(PV1i.x))); +PV0i.x = R4i.x; +R4i.y = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].y,intBitsToFloat(R1i.w)) + intBitsToFloat(PV1i.w))); +PV0i.y = R4i.y; +R4i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].z,intBitsToFloat(R1i.w)) + intBitsToFloat(PV1i.z))); +PV0i.z = R4i.z; +// 9 +R1i.xyz = ivec3(PV0i.x,PV0i.y,PV0i.z); +R1i.w = R4i.w; +// 10 +R0i.xyz = ivec3(R6i.x,R6i.y,R6i.z); +R0i.w = R6i.w; +} +// export +passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w)); +passPixelColor1 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w)); +} diff --git a/Workarounds/BreathOfTheWild_!Intel_Shadows/808ba0411f6f526e_0000007ff9249a49_ps.txt b/Workarounds/BreathOfTheWild_!Intel_Shadows/808ba0411f6f526e_0000007ff9249a49_ps.txt new file mode 100644 index 00000000..09e04fe4 --- /dev/null +++ b/Workarounds/BreathOfTheWild_!Intel_Shadows/808ba0411f6f526e_0000007ff9249a49_ps.txt @@ -0,0 +1,723 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + +// shader a73d770e3204e2e6 +UNIFORM_BUFFER_LAYOUT(33, 1, 10) uniform uniformBlockPS1 +{ +vec4 uf_blockPS1[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(38, 1, 11) uniform uniformBlockPS6 +{ +vec4 uf_blockPS6[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(42, 1, 12) uniform uniformBlockPS10 +{ +vec4 uf_blockPS10[1024]; +}; + +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2DArray textureUnitPS6; +TEXTURE_LAYOUT(9, 1, 6) uniform sampler2D textureUnitPS9; +TEXTURE_LAYOUT(12, 1, 7) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(13, 1, 8) uniform sampler2D textureUnitPS13; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 1) in vec4 passParameterSem2; +layout(location = 2) in vec4 passParameterSem5; +layout(location = 3) in vec4 passParameterSem6; +layout(location = 0) out vec4 passPixelColor0; +layout(location = 1) out vec4 passPixelColor1; +layout(location = 2) out vec4 passPixelColor2; +#ifdef VULKAN +layout(set = 1, binding = 9) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else +uniform vec2 uf_fragCoordScale; +#endif +int clampFI32(int v) +{ +if( v == 0x7FFFFFFF ) + return floatBitsToInt(1.0); +else if( v == 0xFFFFFFFF ) + return floatBitsToInt(0.0); +return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); +} +float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } +float textureShadow_1(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +void main() +{ +ivec4 R0i = ivec4(0); +ivec4 R1i = ivec4(0); +ivec4 R2i = ivec4(0); +ivec4 R3i = ivec4(0); +ivec4 R4i = ivec4(0); +ivec4 R5i = ivec4(0); +ivec4 R6i = ivec4(0); +ivec4 R7i = ivec4(0); +ivec4 R8i = ivec4(0); +ivec4 R9i = ivec4(0); +ivec4 R10i = ivec4(0); +ivec4 R11i = ivec4(0); +ivec4 R12i = ivec4(0); +ivec4 R122i = ivec4(0); +ivec4 R123i = ivec4(0); +ivec4 R124i = ivec4(0); +ivec4 R125i = ivec4(0); +ivec4 R126i = ivec4(0); +ivec4 R127i = ivec4(0); +int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i; +ivec4 PV0i = ivec4(0), PV1i = ivec4(0); +int PS0i = 0, PS1i = 0; +ivec4 tempi = ivec4(0); +float tempResultf; +int tempResulti; +ivec4 ARi = ivec4(0); +bool predResult = true; +bool activeMaskStack[2]; +bool activeMaskStackC[3]; +activeMaskStack[0] = false; +activeMaskStackC[0] = false; +activeMaskStackC[1] = false; +activeMaskStack[0] = true; +activeMaskStackC[0] = true; +activeMaskStackC[1] = true; +vec3 cubeMapSTM; +int cubeMapFaceId; +R0i = floatBitsToInt(passParameterSem0); +R1i = floatBitsToInt(passParameterSem2); +R2i = floatBitsToInt(passParameterSem5); +R3i = floatBitsToInt(passParameterSem6); +if( activeMaskStackC[1] == true ) { +R4i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R5i.x = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R5i.z = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.zw)).x); +R5i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R6i.xyzw = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R3i.zw)).xyzw); +R3i.z = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R3i.zw)).w); +R7i.xy = floatBitsToInt(texture(textureUnitPS12, intBitsToFloat(R0i.xy)).xy); +} +if( activeMaskStackC[1] == true ) { +// 0 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.w)) + uf_blockPS1[14].x)); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R4i.w),uf_blockPS1[16].x) + uf_blockPS1[14].x)); +PV0i.y = R123i.y; +R127i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.x)) + uf_blockPS1[14].x)); +R127i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R5i.z)) + uf_blockPS1[14].x)); +R5i.x = floatBitsToInt((intBitsToFloat(R6i.x) * 2.0 + -(1.0))); +PS0i = R5i.x; +// 1 +R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), -(intBitsToFloat(PV0i.y)))); +PV1i.x = R1i.x; +R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), -(intBitsToFloat(PV0i.y)))); +PV1i.y = R1i.y; +R8i.z = floatBitsToInt(-(intBitsToFloat(PV0i.x))); +PV1i.z = R8i.z; +R124i.w = floatBitsToInt((intBitsToFloat(R6i.y) * 2.0 + -(1.0))); +R124i.z = floatBitsToInt((intBitsToFloat(R6i.z) * 2.0 + -(1.0))); +PS1i = R124i.z; +// 2 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), -(intBitsToFloat(R127i.w)))); +PS0i = R127i.y; +// 3 +R127i.x = floatBitsToInt(-(intBitsToFloat(R127i.w))); +R126i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.w), -(intBitsToFloat(R127i.z)))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), -(intBitsToFloat(R127i.z)))); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), -(intBitsToFloat(R127i.w)))); +PS1i = floatBitsToInt(sqrt(intBitsToFloat(PV0i.x))); +// 4 +backupReg0i = R127i.z; +R125i.x = floatBitsToInt(intBitsToFloat(R3i.z) * intBitsToFloat(0x437f0000)); +R125i.y = floatBitsToInt(-(intBitsToFloat(R1i.x)) + intBitsToFloat(R127i.y)); +R127i.z = floatBitsToInt(-(intBitsToFloat(R1i.y)) + intBitsToFloat(PV1i.w)); +R127i.w = floatBitsToInt(-(intBitsToFloat(backupReg0i))); +R126i.w = floatBitsToInt(1.0 / intBitsToFloat(PS1i)); +PS0i = R126i.w; +// 5 +R124i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R5i.x),intBitsToFloat(R124i.w),intBitsToFloat(R124i.z),-0.0),vec4(intBitsToFloat(R5i.x),intBitsToFloat(R124i.w),intBitsToFloat(R124i.z),0.0))); +PV1i.x = R124i.x; +PV1i.y = R124i.x; +PV1i.z = R124i.x; +PV1i.w = R124i.x; +R127i.y = floatBitsToInt(-(intBitsToFloat(R8i.z)) + intBitsToFloat(R127i.x)); +PS1i = R127i.y; +// 6 +backupReg0i = R126i.z; +R127i.x = floatBitsToInt(-(intBitsToFloat(R1i.y)) + intBitsToFloat(R126i.y)); +PV0i.x = R127i.x; +R8i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.y), intBitsToFloat(R126i.w))); +PV0i.y = R8i.y; +R126i.z = floatBitsToInt(-(intBitsToFloat(R8i.z)) + intBitsToFloat(R127i.w)); +PV0i.z = R126i.z; +R125i.w = floatBitsToInt(-(intBitsToFloat(R1i.x)) + intBitsToFloat(backupReg0i)); +PV0i.w = R125i.w; +R8i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(R126i.w))); +PS0i = R8i.x; +// 7 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PV0i.z))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), uf_blockPS6[44].x)); +R125i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.y), intBitsToFloat(PV0i.x))); +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PV0i.w))); +R2i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.y)),intBitsToFloat(PV0i.y)) + 1.0)); +PS1i = R2i.w; +// 8 +backupReg0i = R127i.x; +R127i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),uf_blockPS6[44].y) + intBitsToFloat(PV1i.y))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), uf_blockPS6[43].x)); +R9i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R8i.z), intBitsToFloat(R126i.w))); +R126i.w = floatBitsToInt(-(intBitsToFloat(R8i.z)) * intBitsToFloat(0x3d4ccccd)); +R0i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R127i.y)) + intBitsToFloat(PV1i.x))); +PS0i = R0i.x; +// 9 +R126i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),uf_blockPS6[43].y) + intBitsToFloat(PV0i.y))); +R0i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.z)),intBitsToFloat(R125i.y)) + intBitsToFloat(R127i.w))); +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), uf_blockPS6[45].x)); +R5i.w = 0x3f800000; +R0i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R125i.w)),intBitsToFloat(R127i.z)) + intBitsToFloat(R125i.z))); +PS1i = R0i.z; +// 10 +backupReg0i = R127i.x; +R127i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),uf_blockPS6[45].y) + intBitsToFloat(PV1i.z))); +PV0i.y = floatBitsToInt(mul_nonIEEE(-(intBitsToFloat(PS1i)), -(intBitsToFloat(PS1i)))); +R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.z),uf_blockPS6[44].z) + intBitsToFloat(backupReg0i))); +R9i.x = 0; +PS0i = R9i.x; +// 11 +backupReg0i = R0i.x; +backupReg0i = R0i.x; +backupReg1i = R0i.y; +backupReg1i = R0i.y; +tempi.x = floatBitsToInt(dot(vec4(-(intBitsToFloat(backupReg0i)),-(intBitsToFloat(backupReg1i)),intBitsToFloat(PV0i.y),-0.0),vec4(-(intBitsToFloat(backupReg0i)),-(intBitsToFloat(backupReg1i)),1.0,0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R0i.w = tempi.x; +R125i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.z),uf_blockPS6[43].z) + intBitsToFloat(R126i.x))); +PS1i = R125i.w; +// 12 +R125i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.z),uf_blockPS6[45].z) + intBitsToFloat(R127i.x))); +R10i.z = floatBitsToInt(uf_blockPS6[44].w + intBitsToFloat(R127i.w)); +R9i.w = R7i.x; +R9i.w = clampFI32(R9i.w); +PS0i = int(intBitsToFloat(R125i.x)); +// 13 +backupReg0i = R126i.w; +R10i.x = floatBitsToInt(uf_blockPS1[0].y); +R2i.y = floatBitsToInt((-(uf_blockPS6[53].w) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(R126i.w))); +R2i.y = clampFI32(R2i.y); +R127i.z = PS0i & 0x0000001c; +R126i.w = PS0i & 0x00000002; +R7i.w = floatBitsToInt((-(uf_blockPS6[53].z) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(backupReg0i))); +R7i.w = clampFI32(R7i.w); +PS1i = R7i.w; +// 14 +R9i.y = floatBitsToInt(uf_blockPS1[1].y); +R11i.z = floatBitsToInt(uf_blockPS1[2].y); +PS0i = floatBitsToInt(sqrt(intBitsToFloat(R124i.x))); +// 15 +R11i.x = floatBitsToInt(uf_blockPS6[43].w + intBitsToFloat(R125i.w)); +R10i.y = R10i.z; +R12i.z = floatBitsToInt(uf_blockPS6[45].w + intBitsToFloat(R125i.y)); +PS1i = floatBitsToInt(1.0 / intBitsToFloat(PS0i)); +// 16 +R2i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(PS1i))); +R3i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.w), intBitsToFloat(PS1i))); +R2i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.z), intBitsToFloat(PS1i))); +tempResultf = 1.0 / sqrt(intBitsToFloat(R2i.w)); +R3i.z = floatBitsToInt(tempResultf); +PS0i = R3i.z; +// 17 +PS1i = floatBitsToInt(float(R127i.z)); +// 18 +PV0i.x = floatBitsToInt(intBitsToFloat(PS1i) * intBitsToFloat(0x3d124925)); +PS0i = floatBitsToInt(float(R126i.w)); +PS0i = floatBitsToInt(intBitsToFloat(PS0i) / 2.0); +// 19 +R5i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),-(intBitsToFloat(PS0i))) + intBitsToFloat(PV0i.x))); +tempResultf = 1.0 / sqrt(intBitsToFloat(R0i.w)); +R4i.z = floatBitsToInt(tempResultf); +PS1i = R4i.z; +} +if( activeMaskStackC[1] == true ) { +activeMaskStack[1] = activeMaskStack[0]; +activeMaskStackC[2] = activeMaskStackC[1]; +// 0 +R12i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].x, uf_blockPS10[2].w)); +PV0i.x = R12i.x; +R11i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].y, uf_blockPS10[2].w)); +PV0i.y = R11i.y; +R127i.z = floatBitsToInt(uf_blockPS10[2].z + 1.0); +// 1 +R124i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.y)),intBitsToFloat(PV0i.y)) + 1.0)); +R1i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].z, uf_blockPS10[2].w)); +PV1i.z = R1i.z; +R0i.w = 0; +PV1i.w = R0i.w; +R3i.x = PV0i.x; +PS1i = R3i.x; +// 2 +backupReg0i = R2i.y; +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R9i.z), intBitsToFloat(PV1i.z))); +R2i.y = PV1i.z; +PV0i.y = R2i.y; +R6i.z = 0; +PV0i.z = R6i.z; +R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), -(intBitsToFloat(PV1i.w)))); +R7i.z = floatBitsToInt(-(intBitsToFloat(backupReg0i)) + intBitsToFloat(R127i.z)); +R7i.z = clampFI32(R7i.z); +PS0i = R7i.z; +// 3 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R8i.x),intBitsToFloat(R9i.z),intBitsToFloat(R9i.z),-0.0),vec4(intBitsToFloat(R3i.x),intBitsToFloat(PV0i.y),intBitsToFloat(PV0i.z),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R124i.w = tempi.x; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.y),intBitsToFloat(R11i.y)) + intBitsToFloat(PV0i.x))); +PS1i = R122i.x; +// 4 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R3i.y),intBitsToFloat(R2i.z),intBitsToFloat(R126i.w)),vec4(-(intBitsToFloat(R12i.x)),-(intBitsToFloat(R11i.y)),-(intBitsToFloat(R1i.z)),1.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R0i.w = tempi.x; +R8i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.x),intBitsToFloat(R12i.x)) + intBitsToFloat(PS1i))); +PS0i = R8i.w; +// 5 +tempResultf = 1.0 / sqrt(intBitsToFloat(R124i.x)); +PS1i = floatBitsToInt(tempResultf); +// 6 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS1i), intBitsToFloat(R3i.z))); +// 7 +R7i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R124i.w))); +// 8 +predResult = (1.0 > intBitsToFloat(R7i.w)); +activeMaskStack[1] = predResult; +activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true; +} +else { +activeMaskStack[1] = false; +activeMaskStackC[2] = false; +} +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = ((-(intBitsToFloat(R8i.z)) > uf_blockPS1[58].x)?int(0xFFFFFFFF):int(0x0)); +PV0i.y = floatBitsToInt(intBitsToFloat(R2i.x) * 1.5); +R127i.z = ((-(intBitsToFloat(R8i.z)) > uf_blockPS1[58].y)?int(0xFFFFFFFF):int(0x0)); +PV0i.w = floatBitsToInt(intBitsToFloat(R3i.y) * 1.5); +PS0i = floatBitsToInt(intBitsToFloat(R2i.z) * 1.5); +// 1 +backupReg0i = R0i.w; +R2i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.x)),intBitsToFloat(R4i.z)) + intBitsToFloat(PV0i.y))); +R2i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.y)),intBitsToFloat(R4i.z)) + intBitsToFloat(PV0i.w))); +R2i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R0i.z)),intBitsToFloat(R4i.z)) + intBitsToFloat(PS0i))); +PV1i.z = R2i.z; +PV1i.w = PV0i.x & int(1); +PS1i = ((intBitsToFloat(0x3eb33333) > intBitsToFloat(backupReg0i))?int(0xFFFFFFFF):int(0x0)); +// 2 +R3i.x = floatBitsToInt((intBitsToFloat(R5i.z) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(0x3ac49ba6))); +R3i.y = PV1i.w - R127i.z; +PV0i.y = R3i.y; +R3i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R8i.z)),uf_blockPS1[17].y) + 1.0)); +R3i.w = ((PS1i == 0)?(0x3f800000):(0)); +PS0i = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(PV1i.z))); +// 3 +PV1i.x = PV0i.y << 0x00000002; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.y),intBitsToFloat(R2i.y)) + intBitsToFloat(PS0i))); +PS1i = R122i.x; +// 4 +R0i.x = PV1i.x + 0x0000002d; +R0i.y = PV1i.x + 0x0000002b; +R0i.z = PV1i.x + 0x0000002c; +R0i.w = PV1i.x + 0x0000002a; +R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.x),intBitsToFloat(R2i.x)) + intBitsToFloat(PS1i))); +PS0i = R122i.x; +// 5 +tempResultf = 1.0 / sqrt(intBitsToFloat(PS0i)); +R2i.w = floatBitsToInt(tempResultf); +PS1i = R2i.w; +} +if( activeMaskStackC[2] == true ) { +R4i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +R5i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +R6i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +} +if( activeMaskStackC[2] == true ) { +// 0 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(R2i.w))); +PV0i.x = R127i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(R2i.w))); +PV0i.y = R127i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(R2i.w))); +PV0i.z = R127i.z; +PS0i = floatBitsToInt(float(R3i.y)); +// 1 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R12i.x),intBitsToFloat(R11i.y),intBitsToFloat(R1i.z),-0.0),vec4(intBitsToFloat(PV0i.x),intBitsToFloat(PV0i.y),intBitsToFloat(PV0i.z),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R2i.z = floatBitsToInt(roundEven(intBitsToFloat(PS0i))); +PS1i = R2i.z; +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.x)),intBitsToFloat(PV1i.x)) + 1.0)); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R11i.y)),intBitsToFloat(PV1i.x)) + intBitsToFloat(R127i.y))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.z)),intBitsToFloat(PV1i.x)) + intBitsToFloat(R127i.z))); +PV0i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R12i.x)),intBitsToFloat(PV1i.x)) + intBitsToFloat(R127i.x))); +PV0i.w = R123i.w; +// 3 +R127i.x = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x3b449ba7)); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R3i.w))); +R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(0x3b449ba7)); +R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * intBitsToFloat(0x3b449ba7)); +// 4 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(R3i.z))); +// 5 +backupReg0i = R127i.z; +backupReg1i = R127i.w; +R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PV0i.x)) + intBitsToFloat(R1i.y))); +R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(PV0i.x)) + intBitsToFloat(R8i.z))); +R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg1i),intBitsToFloat(PV0i.x)) + intBitsToFloat(R1i.x))); +PV1i.w = R127i.w; +// 6 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(R5i.x))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(R6i.x))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(R4i.x))); +// 7 +backupReg0i = R127i.w; +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.y),intBitsToFloat(R5i.y)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.y),intBitsToFloat(R4i.y)) + intBitsToFloat(PV0i.w))); +PV1i.y = R123i.y; +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R0i.x))); +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R5i.z)) + intBitsToFloat(PV1i.x))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.y),intBitsToFloat(R6i.y)) + intBitsToFloat(R127i.y))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R4i.z)) + intBitsToFloat(PV1i.y))); +PV0i.z = R123i.z; +// 9 +PV1i.x = floatBitsToInt(intBitsToFloat(R4i.w) + intBitsToFloat(PV0i.z)); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(R127i.w))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R6i.z)) + intBitsToFloat(PV0i.y))); +PV1i.z = R123i.z; +R127i.w = floatBitsToInt(intBitsToFloat(R5i.w) + intBitsToFloat(PV0i.x)); +// 10 +PV0i.x = floatBitsToInt(intBitsToFloat(R6i.w) + intBitsToFloat(PV1i.z)); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R0i.z)) + intBitsToFloat(PV1i.y))); +PV0i.z = R123i.z; +R126i.w = floatBitsToInt(1.0 / intBitsToFloat(PV1i.x)); +PS0i = R126i.w; +// 11 +PV1i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV0i.z)); +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PS0i))); +R2i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PS0i))); +PS1i = R2i.x; +// 12 +R2i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(R126i.w))); +R2i.w = floatBitsToInt(-(intBitsToFloat(R3i.x)) + intBitsToFloat(PV1i.z)); +R2i.w = clampFI32(R2i.w); +} +if( activeMaskStackC[2] == true ) { +R2i.y = floatBitsToInt(textureShadow_1(textureUnitPS6, vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.y),intBitsToFloat(R2i.z),intBitsToFloat(R2i.w)))); +} +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = floatBitsToInt(-(intBitsToFloat(R2i.y)) + 1.0); +// 1 +R5i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(R7i.w)) + intBitsToFloat(R2i.y))); +} +activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; +if( activeMaskStackC[1] == true ) { +// 0 +R0i.x = floatBitsToInt(intBitsToFloat(R11i.x) * intBitsToFloat(0x3a83126f)); +R0i.y = floatBitsToInt(intBitsToFloat(R12i.z) * intBitsToFloat(0x3a83126f)); +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R8i.z)),uf_blockPS6[26].x) + -(uf_blockPS6[26].y))); +R123i.z = clampFI32(R123i.z); +PV0i.z = R123i.z; +R127i.w = floatBitsToInt(intBitsToFloat(R8i.w) + -(intBitsToFloat(R7i.x))); +R1i.x = floatBitsToInt((intBitsToFloat(R11i.x) * intBitsToFloat(0x38d1b717) + 0.5)); +PS0i = R1i.x; +// 1 +R127i.x = floatBitsToInt(-(uf_blockPS6[27].w) + 1.0); +PV1i.y = floatBitsToInt(-(intBitsToFloat(PV0i.z)) + 1.0); +R1i.z = floatBitsToInt((intBitsToFloat(R12i.z) * intBitsToFloat(0x3903126f) + 0.5)); +R0i.w = 0x3f800000; +R3i.w = floatBitsToInt(-(intBitsToFloat(R8i.z)) * intBitsToFloat(0x3ba3d70a)); +PS1i = R3i.w; +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R8i.z)),uf_blockPS6[28].x) + -(uf_blockPS6[28].y))); +R123i.x = clampFI32(R123i.x); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(PV1i.y)) + intBitsToFloat(R7i.x))); +PV0i.y = R123i.y; +PV0i.z = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(0xbe99999a)); +R4i.w = floatBitsToInt((intBitsToFloat(0xbf59999a) * intBitsToFloat(R7i.y) + 1.0)); +tempResultf = log2(intBitsToFloat(PV1i.y)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS0i = floatBitsToInt(tempResultf); +// 3 +PV1i.x = floatBitsToInt(max(-(intBitsToFloat(PV0i.y)), intBitsToFloat(0xbf7d70a4))); +PV1i.x = floatBitsToInt(intBitsToFloat(PV1i.x) / 2.0); +R127i.y = floatBitsToInt(-(intBitsToFloat(PV0i.x)) + 1.0); +R126i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[27].x, intBitsToFloat(PS0i))); +PV1i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[27].y, intBitsToFloat(PS0i))); +R127i.w = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(0x40200001)); +R127i.w = clampFI32(R127i.w); +PS1i = R127i.w; +// 4 +R5i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R8i.z)),uf_blockPS6[18].x) + uf_blockPS6[17].w)); +R5i.x = clampFI32(R5i.x); +PV0i.y = floatBitsToInt(intBitsToFloat(PS1i) * intBitsToFloat(0x3dcccccd)); +R127i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + 0.5); +PV0i.z = R127i.z; +R123i.w = floatBitsToInt((-(intBitsToFloat(R8i.z)) * intBitsToFloat(0x3ba3d70a) + intBitsToFloat(0xbfe66666))); +PV0i.w = R123i.w; +PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.w))); +// 5 +PV1i.x = floatBitsToInt(-(intBitsToFloat(PV0i.z)) + 1.0); +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.y)),intBitsToFloat(PV0i.w)) + intBitsToFloat(PV0i.w))); +R123i.y = clampFI32(R123i.y); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((intBitsToFloat(PV0i.z) * intBitsToFloat(0xbc996e30) + intBitsToFloat(0x3d981626))); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PS0i)) + uf_blockPS6[27].w)/2.0); +PV1i.w = R123i.w; +tempResultf = log2(intBitsToFloat(R127i.y)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS1i = floatBitsToInt(tempResultf); +// 6 +R127i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[29].x, intBitsToFloat(PS1i))); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(PV1i.z)) + intBitsToFloat(0xbe593484))); +PV0i.y = R123i.y; +R2i.z = floatBitsToInt(intBitsToFloat(PV1i.w) + 0.5); +R2i.w = floatBitsToInt((intBitsToFloat(R127i.w) * intBitsToFloat(0x3dcccccd) + intBitsToFloat(PV1i.y))); +PV0i.w = R2i.w; +PS0i = floatBitsToInt(sqrt(intBitsToFloat(PV1i.x))); +// 7 +PV1i.x = floatBitsToInt(intBitsToFloat(PS0i) * intBitsToFloat(0x3f22f983)); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R9i.y), intBitsToFloat(R8i.y))); +R0i.z = floatBitsToInt(-(intBitsToFloat(PV0i.w)) + 1.0); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(PV0i.y)) + intBitsToFloat(0x3fc90da4))); +PV1i.w = R123i.w; +R126i.x = floatBitsToInt(exp2(intBitsToFloat(R126i.z))); +PS1i = R126i.x; +// 8 +backupReg0i = R0i.w; +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R11i.x),intBitsToFloat(R10i.y),intBitsToFloat(R12i.z),intBitsToFloat(backupReg0i)),vec4(uf_blockPS1[37].x,uf_blockPS1[37].y,uf_blockPS1[37].z,uf_blockPS1[37].w))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R2i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),-(intBitsToFloat(PV1i.w))) + 1.0)); +PS0i = R2i.x; +// 9 +backupReg0i = R0i.w; +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R11i.x),intBitsToFloat(R10i.y),intBitsToFloat(R12i.z),intBitsToFloat(backupReg0i)),vec4(uf_blockPS1[35].x,uf_blockPS1[35].y,uf_blockPS1[35].z,uf_blockPS1[35].w))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R127i.z = floatBitsToInt(1.0 / intBitsToFloat(PV0i.x)); +PS1i = R127i.z; +// 10 +backupReg0i = R0i.w; +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R11i.x),intBitsToFloat(R10i.y),intBitsToFloat(R12i.z),intBitsToFloat(backupReg0i)),vec4(uf_blockPS1[36].x,uf_blockPS1[36].y,uf_blockPS1[36].z,uf_blockPS1[36].w))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R3i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PS1i))); +PS0i = R3i.x; +// 11 +R4i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R11i.z),intBitsToFloat(R9i.z)) + intBitsToFloat(R127i.y))); +R3i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R127i.z))); +R0i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS6[27].z,-(intBitsToFloat(R126i.x))) + uf_blockPS6[27].z)); +R6i.x = floatBitsToInt(exp2(intBitsToFloat(R127i.x))); +PS1i = R6i.x; +} +if( activeMaskStackC[1] == true ) { +R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x); +R1i.xyz = floatBitsToInt(textureLod(textureUnitPS13, intBitsToFloat(R1i.xz),0.0).xyz); +R2i.xyz = floatBitsToInt(texture(textureUnitPS9, intBitsToFloat(R2i.xz)).xyz); +R3i.x = floatBitsToInt(textureLod(textureUnitPS4, intBitsToFloat(R3i.xy),intBitsToFloat(R3i.w)).x); +} +// export +passPixelColor2 = vec4(intBitsToFloat(R9i.x), intBitsToFloat(R9i.x), intBitsToFloat(R9i.x), intBitsToFloat(R9i.x)); +if( activeMaskStackC[1] == true ) { +// 0 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.x),intBitsToFloat(R8i.x)) + intBitsToFloat(R4i.x))); +R123i.x = clampFI32(R123i.x); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((intBitsToFloat(R1i.w) * 2.0 + -(1.0))); +PV0i.y = R123i.y; +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), intBitsToFloat(R4i.w))); +PV0i.z = R126i.z; +R8i.w = 0; +R7i.w = 0x3f800000; +PS0i = R7i.w; +// 1 +backupReg0i = R3i.x; +R3i.x = floatBitsToInt((intBitsToFloat(PV0i.y) * intBitsToFloat(0x41c80000) + intBitsToFloat(R10i.z))); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R9i.w)) + intBitsToFloat(R2i.w))); +PV1i.y = R123i.y; +R127i.z = floatBitsToInt(-(intBitsToFloat(PV0i.z)) + 1.0); +R127i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + uf_blockPS10[1].z); +R127i.w = clampFI32(R127i.w); +tempResultf = log2(intBitsToFloat(PV0i.x)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS1i = floatBitsToInt(tempResultf); +// 2 +backupReg0i = R2i.x; +backupReg1i = R2i.y; +backupReg2i = R2i.z; +R2i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(PV1i.y))); +R2i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg1i), intBitsToFloat(PV1i.y))); +R2i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg2i), intBitsToFloat(PV1i.y))); +PV0i.w = floatBitsToInt(mul_nonIEEE(uf_blockPS6[29].z, intBitsToFloat(PS1i))); +tempResultf = log2(intBitsToFloat(R5i.x)); +if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; +PS0i = floatBitsToInt(tempResultf); +// 3 +R8i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), uf_blockPS10[3].z)); +PV1i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[18].y, intBitsToFloat(PS0i))); +PS1i = floatBitsToInt(exp2(intBitsToFloat(PV0i.w))); +// 4 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), uf_blockPS6[42].z)); +R123i.w = floatBitsToInt((mul_nonIEEE(-(uf_blockPS6[29].w),intBitsToFloat(PS1i)) + 1.0)); +PV0i.w = R123i.w; +PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.z))); +// 5 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),uf_blockPS6[42].y) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS0i), uf_blockPS6[16].w)); +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R6i.x)),intBitsToFloat(PV0i.w)) + intBitsToFloat(PV0i.w))); +PV1i.z = R123i.z; +// 6 +backupReg0i = R1i.x; +R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R7i.y), intBitsToFloat(PV1i.y))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), uf_blockPS6[30].w)); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),uf_blockPS6[42].x) + intBitsToFloat(PV1i.x))); +PV0i.w = R123i.w; +// 7 +R3i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(R4i.w))); +PV1i.y = R3i.y; +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(PV0i.w))); +// 8 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(PV1i.z))); +PV0i.x = R127i.x; +R1i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.y)),intBitsToFloat(R127i.z)) + intBitsToFloat(R127i.z))); +R2i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.z),-(intBitsToFloat(PV1i.y))) + intBitsToFloat(R126i.z))); +PS0i = R2i.w; +// 9 +PV1i.y = floatBitsToInt(intBitsToFloat(R5i.w) + -(intBitsToFloat(PV0i.x))); +// 10 +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.y),intBitsToFloat(R7i.z)) + intBitsToFloat(R127i.x))); +PV0i.z = R123i.z; +// 11 +R8i.x = floatBitsToInt(intBitsToFloat(PV0i.z) + uf_blockPS10[1].y); +R8i.x = clampFI32(R8i.x); +} +if( activeMaskStackC[1] == true ) { +// 0 +PV0i.w = floatBitsToInt(-(intBitsToFloat(R3i.x)) + uf_blockPS6[52].x); +// 1 +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),uf_blockPS6[15].x) + uf_blockPS6[14].w)); +R123i.z = clampFI32(R123i.z); +PV1i.z = R123i.z; +// 2 +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), uf_blockPS6[13].w)); +// 3 +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(R4i.w))); +// 4 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV1i.w)),intBitsToFloat(R1i.y)) + intBitsToFloat(R1i.y))); +PV0i.x = R123i.x; +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(R1i.y))); +// 5 +PV1i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].y, intBitsToFloat(PV0i.z))); +PV1i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].x, intBitsToFloat(PV0i.z))); +PV1i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[13].z, intBitsToFloat(PV0i.z))); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(PV0i.x))); +R8i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.x)),intBitsToFloat(PV0i.x)) + intBitsToFloat(PV0i.x))); +PS1i = R8i.z; +// 6 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].z,intBitsToFloat(PV1i.w)) + intBitsToFloat(PV1i.z))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].y,intBitsToFloat(PV1i.w)) + intBitsToFloat(PV1i.x))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS6[16].x,intBitsToFloat(PV1i.w)) + intBitsToFloat(PV1i.y))); +PV0i.z = R123i.z; +// 7 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.z),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.y),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.y))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R2i.x),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.z))); +PV1i.z = R123i.z; +// 8 +R7i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].x,intBitsToFloat(R3i.y)) + intBitsToFloat(PV1i.z))); +PV0i.x = R7i.x; +R7i.y = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].y,intBitsToFloat(R3i.y)) + intBitsToFloat(PV1i.y))); +PV0i.y = R7i.y; +R7i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS6[30].z,intBitsToFloat(R3i.y)) + intBitsToFloat(PV1i.x))); +PV0i.z = R7i.z; +// 9 +R1i.xyz = ivec3(PV0i.x,PV0i.y,PV0i.z); +R1i.w = R7i.w; +// 10 +R0i.xyz = ivec3(R8i.x,R8i.y,R8i.z); +R0i.w = R8i.w; +} +// export +passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w)); +passPixelColor1 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w)); +} diff --git a/Workarounds/BreathOfTheWild_!Intel_Shadows/88133ee405eaae28_000003c000009269_ps.txt b/Workarounds/BreathOfTheWild_!Intel_Shadows/88133ee405eaae28_000003c000009269_ps.txt new file mode 100644 index 00000000..68f0bc61 --- /dev/null +++ b/Workarounds/BreathOfTheWild_!Intel_Shadows/88133ee405eaae28_000003c000009269_ps.txt @@ -0,0 +1,797 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + +// shader ffe0e8c84f6e8da9 +UNIFORM_BUFFER_LAYOUT(33, 1, 7) uniform uniformBlockPS1 +{ +vec4 uf_blockPS1[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(38, 1, 8) uniform uniformBlockPS6 +{ +vec4 uf_blockPS6[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(42, 1, 9) uniform uniformBlockPS10 +{ +vec4 uf_blockPS10[1024]; +}; + +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(8, 1, 4) uniform sampler2DArray textureUnitPS8; +TEXTURE_LAYOUT(15, 1, 5) uniform sampler2D textureUnitPS15; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 1) in vec4 passParameterSem5; +layout(location = 2) in vec4 passParameterSem6; +layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else +uniform vec2 uf_fragCoordScale; +#endif +int clampFI32(int v) +{ +if( v == 0x7FFFFFFF ) + return floatBitsToInt(1.0); +else if( v == 0xFFFFFFFF ) + return floatBitsToInt(0.0); +return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); +} +float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } +float textureShadow_1(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_2(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_3(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_4(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_5(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +void main() +{ +ivec4 R0i = ivec4(0); +ivec4 R1i = ivec4(0); +ivec4 R2i = ivec4(0); +ivec4 R3i = ivec4(0); +ivec4 R4i = ivec4(0); +ivec4 R5i = ivec4(0); +ivec4 R6i = ivec4(0); +ivec4 R7i = ivec4(0); +ivec4 R8i = ivec4(0); +ivec4 R9i = ivec4(0); +ivec4 R10i = ivec4(0); +ivec4 R11i = ivec4(0); +ivec4 R12i = ivec4(0); +ivec4 R13i = ivec4(0); +ivec4 R14i = ivec4(0); +ivec4 R15i = ivec4(0); +ivec4 R16i = ivec4(0); +ivec4 R122i = ivec4(0); +ivec4 R123i = ivec4(0); +ivec4 R124i = ivec4(0); +ivec4 R125i = ivec4(0); +ivec4 R126i = ivec4(0); +ivec4 R127i = ivec4(0); +int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i; +ivec4 PV0i = ivec4(0), PV1i = ivec4(0); +int PS0i = 0, PS1i = 0; +ivec4 tempi = ivec4(0); +float tempResultf; +int tempResulti; +ivec4 ARi = ivec4(0); +bool predResult = true; +bool activeMaskStack[3]; +bool activeMaskStackC[4]; +activeMaskStack[0] = false; +activeMaskStack[1] = false; +activeMaskStackC[0] = false; +activeMaskStackC[1] = false; +activeMaskStackC[2] = false; +activeMaskStack[0] = true; +activeMaskStackC[0] = true; +activeMaskStackC[1] = true; +vec3 cubeMapSTM; +int cubeMapFaceId; +R0i = floatBitsToInt(passParameterSem0); +R1i = floatBitsToInt(passParameterSem5); +R2i = floatBitsToInt(passParameterSem6); +if( activeMaskStackC[1] == true ) { +R3i.w = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.xy)).x); +R6i.x = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.xy)).x); +R6i.z = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.zw)).x); +R6i.w = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R0i.xy)).x); +R4i.xyzw = floatBitsToInt(texture(textureUnitPS3, intBitsToFloat(R2i.zw)).xyzw); +R2i.xy = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.xy)).xw); +} +if( activeMaskStackC[1] == true ) { +// 0 +R123i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R6i.w)) + uf_blockPS1[14].x)); +PV0i.x = R123i.x; +R127i.y = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R6i.z)) + uf_blockPS1[14].x)); +R127i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R6i.x)) + uf_blockPS1[14].x)); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R3i.w),uf_blockPS1[16].x) + uf_blockPS1[14].x)); +PV0i.w = R123i.w; +R127i.x = floatBitsToInt((intBitsToFloat(R4i.x) * 2.0 + -(1.0))); +PS0i = R127i.x; +// 1 +R7i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), -(intBitsToFloat(PV0i.w)))); +R6i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), -(intBitsToFloat(PV0i.w)))); +R12i.z = floatBitsToInt(-(intBitsToFloat(PV0i.x))); +R127i.w = floatBitsToInt((intBitsToFloat(R4i.y) * 2.0 + -(1.0))); +R125i.z = floatBitsToInt((intBitsToFloat(R4i.z) * 2.0 + -(1.0))); +PS1i = R125i.z; +// 2 +PV0i.x = floatBitsToInt(-(intBitsToFloat(R127i.y))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.y), -(intBitsToFloat(R127i.y)))); +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), -(intBitsToFloat(R127i.y)))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), -(intBitsToFloat(R127i.z)))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.w), -(intBitsToFloat(R127i.z)))); +PS0i = R126i.z; +// 3 +R125i.x = floatBitsToInt(-(intBitsToFloat(R7i.x)) + intBitsToFloat(PV0i.z)); +R127i.y = floatBitsToInt(-(intBitsToFloat(R127i.z))); +R124i.z = floatBitsToInt(-(intBitsToFloat(R12i.z)) + intBitsToFloat(PV0i.x)); +R125i.w = floatBitsToInt(-(intBitsToFloat(R6i.y)) + intBitsToFloat(PV0i.y)); +R126i.y = floatBitsToInt(-(intBitsToFloat(R7i.x)) + intBitsToFloat(PV0i.w)); +PS1i = R126i.y; +// 4 +backupReg0i = R126i.z; +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R7i.x),intBitsToFloat(R6i.y),intBitsToFloat(R12i.z),-0.0),vec4(intBitsToFloat(R7i.x),intBitsToFloat(R6i.y),intBitsToFloat(R12i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R126i.z = tempi.x; +R126i.x = floatBitsToInt(-(intBitsToFloat(R6i.y)) + intBitsToFloat(backupReg0i)); +PS0i = R126i.x; +// 5 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R127i.x),intBitsToFloat(R127i.w),intBitsToFloat(R125i.z),-0.0),vec4(intBitsToFloat(R127i.x),intBitsToFloat(R127i.w),intBitsToFloat(R125i.z),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R127i.z = tempi.x; +R126i.w = floatBitsToInt(-(intBitsToFloat(R12i.z)) + intBitsToFloat(R127i.y)); +PS1i = R126i.w; +// 6 +backupReg0i = R126i.z; +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R7i.x), uf_blockPS6[43].x)); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.z), intBitsToFloat(R126i.y))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.w), intBitsToFloat(PS1i))); +R124i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.x), intBitsToFloat(R126i.x))); +R125i.y = floatBitsToInt(sqrt(intBitsToFloat(backupReg0i))); +PS0i = R125i.y; +// 7 +backupReg0i = R127i.z; +R124i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R7i.x), uf_blockPS6[45].x)); +R124i.y = floatBitsToInt(intBitsToFloat(R4i.w) * intBitsToFloat(0x437f0000)); +R127i.z = floatBitsToInt((intBitsToFloat(R2i.x) * 2.0 + -(1.0))); +R4i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),uf_blockPS6[43].y) + intBitsToFloat(PV0i.x))); +tempResultf = 1.0 / sqrt(intBitsToFloat(backupReg0i)); +PS1i = floatBitsToInt(tempResultf); +// 8 +backupReg0i = R125i.z; +R8i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.x), intBitsToFloat(PS1i))); +R7i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.w), intBitsToFloat(PS1i))); +R125i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS1[18].y, uf_blockPS1[18].z)); +PV0i.z = R125i.z; +R127i.w = floatBitsToInt(-(intBitsToFloat(R12i.z)) * intBitsToFloat(0x3d4ccccd)); +R9i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(PS1i))); +PS0i = R9i.z; +// 9 +R1i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.x)),intBitsToFloat(R124i.z)) + intBitsToFloat(R126i.z))); +R1i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R126i.w)),intBitsToFloat(R125i.x)) + intBitsToFloat(R127i.y))); +R126i.z = floatBitsToInt((intBitsToFloat(R2i.y) * 2.0 + -(1.0))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),uf_blockPS6[45].y) + intBitsToFloat(R124i.x))); +PV1i.w = R123i.w; +R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(R127i.z))); +PS1i = R126i.w; +// 10 +backupReg0i = R126i.y; +R126i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),uf_blockPS6[45].z) + intBitsToFloat(PV1i.w))); +R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R12i.z),uf_blockPS6[43].z) + intBitsToFloat(R4i.w))); +R1i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R125i.w)) + intBitsToFloat(R124i.w))); +PV0i.z = R1i.z; +R125i.w = R8i.x; +R125i.w = floatBitsToInt(intBitsToFloat(R125i.w) * 2.0); +R124i.z = R7i.y; +R124i.z = floatBitsToInt(intBitsToFloat(R124i.z) * 2.0); +PS0i = R124i.z; +// 11 +R124i.x = floatBitsToInt(dot(vec4(-(intBitsToFloat(R1i.x)),-(intBitsToFloat(R1i.y)),-(intBitsToFloat(PV0i.z)),-0.0),vec4(-(intBitsToFloat(R1i.x)),-(intBitsToFloat(R1i.y)),-(intBitsToFloat(PV0i.z)),0.0))); +PV1i.x = R124i.x; +PV1i.y = R124i.x; +PV1i.z = R124i.x; +PV1i.w = R124i.x; +R2i.x = floatBitsToInt((-(uf_blockPS6[53].w) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(R127i.w))); +R2i.x = clampFI32(R2i.x); +PS1i = R2i.x; +// 12 +R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.z), -(intBitsToFloat(R126i.z)))); +PV0i.x = R125i.x; +R127i.y = floatBitsToInt(intBitsToFloat(R126i.z) * intBitsToFloat(0xbb6fe5d7)); +PV0i.z = floatBitsToInt(intBitsToFloat(R126i.w) * intBitsToFloat(0x3ca30589)); +PV0i.w = floatBitsToInt(intBitsToFloat(R126i.z) * intBitsToFloat(0x3ca30589)); +R126i.z = floatBitsToInt(intBitsToFloat(R126i.w) * intBitsToFloat(0xbb6fe5d7)); +PS0i = R126i.z; +// 13 +R10i.x = floatBitsToInt(uf_blockPS6[43].w + intBitsToFloat(R126i.y)); +R3i.y = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(0x3b02da3b) + intBitsToFloat(PV0i.w))); +R2i.z = floatBitsToInt(mul_nonIEEE(-(intBitsToFloat(R12i.z)), uf_blockPS1[17].y)); +R1i.w = 0x3f800000; +R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * intBitsToFloat(0x3b02da3b) + intBitsToFloat(PV0i.z))); +PS1i = R4i.x; +// 14 +R3i.x = floatBitsToInt((intBitsToFloat(R125i.x) * intBitsToFloat(0x3d156fb9) + intBitsToFloat(R126i.z))); +R2i.y = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(0x3d156fb9) + intBitsToFloat(R127i.y))); +R11i.z = floatBitsToInt(uf_blockPS6[45].w + intBitsToFloat(R126i.x)); +R10i.w = floatBitsToInt((-(uf_blockPS6[53].z) * intBitsToFloat(0x3d4ccccd) + intBitsToFloat(R127i.w))); +R10i.w = clampFI32(R10i.w); +PS0i = floatBitsToInt(1.0 / intBitsToFloat(R125i.y)); +// 15 +backupReg0i = R124i.y; +R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R7i.x), intBitsToFloat(PS0i))); +PV1i.x = R126i.x; +R124i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R6i.y), intBitsToFloat(PS0i))); +PV1i.y = R124i.y; +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R12i.z), intBitsToFloat(PS0i))); +PS1i = int(intBitsToFloat(backupReg0i)); +// 16 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R8i.x),intBitsToFloat(R7i.y),intBitsToFloat(R9i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +PS0i = PS1i & int(1); +// 17 +R11i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(R125i.w)) + intBitsToFloat(R126i.x))); +R10i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(R124i.z)) + intBitsToFloat(R124i.y))); +R11i.w = floatBitsToInt(intBitsToFloat(PV0i.x) + 1.0); +R11i.w = clampFI32(R11i.w); +R8i.y = ((PS0i == 0)?(0):(0x3f800000)); +PS1i = R8i.y; +// 18 +tempResultf = 1.0 / sqrt(intBitsToFloat(R124i.x)); +R2i.w = floatBitsToInt(tempResultf); +PS0i = R2i.w; +} +if( activeMaskStackC[1] == true ) { +activeMaskStack[1] = activeMaskStack[0]; +activeMaskStackC[2] = activeMaskStackC[1]; +// 0 +PV0i.x = floatBitsToInt(uf_blockPS10[2].z + 1.0); +R9i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].y, uf_blockPS10[2].w)); +R9i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].x, uf_blockPS10[2].w)); +PS0i = R9i.x; +// 1 +R10i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].z, uf_blockPS10[2].w)); +R12i.w = floatBitsToInt(-(intBitsToFloat(R2i.x)) + intBitsToFloat(PV0i.x)); +R12i.w = clampFI32(R12i.w); +R7i.w = 0; +PS1i = R7i.w; +// 2 +predResult = (1.0 > intBitsToFloat(R10i.w)); +activeMaskStack[1] = predResult; +activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true; +} +else { +activeMaskStack[1] = false; +activeMaskStackC[2] = false; +} +if( activeMaskStackC[2] == true ) { +// 0 +R12i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(R4i.x)); +R12i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R3i.y)); +R13i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R4i.x))); +PS0i = R13i.x; +// 1 +R14i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(R3i.x)); +R13i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R3i.y))); +R14i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R2i.y)); +PS1i = R14i.y; +// 2 +R15i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R3i.x))); +R15i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R2i.y))); +} +if( activeMaskStackC[2] == true ) { +// 0 +R127i.x = ((-(intBitsToFloat(R12i.z)) > uf_blockPS1[58].y)?int(0xFFFFFFFF):int(0x0)); +PV0i.y = floatBitsToInt(intBitsToFloat(R7i.y) * 1.5); +PV0i.z = floatBitsToInt(intBitsToFloat(R8i.x) * 1.5); +PV0i.w = ((-(intBitsToFloat(R12i.z)) > uf_blockPS1[58].x)?int(0xFFFFFFFF):int(0x0)); +PS0i = floatBitsToInt(intBitsToFloat(R9i.z) * 1.5); +// 1 +backupReg0i = R1i.x; +backupReg1i = R1i.z; +R1i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.z))); +PV1i.y = PV0i.w & int(1); +R1i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.y)),intBitsToFloat(R2i.w)) + intBitsToFloat(PV0i.y))); +R1i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg1i)),intBitsToFloat(R2i.w)) + intBitsToFloat(PS0i))); +R122i.x = floatBitsToInt((intBitsToFloat(R2i.z) * 0.25 + 1.0)); +PS1i = R122i.x; +// 2 +R2i.x = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R2i.y = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R2i.z = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R13i.w = PV1i.y - R127i.x; +PV0i.w = R13i.w; +PS0i = floatBitsToInt(uf_blockPS6[53].y * uf_fragCoordScale.y); +PS0i = floatBitsToInt(intBitsToFloat(PS0i) / 2.0); +// 3 +R6i.x = floatBitsToInt(uf_blockPS6[53].x * uf_fragCoordScale.x); +R6i.x = floatBitsToInt(intBitsToFloat(R6i.x) / 2.0); +PV1i.y = PV0i.w << 0x00000002; +R6i.z = floatBitsToInt(-(intBitsToFloat(PS0i))); +R2i.w = PS0i; +PS1i = floatBitsToInt(float(PV0i.w)); +// 4 +R0i.x = PV1i.y + 0x0000002b; +R0i.y = PV1i.y + 0x0000002d; +R0i.z = PV1i.y + 0x0000002a; +R0i.w = PV1i.y + 0x0000002c; +R7i.z = floatBitsToInt(roundEven(intBitsToFloat(PS1i))); +PS0i = R7i.z; +// 5 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R1i.x),intBitsToFloat(R1i.z),intBitsToFloat(R1i.w),-0.0),vec4(intBitsToFloat(R1i.x),intBitsToFloat(R1i.z),intBitsToFloat(R1i.w),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R1i.y = tempi.x; +R8i.z = PS0i; +PS1i = R8i.z; +} +if( activeMaskStackC[2] == true ) { +R3i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +R4i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +R5i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +} +if( activeMaskStackC[2] == true ) { +// 0 +R126i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R8i.x),intBitsToFloat(R7i.y),intBitsToFloat(R9i.z),intBitsToFloat(R9i.z)),vec4(-(intBitsToFloat(R9i.x)),-(intBitsToFloat(R9i.y)),-(intBitsToFloat(R10i.z)),-(intBitsToFloat(R7i.w))))); +R126i.x = clampFI32(R126i.x); +PV0i.x = R126i.x; +PV0i.y = R126i.x; +PV0i.z = R126i.x; +PV0i.w = R126i.x; +tempResultf = 1.0 / sqrt(intBitsToFloat(R1i.y)); +PS0i = floatBitsToInt(tempResultf); +// 1 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.x), intBitsToFloat(PS0i))); +PV1i.x = R127i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PS0i))); +PV1i.y = R127i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.w), intBitsToFloat(PS0i))); +PV1i.z = R127i.z; +R126i.w = floatBitsToInt(-(intBitsToFloat(R6i.x))); +R1i.z = R7i.z; +PS1i = R1i.z; +// 2 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R9i.x),intBitsToFloat(R9i.y),intBitsToFloat(R10i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R9i.z = R7i.z; +PS0i = R9i.z; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(PV0i.x)) + 1.0)); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R9i.x)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.x))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R10i.z)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.z))); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R9i.y)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.y))); +PV1i.w = R123i.w; +// 4 +backupReg0i = R126i.x; +R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(R2i.y))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(backupReg0i))); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(R2i.x))); +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(R2i.z))); +// 5 +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R8i.y), intBitsToFloat(PV0i.y))); +// 6 +backupReg0i = R6i.y; +R16i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(PV1i.z)) + intBitsToFloat(R7i.x))); +PV0i.x = R16i.x; +R6i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.x),intBitsToFloat(PV1i.z)) + intBitsToFloat(backupReg0i))); +R10i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.w),intBitsToFloat(PV1i.z)) + intBitsToFloat(R12i.z))); +// 7 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R4i.x))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R5i.x))); +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R3i.x))); +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R3i.y)) + intBitsToFloat(PV1i.z))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R4i.y)) + intBitsToFloat(PV1i.x))); +PV0i.y = R123i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R0i.x))); +// 9 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R5i.y)) + intBitsToFloat(R127i.y))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R4i.z)) + intBitsToFloat(PV0i.y))); +PV1i.y = R123i.y; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R3i.z)) + intBitsToFloat(PV0i.x))); +PV1i.w = R123i.w; +// 10 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(R127i.z))); +PV0i.x = R123i.x; +PV0i.y = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV1i.w)); +R127i.z = floatBitsToInt(intBitsToFloat(R4i.w) + intBitsToFloat(PV1i.y)); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R5i.z)) + intBitsToFloat(PV1i.x))); +PV0i.w = R123i.w; +// 11 +PV1i.y = floatBitsToInt(intBitsToFloat(R5i.w) + intBitsToFloat(PV0i.w)); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R0i.z)) + intBitsToFloat(PV0i.x))); +PV1i.w = R123i.w; +R126i.z = floatBitsToInt(1.0 / intBitsToFloat(PV0i.y)); +PS1i = R126i.z; +// 12 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PS1i))); +PV0i.y = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.w)); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(PS1i))); +PV0i.z = R127i.z; +// 13 +R7i.x = floatBitsToInt((uf_blockPS6[53].x * uf_fragCoordScale.x * 0.5 + intBitsToFloat(PV0i.z))); +R127i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(0xbb03126f)); +R127i.y = clampFI32(R127i.y); +PV1i.y = R127i.y; +R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(R126i.z))); +PV1i.w = R127i.w; +R8i.x = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R6i.x)); +PS1i = R8i.x; +// 14 +R1i.x = floatBitsToInt(intBitsToFloat(R127i.z) + intBitsToFloat(R126i.w)); +R7i.y = floatBitsToInt((uf_blockPS6[53].y * uf_fragCoordScale.y * 0.5 + intBitsToFloat(PV1i.w))); +R7i.w = PV1i.y; +R8i.y = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R6i.z)); +PS0i = R8i.y; +// 15 +R9i.x = floatBitsToInt((-(uf_blockPS6[53].x) * uf_fragCoordScale.x * 0.5 + intBitsToFloat(R127i.z))); +R1i.y = floatBitsToInt(intBitsToFloat(R127i.w) + intBitsToFloat(R2i.w)); +R8i.w = R127i.y; +R1i.w = R127i.y; +PS1i = R1i.w; +// 16 +R9i.y = floatBitsToInt((-(uf_blockPS6[53].y) * uf_fragCoordScale.y * 0.5 + intBitsToFloat(R127i.w))); +R9i.w = R127i.y; +} +if( activeMaskStackC[2] == true ) { +R7i.z = floatBitsToInt(textureShadow_1(textureUnitPS8, vec4(intBitsToFloat(R7i.x),intBitsToFloat(R7i.y),intBitsToFloat(R7i.z),intBitsToFloat(R7i.w)))); +R8i.y = floatBitsToInt(textureShadow_2(textureUnitPS8, vec4(intBitsToFloat(R8i.x),intBitsToFloat(R8i.y),intBitsToFloat(R8i.z),intBitsToFloat(R8i.w)))); +R1i.x = floatBitsToInt(textureShadow_3(textureUnitPS8, vec4(intBitsToFloat(R1i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.z),intBitsToFloat(R1i.w)))); +R9i.w = floatBitsToInt(textureShadow_4(textureUnitPS8, vec4(intBitsToFloat(R9i.x),intBitsToFloat(R9i.y),intBitsToFloat(R9i.z),intBitsToFloat(R9i.w)))); +} +if( activeMaskStackC[2] == true ) { +activeMaskStack[2] = activeMaskStack[1]; +activeMaskStackC[3] = activeMaskStackC[2]; +// 0 +PV0i.w = floatBitsToInt(intBitsToFloat(R7i.z) + intBitsToFloat(R8i.y)); +PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0); +// 1 +R123i.z = floatBitsToInt((intBitsToFloat(R1i.x) * 0.5 + intBitsToFloat(PV0i.w))); +PV1i.z = R123i.z; +// 2 +R5i.w = floatBitsToInt((intBitsToFloat(R9i.w) * 0.5 + intBitsToFloat(PV1i.z))/2.0); +PV0i.w = R5i.w; +// 3 +PV1i.x = ((1.0 > intBitsToFloat(PV0i.w))?int(0xFFFFFFFF):int(0x0)); +// 4 +R0i.y = ((R13i.w > 0)?(PV1i.x):(0)); +// 5 +predResult = (R0i.y != 0); +activeMaskStack[2] = predResult; +activeMaskStackC[3] = predResult == true && activeMaskStackC[2] == true; +} +else { +activeMaskStack[2] = false; +activeMaskStackC[3] = false; +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.x = int(-1) + R13i.w; +// 1 +PV1i.w = PV0i.x << 0x00000002; +PS1i = floatBitsToInt(float(PV0i.x)); +// 2 +R0i.x = PV1i.w + 0x0000002c; +R0i.y = PV1i.w + 0x0000002b; +R0i.z = PV1i.w + 0x0000002a; +R0i.w = PV1i.w + 0x0000002d; +R4i.z = floatBitsToInt(roundEven(intBitsToFloat(PS1i))); +PS0i = R4i.z; +} +if( activeMaskStackC[3] == true ) { +R1i.xyzw = floatBitsToInt(uf_blockPS1[R0i.w].xyzw); +R2i.xyzw = floatBitsToInt(uf_blockPS1[R0i.x].xyzw); +R3i.xyzw = floatBitsToInt(uf_blockPS1[R0i.z].xyzw); +R0i.xyzw = floatBitsToInt(uf_blockPS1[R0i.y].xyzw); +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R2i.x))); +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R1i.x))); +// 1 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R2i.y)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R1i.y)) + intBitsToFloat(PV0i.z))); +PV1i.y = R123i.y; +PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R3i.x))); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R16i.x), intBitsToFloat(R0i.x))); +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R1i.z)) + intBitsToFloat(PV1i.y))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R3i.y)) + intBitsToFloat(PV1i.z))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R0i.y)) + intBitsToFloat(PV1i.w))); +PV0i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R2i.z)) + intBitsToFloat(PV1i.x))); +PV0i.w = R123i.w; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R3i.z)) + intBitsToFloat(PV0i.y))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(R0i.z)) + intBitsToFloat(PV0i.z))); +PV1i.y = R123i.y; +R127i.z = floatBitsToInt(intBitsToFloat(R2i.w) + intBitsToFloat(PV0i.w)); +PV1i.w = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(PV0i.x)); +// 4 +PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.y)); +PV0i.w = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV1i.x)); +PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.w)); +// 5 +R4i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(PS0i))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PS0i))); +R4i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PS0i))); +PS1i = R4i.y; +// 6 +R4i.w = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(0xbb03126f)); +R4i.w = clampFI32(R4i.w); +} +if( activeMaskStackC[3] == true ) { +R4i.z = floatBitsToInt(textureShadow_5(textureUnitPS8, vec4(intBitsToFloat(R4i.x),intBitsToFloat(R4i.y),intBitsToFloat(R4i.z),intBitsToFloat(R4i.w)))); +} +if( activeMaskStackC[3] == true ) { +// 0 +backupReg0i = R5i.w; +R5i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R4i.z))); +} +activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true; +if( activeMaskStackC[2] == true ) { +R0i.x = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R14i.xy)).x); +R0i.y = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R15i.xy)).x); +R1i.x = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R12i.xy)).x); +R1i.y = floatBitsToInt(texture(textureUnitPS6, intBitsToFloat(R13i.xy)).x); +} +if( activeMaskStackC[2] == true ) { +// 0 +R127i.x = floatBitsToInt(intBitsToFloat(R6i.w) * intBitsToFloat(0x3f7eb852)); +PV0i.x = R127i.x; +PV0i.y = floatBitsToInt(uf_blockPS1[16].x * intBitsToFloat(0x41a00000)); +R124i.z = floatBitsToInt(-(intBitsToFloat(R5i.w)) + 1.0); +R127i.w = floatBitsToInt(uf_blockPS1[16].x * intBitsToFloat(0x3f555555)); +// 1 +backupReg0i = R0i.x; +PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + -(intBitsToFloat(R0i.y))); +PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + -(intBitsToFloat(backupReg0i))); +R127i.z = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x3f8ba8d6)); +R127i.z = floatBitsToInt(intBitsToFloat(R127i.z) / 2.0); +PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x3fbc4580)); +PV1i.w = floatBitsToInt(intBitsToFloat(PV1i.w) / 2.0); +R126i.z = floatBitsToInt(-(intBitsToFloat(R1i.x)) + intBitsToFloat(PV0i.x)); +PS1i = R126i.z; +// 2 +backupReg0i = R127i.x; +R127i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.w)),intBitsToFloat(PV1i.y)) + 1.0)); +R127i.x = clampFI32(R127i.x); +R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.x)) + 0.5)); +R127i.y = clampFI32(R127i.y); +PV0i.y = R127i.y; +R125i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.y)) + 0.5)); +R125i.z = clampFI32(R125i.z); +PV0i.z = R125i.z; +R126i.w = floatBitsToInt(-(intBitsToFloat(R1i.y)) + intBitsToFloat(backupReg0i)); +PV0i.w = R126i.w; +R125i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.w)),intBitsToFloat(PV1i.x)) + 1.0)); +R125i.w = clampFI32(R125i.w); +PS0i = R125i.w; +// 3 +R126i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(R126i.z)) + 0.5)); +R126i.x = clampFI32(R126i.x); +PV1i.x = R126i.x; +PV1i.y = floatBitsToInt(0.5 + -(intBitsToFloat(PV0i.y))); +PV1i.z = floatBitsToInt(0.5 + -(intBitsToFloat(PV0i.z))); +R124i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.z),intBitsToFloat(PV0i.w)) + 0.5)); +R124i.w = clampFI32(R124i.w); +PV1i.w = R124i.w; +R0i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.w)),intBitsToFloat(R126i.z)) + 1.0)); +R0i.w = clampFI32(R0i.w); +PS1i = R0i.w; +// 4 +backupReg0i = R127i.w; +PV0i.x = floatBitsToInt(0.5 + -(intBitsToFloat(PV1i.x))); +R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(R127i.x)) + 0.5)); +PV0i.y = R126i.y; +PV0i.z = floatBitsToInt(0.5 + -(intBitsToFloat(PV1i.w))); +R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.y),intBitsToFloat(R125i.w)) + 0.5)); +PV0i.w = R127i.w; +R125i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R126i.w)) + 1.0)); +R125i.y = clampFI32(R125i.y); +PS0i = R125i.y; +// 5 +PV1i.x = floatBitsToInt(intBitsToFloat(R127i.y) + -(intBitsToFloat(PV0i.y))); +R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),intBitsToFloat(PS0i)) + 0.5)); +PV1i.y = R127i.y; +PV1i.z = floatBitsToInt(intBitsToFloat(R125i.z) + -(intBitsToFloat(PV0i.w))); +R126i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(R0i.w)) + 0.5)); +PV1i.w = R126i.w; +R3i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.z),intBitsToFloat(R10i.w)) + intBitsToFloat(R5i.w))); +PS1i = R3i.w; +// 6 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.z),intBitsToFloat(R127i.x)) + intBitsToFloat(R127i.w))); +PV0i.x = R123i.x; +PV0i.y = floatBitsToInt(intBitsToFloat(R126i.x) + -(intBitsToFloat(PV1i.y))); +PV0i.z = floatBitsToInt(intBitsToFloat(R124i.w) + -(intBitsToFloat(PV1i.w))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),intBitsToFloat(R125i.w)) + intBitsToFloat(R126i.y))); +PV0i.w = R123i.w; +// 7 +PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(0x3e35e743)); +PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.w) * intBitsToFloat(0x3e35e743)); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.z),intBitsToFloat(R125i.y)) + intBitsToFloat(R126i.w))); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.y),intBitsToFloat(R0i.w)) + intBitsToFloat(R127i.y))); +PV1i.w = R123i.w; +// 8 +R123i.x = floatBitsToInt((intBitsToFloat(PV1i.w) * intBitsToFloat(0x3e825397) + intBitsToFloat(PV1i.x))); +PV0i.x = R123i.x; +R123i.w = floatBitsToInt((intBitsToFloat(PV1i.z) * intBitsToFloat(0x3e825397) + intBitsToFloat(PV1i.y))); +PV0i.w = R123i.w; +// 9 +PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(PV0i.w)); +// 10 +PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(0xbedd476b)); +// 11 +PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x40c00000)); +PV1i.x = clampFI32(PV1i.x); +// 12 +R1i.w = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + 1.0); +} +activeMaskStack[1] = activeMaskStack[1] == false; +activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true; +if( activeMaskStackC[2] == true ) { +// 0 +R3i.w = R1i.w; +} +activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; +if( activeMaskStackC[1] == true ) { +// 0 +R0i.x = floatBitsToInt((intBitsToFloat(R10i.x) * intBitsToFloat(0x38d1b717) + 0.5)); +R0i.y = floatBitsToInt((intBitsToFloat(R11i.z) * intBitsToFloat(0x3903126f) + 0.5)); +PV0i.z = floatBitsToInt(-(intBitsToFloat(R10i.y))); +PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0); +PV0i.w = R11i.x; +PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0); +R2i.z = R1i.w; +PS0i = R2i.z; +// 1 +R1i.x = floatBitsToInt(intBitsToFloat(PV0i.w) + 0.5); +R1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + 0.5); +R2i.w = 0x3f800000; +} +if( activeMaskStackC[1] == true ) { +R0i.xyz = floatBitsToInt(textureLod(textureUnitPS15, intBitsToFloat(R0i.xy),0.0).xyz); +R1i.y = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R1i.xy),0.0).x); +} +if( activeMaskStackC[1] == true ) { +// 0 +backupReg0i = R0i.x; +backupReg1i = R0i.y; +backupReg2i = R0i.z; +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(backupReg0i),intBitsToFloat(backupReg1i),intBitsToFloat(backupReg2i),-0.0),vec4(uf_blockPS6[42].x,uf_blockPS6[42].y,uf_blockPS6[42].z,0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R2i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),-(intBitsToFloat(R11i.w))) + intBitsToFloat(R1i.y))); +PS0i = R2i.y; +// 1 +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PV0i.x))); +// 2 +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(PV1i.w))); +PV0i.z = R127i.z; +// 3 +PV1i.y = floatBitsToInt(intBitsToFloat(R3i.w) + -(intBitsToFloat(PV0i.z))); +// 4 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.y),intBitsToFloat(R12i.w)) + intBitsToFloat(R127i.z))); +PV0i.x = R123i.x; +// 5 +R2i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),uf_blockPS10[3].z) + uf_blockPS10[1].y)); +R2i.x = clampFI32(R2i.x); +} +// export +passPixelColor5 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w)); +} diff --git a/Workarounds/BreathOfTheWild_!Intel_Shadows/9c0b7031078fba88_0000007800001269_ps.txt b/Workarounds/BreathOfTheWild_!Intel_Shadows/9c0b7031078fba88_0000007800001269_ps.txt new file mode 100644 index 00000000..4e7e52c0 --- /dev/null +++ b/Workarounds/BreathOfTheWild_!Intel_Shadows/9c0b7031078fba88_0000007800001269_ps.txt @@ -0,0 +1,590 @@ +#version 420 +#extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + +// shader b8a18eeb20759bfd +UNIFORM_BUFFER_LAYOUT(33, 1, 6) uniform uniformBlockPS1 +{ +vec4 uf_blockPS1[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(38, 1, 7) uniform uniformBlockPS6 +{ +vec4 uf_blockPS6[1024]; +}; + +UNIFORM_BUFFER_LAYOUT(42, 1, 8) uniform uniformBlockPS10 +{ +vec4 uf_blockPS10[1024]; +}; + +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 3) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(12, 1, 4) uniform sampler2D textureUnitPS12; +layout(location = 0) in vec4 passParameterSem0; +layout(location = 1) in vec4 passParameterSem5; +layout(location = 2) in vec4 passParameterSem6; +layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else +uniform vec2 uf_fragCoordScale; +#endif +int clampFI32(int v) +{ +if( v == 0x7FFFFFFF ) + return floatBitsToInt(1.0); +else if( v == 0xFFFFFFFF ) + return floatBitsToInt(0.0); +return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0)); +} +float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; } +float textureShadow_1(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_2(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_3(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_4(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +float textureShadow_5(sampler2DArray s, vec4 coord) { +vec4 v; +vec2 texSize = vec2(textureSize(s,0).xy); +vec2 texSizeR = vec2(1.0) / texSize; +vec2 texCoordFract = mod(coord.xy,texSizeR); +vec2 texCoordBase = coord.xy - texCoordFract + texSizeR/2.0; +texCoordFract /= texSizeR; +v.x = texture(s, vec3(texCoordBase+vec2(0.0,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.y = texture(s, vec3(texCoordBase+vec2(texSizeR.x,0.0), coord.z)).x >= coord.w?1.0:0.0; +v.z = texture(s, vec3(texCoordBase+vec2(0.0,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +v.w = texture(s, vec3(texCoordBase+vec2(texSizeR.x,texSizeR.y), coord.z)).x >= coord.w?1.0:0.0; +float r = mix(mix(v.x, v.y, texCoordFract.x) , mix(v.z, v.w, texCoordFract.x) , texCoordFract.y); +return r; +} +void main() +{ +ivec4 R0i = ivec4(0); +ivec4 R1i = ivec4(0); +ivec4 R2i = ivec4(0); +ivec4 R3i = ivec4(0); +ivec4 R4i = ivec4(0); +ivec4 R5i = ivec4(0); +ivec4 R6i = ivec4(0); +ivec4 R7i = ivec4(0); +ivec4 R8i = ivec4(0); +ivec4 R9i = ivec4(0); +ivec4 R10i = ivec4(0); +ivec4 R11i = ivec4(0); +ivec4 R12i = ivec4(0); +ivec4 R122i = ivec4(0); +ivec4 R123i = ivec4(0); +ivec4 R124i = ivec4(0); +ivec4 R125i = ivec4(0); +ivec4 R126i = ivec4(0); +ivec4 R127i = ivec4(0); +int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i; +ivec4 PV0i = ivec4(0), PV1i = ivec4(0); +int PS0i = 0, PS1i = 0; +ivec4 tempi = ivec4(0); +float tempResultf; +int tempResulti; +ivec4 ARi = ivec4(0); +bool predResult = true; +bool activeMaskStack[3]; +bool activeMaskStackC[4]; +activeMaskStack[0] = false; +activeMaskStack[1] = false; +activeMaskStackC[0] = false; +activeMaskStackC[1] = false; +activeMaskStackC[2] = false; +activeMaskStack[0] = true; +activeMaskStackC[0] = true; +activeMaskStackC[1] = true; +vec3 cubeMapSTM; +int cubeMapFaceId; +R0i = floatBitsToInt(passParameterSem0); +R1i = floatBitsToInt(passParameterSem5); +R2i = floatBitsToInt(passParameterSem6); +if( activeMaskStackC[1] == true ) { +R3i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R4i.x = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R4i.z = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.zw)).x); +R4i.w = floatBitsToInt(texture(textureUnitPS5, intBitsToFloat(R0i.xy)).x); +R5i.xyzw = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R2i.zw)).xyzw); +R2i.z = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R2i.zw)).w); +} +if( activeMaskStackC[1] == true ) { +// 0 +R127i.x = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R4i.x)) + uf_blockPS1[14].x)); +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R3i.w),uf_blockPS1[16].x) + uf_blockPS1[14].x)); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R4i.w)) + uf_blockPS1[14].x)); +PV0i.z = R123i.z; +R127i.w = floatBitsToInt((mul_nonIEEE(uf_blockPS1[16].x,intBitsToFloat(R4i.z)) + uf_blockPS1[14].x)); +PV0i.w = R127i.w; +R124i.x = floatBitsToInt((intBitsToFloat(R5i.x) * 2.0 + -(1.0))); +PS0i = R124i.x; +// 1 +backupReg0i = R1i.x; +backupReg1i = R1i.y; +R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.z), -(intBitsToFloat(PV0i.y)))); +PV1i.x = R1i.x; +R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R0i.w), -(intBitsToFloat(PV0i.y)))); +R0i.z = floatBitsToInt(-(intBitsToFloat(PV0i.z))); +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), -(intBitsToFloat(PV0i.w)))); +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg1i), -(intBitsToFloat(PV0i.w)))); +PS1i = R127i.z; +// 2 +PV0i.x = floatBitsToInt(-(intBitsToFloat(R127i.w))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), -(intBitsToFloat(R127i.x)))); +PV0i.z = floatBitsToInt(-(intBitsToFloat(R127i.x))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.w), -(intBitsToFloat(R127i.x)))); +R126i.x = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + intBitsToFloat(PV1i.w)); +PS0i = R126i.x; +// 3 +R127i.x = floatBitsToInt(-(intBitsToFloat(R1i.y)) + intBitsToFloat(PV0i.w)); +PV1i.x = R127i.x; +R126i.y = floatBitsToInt(-(intBitsToFloat(R1i.y)) + intBitsToFloat(R127i.z)); +PV1i.y = R126i.y; +R127i.zwy = floatBitsToInt(vec3(-(intBitsToFloat(R1i.x)),-(intBitsToFloat(R0i.z)),-(intBitsToFloat(R0i.z))) + vec3(intBitsToFloat(PV0i.y),intBitsToFloat(PV0i.x),intBitsToFloat(PV0i.z))); +PV1i.z = R127i.z; +PV1i.w = R127i.w; +PS1i = R127i.y; +// 4 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(PV1i.z))); +R125i.y = floatBitsToInt((intBitsToFloat(R5i.y) * 2.0 + -(1.0))); +R125i.z = floatBitsToInt((intBitsToFloat(R5i.z) * 2.0 + -(1.0))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(PS1i))); +R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.x), intBitsToFloat(PV1i.x))); +PS0i = R125i.x; +// 5 +backupReg0i = R127i.y; +R2i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.x)),intBitsToFloat(R127i.w)) + intBitsToFloat(PV0i.w))); +R127i.y = floatBitsToInt(intBitsToFloat(R5i.w) * intBitsToFloat(0x437f0000)); +R126i.z = floatBitsToInt(intBitsToFloat(R2i.z) * intBitsToFloat(0x437f0000)); +PV1i.w = floatBitsToInt(uf_blockPS6[53].z * intBitsToFloat(0x3d4ccccd)); +R2i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R126i.x)) + intBitsToFloat(PV0i.x))); +PS1i = R2i.y; +// 6 +R12i.x = floatBitsToInt((-(intBitsToFloat(R0i.z)) * intBitsToFloat(0x3d4ccccd) + -(intBitsToFloat(PV1i.w)))); +R12i.x = clampFI32(R12i.x); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.z), intBitsToFloat(R125i.z))); +R1i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R127i.z)),intBitsToFloat(R126i.y)) + intBitsToFloat(R125i.x))); +R0i.w = 0x3f800000; +R2i.z = floatBitsToInt(mul_nonIEEE(-(intBitsToFloat(R0i.z)), uf_blockPS1[17].y)); +PS0i = R2i.z; +// 7 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R124i.x),intBitsToFloat(R125i.y),intBitsToFloat(PV0i.y),-0.0),vec4(intBitsToFloat(R124i.x),intBitsToFloat(R125i.y),1.0,0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R127i.w = tempi.x; +PS1i = int(intBitsToFloat(R127i.y)); +// 8 +tempi.x = floatBitsToInt(dot(vec4(-(intBitsToFloat(R2i.x)),-(intBitsToFloat(R2i.y)),-(intBitsToFloat(R1i.z)),-0.0),vec4(-(intBitsToFloat(R2i.x)),-(intBitsToFloat(R2i.y)),-(intBitsToFloat(R1i.z)),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R127i.y = tempi.x; +PS0i = PS1i & int(1); +// 9 +R5i.z = ((PS0i == 0)?(0):(0x3f800000)); +PS1i = int(intBitsToFloat(R126i.z)); +// 10 +R125i.x = PS1i & 0x00000002; +tempResultf = 1.0 / sqrt(intBitsToFloat(R127i.w)); +PS0i = floatBitsToInt(tempResultf); +// 11 +R9i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R124i.x), intBitsToFloat(PS0i))); +R10i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.y), intBitsToFloat(PS0i))); +R10i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.z), intBitsToFloat(PS0i))); +tempResultf = 1.0 / sqrt(intBitsToFloat(R127i.y)); +R1i.w = floatBitsToInt(tempResultf); +PS1i = R1i.w; +// 12 +R4i.w = floatBitsToInt(float(R125i.x)); +R4i.w = floatBitsToInt(intBitsToFloat(R4i.w) / 2.0); +PS0i = R4i.w; +} +if( activeMaskStackC[1] == true ) { +activeMaskStack[1] = activeMaskStack[0]; +activeMaskStackC[2] = activeMaskStackC[1]; +// 0 +R5i.x = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].x, uf_blockPS10[2].w)); +R9i.y = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].y, uf_blockPS10[2].w)); +// 1 +R4i.z = floatBitsToInt(mul_nonIEEE(uf_blockPS6[4].z, uf_blockPS10[2].w)); +R9i.w = 0; +// 2 +predResult = (1.0 > intBitsToFloat(R12i.x)); +activeMaskStack[1] = predResult; +activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true; +} +else { +activeMaskStack[1] = false; +activeMaskStackC[2] = false; +} +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = floatBitsToInt(intBitsToFloat(R9i.x) * 1.5); +PV0i.y = floatBitsToInt(intBitsToFloat(R10i.y) * 1.5); +R127i.z = ((-(intBitsToFloat(R0i.z)) > uf_blockPS1[58].y)?int(0xFFFFFFFF):int(0x0)); +PV0i.w = ((-(intBitsToFloat(R0i.z)) > uf_blockPS1[58].x)?int(0xFFFFFFFF):int(0x0)); +PS0i = floatBitsToInt(intBitsToFloat(R10i.z) * 1.5); +// 1 +backupReg0i = R2i.x; +backupReg1i = R2i.z; +R2i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R1i.w)) + intBitsToFloat(PV0i.x))); +PV1i.y = PV0i.w & int(1); +R2i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R2i.y)),intBitsToFloat(R1i.w)) + intBitsToFloat(PV0i.y))); +R2i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.z)),intBitsToFloat(R1i.w)) + intBitsToFloat(PS0i))); +R122i.x = floatBitsToInt((intBitsToFloat(backupReg1i) * 0.25 + 1.0)); +PS1i = R122i.x; +// 2 +R4i.x = PV1i.y - R127i.z; +PV0i.x = R4i.x; +R5i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R9i.x),intBitsToFloat(R4i.w)) + intBitsToFloat(R1i.x))); +R3i.z = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R3i.w = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +R4i.y = floatBitsToInt(intBitsToFloat(0x3da22222) * intBitsToFloat(PS1i)); +PS0i = R4i.y; +// 3 +backupReg0i = R4i.w; +backupReg1i = R0i.z; +R3i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.y),intBitsToFloat(R4i.w)) + intBitsToFloat(R1i.y))); +R3i.y = floatBitsToInt(uf_blockPS6[53].y); +R3i.y = floatBitsToInt(intBitsToFloat(R3i.y) / 2.0); +PV1i.z = PV0i.x << 0x00000002; +R4i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R10i.z),intBitsToFloat(backupReg0i)) + intBitsToFloat(backupReg1i))); +R127i.y = floatBitsToInt(float(PV0i.x)); +PS1i = R127i.y; +// 4 +R1i.x = PV1i.z + 0x0000002b; +R1i.y = PV1i.z + 0x0000002a; +R1i.z = PV1i.z + 0x0000002d; +R1i.w = PV1i.z + 0x0000002c; +R5i.w = floatBitsToInt(uf_blockPS6[53].x); +R5i.w = floatBitsToInt(intBitsToFloat(R5i.w) / 2.0); +PS0i = R5i.w; +// 5 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.z),intBitsToFloat(R2i.w),-0.0),vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.z),intBitsToFloat(R2i.w),0.0))); +PV1i.x = tempi.x; +PV1i.y = tempi.x; +PV1i.z = tempi.x; +PV1i.w = tempi.x; +R2i.y = tempi.x; +R9i.z = floatBitsToInt(roundEven(intBitsToFloat(R127i.y))); +PS1i = R9i.z; +} +if( activeMaskStackC[2] == true ) { +R6i.xyzw = floatBitsToInt(uf_blockPS1[R1i.z].xyzw); +R7i.xyzw = floatBitsToInt(uf_blockPS1[R1i.w].xyzw); +R8i.xyzw = floatBitsToInt(uf_blockPS1[R1i.y].xyzw); +R1i.xyzw = floatBitsToInt(uf_blockPS1[R1i.x].xyzw); +} +if( activeMaskStackC[2] == true ) { +// 0 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R9i.x),intBitsToFloat(R10i.y),intBitsToFloat(R10i.z),intBitsToFloat(R10i.z)),vec4(-(intBitsToFloat(R5i.x)),-(intBitsToFloat(R9i.y)),-(intBitsToFloat(R4i.z)),-(intBitsToFloat(R9i.w))))); +tempi.x = clampFI32(tempi.x); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R126i.z = tempi.x; +tempResultf = 1.0 / sqrt(intBitsToFloat(R2i.y)); +PS0i = floatBitsToInt(tempResultf); +// 1 +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(PS0i))); +PV1i.x = R127i.x; +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(PS0i))); +PV1i.y = R127i.y; +R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.w), intBitsToFloat(PS0i))); +PV1i.z = R127i.z; +R127i.w = floatBitsToInt(-(intBitsToFloat(R3i.y))); +R2i.z = R9i.z; +PS1i = R2i.z; +// 2 +tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R5i.x),intBitsToFloat(R9i.y),intBitsToFloat(R4i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0))); +PV0i.x = tempi.x; +PV0i.y = tempi.x; +PV0i.z = tempi.x; +PV0i.w = tempi.x; +R125i.y = floatBitsToInt(-(intBitsToFloat(R5i.w))); +PS0i = R125i.y; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R4i.z)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.z))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R9i.y)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.y))); +PV1i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(PV0i.x)),intBitsToFloat(PV0i.x)) + 1.0)); +PV1i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R5i.x)),intBitsToFloat(PV0i.x)) + intBitsToFloat(R127i.x))); +PV1i.w = R123i.w; +R126i.x = R3i.y; +PS1i = R126i.x; +// 4 +backupReg0i = R126i.z; +R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(R3i.z))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(R4i.y))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(R3i.w))); +PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(backupReg0i))); +R10i.z = R9i.z; +PS0i = R10i.z; +// 5 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.z), intBitsToFloat(PV0i.w))); +R11i.z = R9i.z; +// 6 +R5i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(PV1i.x)) + intBitsToFloat(R5i.y))); +PV0i.x = R5i.x; +R5i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.z),intBitsToFloat(PV1i.x)) + intBitsToFloat(R3i.x))); +R0i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(PV1i.x)) + intBitsToFloat(R4i.w))); +// 7 +PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R7i.x))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R6i.x))); +R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(R8i.x))); +// 8 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R6i.y)) + intBitsToFloat(PV1i.y))); +PV0i.x = R123i.x; +R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R7i.y)) + intBitsToFloat(PV1i.x))); +PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(R1i.x))); +// 9 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R8i.y)) + intBitsToFloat(R126i.z))); +PV1i.x = R123i.x; +R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R1i.y)) + intBitsToFloat(PV0i.z))); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R6i.z)) + intBitsToFloat(PV0i.x))); +PV1i.w = R123i.w; +// 10 +backupReg0i = R0i.z; +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R8i.z)) + intBitsToFloat(PV1i.x))); +PV0i.x = R123i.x; +PV0i.z = floatBitsToInt(intBitsToFloat(R6i.w) + intBitsToFloat(PV1i.w)); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(R7i.z)) + intBitsToFloat(R127i.y))); +PV0i.w = R123i.w; +// 11 +backupReg0i = R0i.z; +PV1i.x = floatBitsToInt(intBitsToFloat(R8i.w) + intBitsToFloat(PV0i.x)); +PV1i.z = floatBitsToInt(intBitsToFloat(R7i.w) + intBitsToFloat(PV0i.w)); +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(R1i.z)) + intBitsToFloat(R126i.y))); +PV1i.w = R123i.w; +R126i.y = floatBitsToInt(1.0 / intBitsToFloat(PV0i.z)); +PS1i = R126i.y; +// 12 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(PS1i))); +R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(PS1i))); +PV0i.y = R127i.y; +PV0i.z = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(PV1i.w)); +// 13 +R127i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(0xbb03126f)); +R127i.x = clampFI32(R127i.x); +PV1i.x = R127i.x; +R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(R126i.y))); +PV1i.w = R126i.w; +R9i.x = floatBitsToInt((uf_blockPS6[53].x * 0.5 + intBitsToFloat(PV0i.y))); +PS1i = R9i.x; +// 14 +R2i.x = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(R5i.w)); +R9i.y = floatBitsToInt((uf_blockPS6[53].y * 0.5 + intBitsToFloat(PV1i.w))); +R9i.w = PV1i.x; +R2i.y = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R127i.w)); +PS0i = R2i.y; +// 15 +R10i.x = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(R125i.y)); +R10i.y = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(R126i.x)); +R2i.w = R127i.x; +R10i.w = R127i.x; +PS1i = R10i.w; +// 16 +R11i.x = floatBitsToInt((-(uf_blockPS6[53].x) * 0.5 + intBitsToFloat(R127i.y))); +R11i.y = floatBitsToInt((-(uf_blockPS6[53].y) * 0.5 + intBitsToFloat(R126i.w))); +R11i.w = R127i.x; +} +if( activeMaskStackC[2] == true ) { +R9i.y = floatBitsToInt(textureShadow_1(textureUnitPS7, vec4(intBitsToFloat(R9i.x),intBitsToFloat(R9i.y),intBitsToFloat(R9i.z),intBitsToFloat(R9i.w)))); +R2i.x = floatBitsToInt(textureShadow_2(textureUnitPS7, vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.y),intBitsToFloat(R2i.z),intBitsToFloat(R2i.w)))); +R10i.w = floatBitsToInt(textureShadow_3(textureUnitPS7, vec4(intBitsToFloat(R10i.x),intBitsToFloat(R10i.y),intBitsToFloat(R10i.z),intBitsToFloat(R10i.w)))); +R11i.z = floatBitsToInt(textureShadow_4(textureUnitPS7, vec4(intBitsToFloat(R11i.x),intBitsToFloat(R11i.y),intBitsToFloat(R11i.z),intBitsToFloat(R11i.w)))); +} +if( activeMaskStackC[2] == true ) { +activeMaskStack[2] = activeMaskStack[1]; +activeMaskStackC[3] = activeMaskStackC[2]; +// 0 +PV0i.z = floatBitsToInt(intBitsToFloat(R9i.y) + intBitsToFloat(R2i.x)); +PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0); +// 1 +R123i.y = floatBitsToInt((intBitsToFloat(R10i.w) * 0.5 + intBitsToFloat(PV0i.z))); +PV1i.y = R123i.y; +// 2 +R0i.w = floatBitsToInt((intBitsToFloat(R11i.z) * 0.5 + intBitsToFloat(PV1i.y))/2.0); +PV0i.w = R0i.w; +// 3 +PV1i.x = ((1.0 > intBitsToFloat(PV0i.w))?int(0xFFFFFFFF):int(0x0)); +// 4 +R1i.z = ((R4i.x > 0)?(PV1i.x):(0)); +// 5 +predResult = (R1i.z != 0); +activeMaskStack[2] = predResult; +activeMaskStackC[3] = predResult == true && activeMaskStackC[2] == true; +} +else { +activeMaskStack[2] = false; +activeMaskStackC[3] = false; +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.x = int(-1) + R4i.x; +// 1 +PV1i.w = PV0i.x << 0x00000002; +PS1i = floatBitsToInt(float(PV0i.x)); +// 2 +R1i.x = PV1i.w + 0x0000002c; +R1i.y = PV1i.w + 0x0000002a; +R1i.z = PV1i.w + 0x0000002b; +R1i.w = PV1i.w + 0x0000002d; +R5i.z = floatBitsToInt(roundEven(intBitsToFloat(PS1i))); +PS0i = R5i.z; +} +if( activeMaskStackC[3] == true ) { +R2i.xyzw = floatBitsToInt(uf_blockPS1[R1i.w].xyzw); +R3i.xyzw = floatBitsToInt(uf_blockPS1[R1i.x].xyzw); +R4i.xyzw = floatBitsToInt(uf_blockPS1[R1i.y].xyzw); +R1i.xyzw = floatBitsToInt(uf_blockPS1[R1i.z].xyzw); +} +if( activeMaskStackC[3] == true ) { +// 0 +PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(R3i.x))); +PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(R2i.x))); +// 1 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R3i.y)) + intBitsToFloat(PV0i.x))); +PV1i.x = R123i.x; +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(R4i.x))); +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R2i.y)) + intBitsToFloat(PV0i.y))); +PV1i.z = R123i.z; +PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.x), intBitsToFloat(R1i.x))); +// 2 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R2i.z)) + intBitsToFloat(PV1i.z))); +PV0i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R1i.y)) + intBitsToFloat(PV1i.w))); +PV0i.y = R123i.y; +R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R4i.y)) + intBitsToFloat(PV1i.y))); +PV0i.z = R123i.z; +R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R3i.z)) + intBitsToFloat(PV1i.x))); +PV0i.w = R123i.w; +// 3 +R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R4i.z)) + intBitsToFloat(PV0i.z))); +PV1i.x = R123i.x; +R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.z),intBitsToFloat(R1i.z)) + intBitsToFloat(PV0i.y))); +PV1i.y = R123i.y; +R127i.z = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV0i.w)); +PV1i.w = floatBitsToInt(intBitsToFloat(R2i.w) + intBitsToFloat(PV0i.x)); +// 4 +PV0i.x = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(PV1i.y)); +PV0i.w = floatBitsToInt(intBitsToFloat(R4i.w) + intBitsToFloat(PV1i.x)); +PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.w)); +// 5 +R5i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(PS0i))); +PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.z), intBitsToFloat(PS0i))); +R5i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(PS0i))); +PS1i = R5i.y; +// 6 +R5i.w = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(0xbb03126f)); +R5i.w = clampFI32(R5i.w); +} +if( activeMaskStackC[3] == true ) { +R5i.y = floatBitsToInt(textureShadow_5(textureUnitPS7, vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(R5i.z),intBitsToFloat(R5i.w)))); +} +if( activeMaskStackC[3] == true ) { +// 0 +backupReg0i = R0i.w; +R0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R5i.y))); +} +activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true; +if( activeMaskStackC[2] == true ) { +// 0 +PV0i.x = floatBitsToInt(-(intBitsToFloat(R0i.w)) + 1.0); +// 1 +backupReg0i = R0i.w; +R0i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.x),intBitsToFloat(R12i.x)) + intBitsToFloat(backupReg0i))); +} +activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; +if( activeMaskStackC[1] == true ) { +R0i.y = floatBitsToInt(texture(textureUnitPS12, intBitsToFloat(R0i.xy)).y); +} +if( activeMaskStackC[1] == true ) { +// 0 +R0i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R0i.w),uf_blockPS10[3].z) + uf_blockPS10[1].y)); +R0i.x = clampFI32(R0i.x); +R0i.z = 0x3f800000; +} +// export +passPixelColor5 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.z)); +} diff --git a/Workarounds/BreathOfTheWild_!Intel_Shadows/rules.txt b/Workarounds/BreathOfTheWild_!Intel_Shadows/rules.txt new file mode 100644 index 00000000..9e056c0f --- /dev/null +++ b/Workarounds/BreathOfTheWild_!Intel_Shadows/rules.txt @@ -0,0 +1,11 @@ +[Definition] +titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 +name = Shadows workaround for Intel iGPUs (Vulkan and Intel) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/Intel GPU Shadows (Vulkan)" +description = Reduces the severity of the bugged shadows on Intel GPUs when using Vulkan. +vendorFilter = intel +rendererFilter = vulkan +version = 4 + +# Made by ethrillo +# Updated by Cypher to support BotW 1.4.0+ diff --git a/Workarounds/BreathOfTheWild_!ShadowFix/09085793b5a9f364_00001ffe492e9249_ps.txt b/Workarounds/BreathOfTheWild_!ShadowFix/09085793b5a9f364_00001ffe492e9249_ps.txt index ca874969..f8b86200 100644 --- a/Workarounds/BreathOfTheWild_!ShadowFix/09085793b5a9f364_00001ffe492e9249_ps.txt +++ b/Workarounds/BreathOfTheWild_!ShadowFix/09085793b5a9f364_00001ffe492e9249_ps.txt @@ -1,32 +1,49 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader d2cb8f8abc8a00bc -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 12) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 13) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 14) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30fe6000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x2448b000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform samplerCubeArray textureUnitPS6;// Tex6 addr 0x3db62800 res 64x64x1 dim 3 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x6) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2DArray textureUnitPS7;// Tex7 addr 0xf58a8000 res 360x360x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler7 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 10) uniform sampler2D textureUnitPS10;// Tex10 addr 0x3da22000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler10 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0x3db3e800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 6 6 6 border: 2 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0x30fe8000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 1 1 1 border: 1 -layout(binding = 16) uniform sampler2D textureUnitPS16;// Tex16 addr 0x3db87000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 3) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 4) uniform samplerCubeArray textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 5) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(10, 1, 6) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 7) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(14, 1, 8) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 9) uniform sampler2D textureUnitPS15; +TEXTURE_LAYOUT(16, 1, 10) uniform sampler2D textureUnitPS16; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem5; @@ -34,7 +51,14 @@ layout(location = 3) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 2) out vec4 passPixelColor2; +#ifdef VULKAN +layout(set = 1, binding = 11) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 diff --git a/Workarounds/BreathOfTheWild_!ShadowFix/45e72a252caba763_000003c000009269_ps.txt b/Workarounds/BreathOfTheWild_!ShadowFix/45e72a252caba763_000003c000009269_ps.txt index 383c6e01..05a88c35 100644 --- a/Workarounds/BreathOfTheWild_!ShadowFix/45e72a252caba763_000003c000009269_ps.txt +++ b/Workarounds/BreathOfTheWild_!ShadowFix/45e72a252caba763_000003c000009269_ps.txt @@ -1,32 +1,56 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader cbbcf83b05c6d921 -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 7) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 8) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 9) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x30fe6800 res 32x32x1 dim 1 tm: 2 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2DArray textureUnitPS7;// Tex7 addr 0xf557c800 res 720x720x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler7 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0x30fe8000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 1 1 1 border: 1 +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(14, 1, 5) uniform sampler2D textureUnitPS14; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem6; layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Workarounds/BreathOfTheWild_!ShadowFix/59cba7eb9a9c1df6_00000007f924d249_ps.txt b/Workarounds/BreathOfTheWild_!ShadowFix/59cba7eb9a9c1df6_00000007f924d249_ps.txt index 467ba550..a7d568a1 100644 --- a/Workarounds/BreathOfTheWild_!ShadowFix/59cba7eb9a9c1df6_00000007f924d249_ps.txt +++ b/Workarounds/BreathOfTheWild_!ShadowFix/59cba7eb9a9c1df6_00000007f924d249_ps.txt @@ -1,37 +1,61 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 9c98a67271f8cc75 -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 10) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 11) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 12) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30fe6000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x2448b000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2DArray textureUnitPS7;// Tex7 addr 0xf58a8000 res 360x360x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler7 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 10) uniform sampler2D textureUnitPS10;// Tex10 addr 0x3da22000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler10 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 11) uniform sampler2D textureUnitPS11;// Tex11 addr 0x3db3e800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler11 ClampX/Y/Z: 6 6 6 border: 2 -layout(binding = 14) uniform sampler2D textureUnitPS14;// Tex14 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler14 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0x30fe8000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 1 1 1 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 2) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 3) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 4) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(10, 1, 5) uniform sampler2D textureUnitPS10; +TEXTURE_LAYOUT(11, 1, 6) uniform sampler2D textureUnitPS11; +TEXTURE_LAYOUT(14, 1, 7) uniform sampler2D textureUnitPS14; +TEXTURE_LAYOUT(15, 1, 8) uniform sampler2D textureUnitPS15; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem5; layout(location = 3) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; +#ifdef VULKAN +layout(set = 1, binding = 9) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Workarounds/BreathOfTheWild_!ShadowFix/808ba0411f6f526e_0000007ff9249a49_ps.txt b/Workarounds/BreathOfTheWild_!ShadowFix/808ba0411f6f526e_0000007ff9249a49_ps.txt index d4929cc6..09e04fe4 100644 --- a/Workarounds/BreathOfTheWild_!ShadowFix/808ba0411f6f526e_0000007ff9249a49_ps.txt +++ b/Workarounds/BreathOfTheWild_!ShadowFix/808ba0411f6f526e_0000007ff9249a49_ps.txt @@ -1,30 +1,47 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader a73d770e3204e2e6 -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 10) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 11) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 12) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30fe6000 res 64x64x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x7) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 4) uniform sampler2D textureUnitPS4;// Tex4 addr 0x2448b000 res 1024x1024x1 dim 1 tm: 4 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0xb) sliceView: 0x0 (num 0x1) Sampler4 ClampX/Y/Z: 0 0 0 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2DArray textureUnitPS6;// Tex6 addr 0xf58a8000 res 360x360x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler6 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 9) uniform sampler2D textureUnitPS9;// Tex9 addr 0x3da22000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler9 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0xf5589800 res 160x90x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 13) uniform sampler2D textureUnitPS13;// Tex13 addr 0x30fe8000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler13 ClampX/Y/Z: 1 1 1 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(4, 1, 3) uniform sampler2D textureUnitPS4; +TEXTURE_LAYOUT(5, 1, 4) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(6, 1, 5) uniform sampler2DArray textureUnitPS6; +TEXTURE_LAYOUT(9, 1, 6) uniform sampler2D textureUnitPS9; +TEXTURE_LAYOUT(12, 1, 7) uniform sampler2D textureUnitPS12; +TEXTURE_LAYOUT(13, 1, 8) uniform sampler2D textureUnitPS13; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem2; layout(location = 2) in vec4 passParameterSem5; @@ -32,7 +49,14 @@ layout(location = 3) in vec4 passParameterSem6; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; layout(location = 2) out vec4 passPixelColor2; +#ifdef VULKAN +layout(set = 1, binding = 9) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Workarounds/BreathOfTheWild_!ShadowFix/88133ee405eaae28_000003c000009269_ps.txt b/Workarounds/BreathOfTheWild_!ShadowFix/88133ee405eaae28_000003c000009269_ps.txt index 910ead73..68f0bc61 100644 --- a/Workarounds/BreathOfTheWild_!ShadowFix/88133ee405eaae28_000003c000009269_ps.txt +++ b/Workarounds/BreathOfTheWild_!ShadowFix/88133ee405eaae28_000003c000009269_ps.txt @@ -1,32 +1,56 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader ffe0e8c84f6e8da9 -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 7) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 8) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 9) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x30fe6800 res 4x4x1 dim 1 tm: 2 format 0007 compSel: 0 0 0 1 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x30fe6800 res 32x32x1 dim 1 tm: 2 format 0034 compSel: 0 0 0 5 mipView: 0x0 (num 0x6) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 2 border: 0 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 6) uniform sampler2D textureUnitPS6;// Tex6 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler6 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 8) uniform sampler2DArray textureUnitPS8;// Tex8 addr 0xf557c800 res 720x720x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler8 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 15) uniform sampler2D textureUnitPS15;// Tex15 addr 0x30fe8000 res 2000x1600x1 dim 1 tm: 4 format 0031 compSel: 0 1 2 3 mipView: 0x0 (num 0x2) sliceView: 0x0 (num 0x1) Sampler15 ClampX/Y/Z: 1 1 1 border: 1 +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(3, 1, 2) uniform sampler2D textureUnitPS3; +TEXTURE_LAYOUT(6, 1, 3) uniform sampler2D textureUnitPS6; +TEXTURE_LAYOUT(8, 1, 4) uniform sampler2DArray textureUnitPS8; +TEXTURE_LAYOUT(15, 1, 5) uniform sampler2D textureUnitPS15; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem6; layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 6) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Workarounds/BreathOfTheWild_!ShadowFix/9c0b7031078fba88_0000007800001269_ps.txt b/Workarounds/BreathOfTheWild_!ShadowFix/9c0b7031078fba88_0000007800001269_ps.txt index 6e0385c7..4e7e52c0 100644 --- a/Workarounds/BreathOfTheWild_!ShadowFix/9c0b7031078fba88_0000007800001269_ps.txt +++ b/Workarounds/BreathOfTheWild_!ShadowFix/9c0b7031078fba88_0000007800001269_ps.txt @@ -1,31 +1,55 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader b8a18eeb20759bfd -layout(binding = 33, std140) uniform uniformBlockPS1 +UNIFORM_BUFFER_LAYOUT(33, 1, 6) uniform uniformBlockPS1 { vec4 uf_blockPS1[1024]; }; -layout(binding = 38, std140) uniform uniformBlockPS6 +UNIFORM_BUFFER_LAYOUT(38, 1, 7) uniform uniformBlockPS6 { vec4 uf_blockPS6[1024]; }; -layout(binding = 42, std140) uniform uniformBlockPS10 +UNIFORM_BUFFER_LAYOUT(42, 1, 8) uniform uniformBlockPS10 { vec4 uf_blockPS10[1024]; }; -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf45c6000 res 1280x720x1 dim 1 tm: 4 format 041a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 5) uniform sampler2D textureUnitPS5;// Tex5 addr 0xf5371000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler5 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 7) uniform sampler2DArray textureUnitPS7;// Tex7 addr 0xf557c800 res 720x720x3 dim 5 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x3) Sampler7 ClampX/Y/Z: 6 6 2 border: 2 -layout(binding = 12) uniform sampler2D textureUnitPS12;// Tex12 addr 0x39659800 res 4x4x1 dim 1 tm: 2 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler12 ClampX/Y/Z: 2 2 2 border: 1 +TEXTURE_LAYOUT(1, 1, 0) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 1) uniform sampler2D textureUnitPS2; +TEXTURE_LAYOUT(5, 1, 2) uniform sampler2D textureUnitPS5; +TEXTURE_LAYOUT(7, 1, 3) uniform sampler2DArray textureUnitPS7; +TEXTURE_LAYOUT(12, 1, 4) uniform sampler2D textureUnitPS12; layout(location = 0) in vec4 passParameterSem0; layout(location = 1) in vec4 passParameterSem5; layout(location = 2) in vec4 passParameterSem6; layout(location = 5) out vec4 passPixelColor5; +#ifdef VULKAN +layout(set = 1, binding = 5) uniform ufBlock +{ +uniform vec4 uf_fragCoordScale; +}; +#else uniform vec2 uf_fragCoordScale; +#endif int clampFI32(int v) { if( v == 0x7FFFFFFF ) diff --git a/Workarounds/BreathOfTheWild_!ShadowFix/rules.txt b/Workarounds/BreathOfTheWild_!ShadowFix/rules.txt index f3a8b7c6..7da875d1 100644 --- a/Workarounds/BreathOfTheWild_!ShadowFix/rules.txt +++ b/Workarounds/BreathOfTheWild_!ShadowFix/rules.txt @@ -1,9 +1,10 @@ [Definition] titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "AMD and Intel Shadows Workaround" -path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds/AMD and Intel: Shadows" -description = Fixes shadows when using an AMD or Intel graphics card. -version = 3 +name = Shadows workaround for Intel and AMD GPUs (OpenGL and Intel/AMD) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds for OpenGL/AMD and Intel: Shadows" +description = Reduces the severity of the bugged shadows on Intel and OpenGL GPUs when using OpenGL. +rendererFilter = opengl +version = 4 # Made by ethrillo # Updated by Cypher to support BotW 1.4.0+ diff --git a/Workarounds/BreathOfTheWild_AMD_ShaderCrash/rules.txt b/Workarounds/BreathOfTheWild_AMD_ShaderCrash/rules.txt index bff7d6ca..f1bcf39a 100644 --- a/Workarounds/BreathOfTheWild_AMD_ShaderCrash/rules.txt +++ b/Workarounds/BreathOfTheWild_AMD_ShaderCrash/rules.txt @@ -1,8 +1,8 @@ [Definition] titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "Workaround for AMD crashes" -path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds/AMD Crash (OpenGL)" -description = Workaround for a shader related crash on AMD drivers. Required for Cemu 1.15.8 and above. -vendorFilter=amd -rendererFilter=opengl +name = Crash workaround for AMD GPUs (OpenGL and AMD) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds for OpenGL/AMD: Crash" +description = Workaround for a shader related crash on AMD when using OpenGL. Required for Cemu 1.15.8 and above. +vendorFilter = amd +rendererFilter = opengl version = 4 diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/1c7db40ff5d693ab_001ffffe4924b249_ps.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/1c7db40ff5d693ab_001ffffe4924b249_ps.txt similarity index 100% rename from Workarounds/BreathOfTheWild_Intel_RemoveBloom/1c7db40ff5d693ab_001ffffe4924b249_ps.txt rename to Workarounds/BreathOfTheWild_Intel_ExcessBloom/1c7db40ff5d693ab_001ffffe4924b249_ps.txt diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/250cb5a06cab6534_000000000000007a_ps.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/250cb5a06cab6534_000000000000007a_ps.txt similarity index 100% rename from Workarounds/BreathOfTheWild_Intel_RemoveBloom/250cb5a06cab6534_000000000000007a_ps.txt rename to Workarounds/BreathOfTheWild_Intel_ExcessBloom/250cb5a06cab6534_000000000000007a_ps.txt diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/29c30aaa023dc7e6_0000000000000709_ps.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/29c30aaa023dc7e6_0000000000000709_ps.txt similarity index 100% rename from Workarounds/BreathOfTheWild_Intel_RemoveBloom/29c30aaa023dc7e6_0000000000000709_ps.txt rename to Workarounds/BreathOfTheWild_Intel_ExcessBloom/29c30aaa023dc7e6_0000000000000709_ps.txt diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/3179b85d41bfb80d_0000000079249749_ps.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/3179b85d41bfb80d_0000000079249749_ps.txt similarity index 100% rename from Workarounds/BreathOfTheWild_Intel_RemoveBloom/3179b85d41bfb80d_0000000079249749_ps.txt rename to Workarounds/BreathOfTheWild_Intel_ExcessBloom/3179b85d41bfb80d_0000000079249749_ps.txt diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/3df0bb0da1c740d5_000000000000001c_ps.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/3df0bb0da1c740d5_000000000000001c_ps.txt similarity index 100% rename from Workarounds/BreathOfTheWild_Intel_RemoveBloom/3df0bb0da1c740d5_000000000000001c_ps.txt rename to Workarounds/BreathOfTheWild_Intel_ExcessBloom/3df0bb0da1c740d5_000000000000001c_ps.txt diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/59cba7eb9a9c1df6_00000007f924d249_ps.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/59cba7eb9a9c1df6_00000007f924d249_ps.txt similarity index 100% rename from Workarounds/BreathOfTheWild_Intel_RemoveBloom/59cba7eb9a9c1df6_00000007f924d249_ps.txt rename to Workarounds/BreathOfTheWild_Intel_ExcessBloom/59cba7eb9a9c1df6_00000007f924d249_ps.txt diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/8d24f32f18e6de47_0000000079249749_ps.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/8d24f32f18e6de47_0000000079249749_ps.txt similarity index 100% rename from Workarounds/BreathOfTheWild_Intel_RemoveBloom/8d24f32f18e6de47_0000000079249749_ps.txt rename to Workarounds/BreathOfTheWild_Intel_ExcessBloom/8d24f32f18e6de47_0000000079249749_ps.txt diff --git a/Workarounds/BreathOfTheWild_Intel_ExcessBloom/rules.txt b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/rules.txt new file mode 100644 index 00000000..037ef044 --- /dev/null +++ b/Workarounds/BreathOfTheWild_Intel_ExcessBloom/rules.txt @@ -0,0 +1,10 @@ +[Definition] +titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 +name = Excess Bloom workaround for Intel GPUs with certain drivers (OpenGL and Intel) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds for OpenGL/Intel: Excess Bloom" +description = This workaround targets users of Intel iGPU drivers 23.xx and older experiencing bloom issue when using OpenGL. These drivers may offer better performance but have graphical glitches. This pack aims to fix the graphical issues so the older drivers create visuals similar to the new drivers. These older drivers may be found on Intel's site https://downloadcenter.intel.com/download/27484/Graphics-Intel-Graphics-Driver-for-Windows-15-65-. +vendorFilter = intel +rendererFilter = opengl +version = 4 + +#Altros diff --git a/Workarounds/BreathOfTheWild_Intel_FlippedLights/rules.txt b/Workarounds/BreathOfTheWild_Intel_FlippedLights/rules.txt index d8fc00ef..436aa961 100644 --- a/Workarounds/BreathOfTheWild_Intel_FlippedLights/rules.txt +++ b/Workarounds/BreathOfTheWild_Intel_FlippedLights/rules.txt @@ -1,10 +1,10 @@ [Definition] titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "Workaround for flipped lights on Intel GPUs with certain drivers" -path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds/Intel Flipped Lights (OpenGL)" -description = This workaround targets users of Intel iGPU drivers 23.xx and older experiencing flipped lighting issues. These drivers may offer better performance but have graphical glitches. This pack aims to fix the graphical issues so the older drivers create visuals similar to the new drivers. These older drivers may be found on Intel's site https://downloadcenter.intel.com/download/27484/Graphics-Intel-Graphics-Driver-for-Windows-15-65-. -vendorFilter=intel -rendererFilter=opengl +name = Flipped Lights workaround for Intel GPUs with certain drivers (OpenGL and Intel) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds for OpenGL/Intel: Flipped Lights" +description = This workaround targets users of Intel iGPU drivers 23.xx and older experiencing flipped lighting issues when using OpenGL. These drivers may offer better performance but have graphical glitches. This pack aims to fix the graphical issues so the older drivers create visuals similar to the new drivers. These older drivers may be found on Intel's site https://downloadcenter.intel.com/download/27484/Graphics-Intel-Graphics-Driver-for-Windows-15-65-. +vendorFilter = intel +rendererFilter = opengl version = 4 #Altros diff --git a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/rules.txt b/Workarounds/BreathOfTheWild_Intel_RemoveBloom/rules.txt deleted file mode 100644 index 1afa2e52..00000000 --- a/Workarounds/BreathOfTheWild_Intel_RemoveBloom/rules.txt +++ /dev/null @@ -1,10 +0,0 @@ -[Definition] -titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "Remove excess bloom on Intel GPUs with certain drivers" -path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds/Intel Remove Excess Bloom (OpenGL)" -description = This workaround targets users of Intel iGPU drivers 23.xx and older experiencing bloom issue. These drivers may offer better performance but have graphical glitches. This pack aims to fix the graphical issues so the older drivers create visuals similar to the new drivers. These older drivers may be found on Intel's site https://downloadcenter.intel.com/download/27484/Graphics-Intel-Graphics-Driver-for-Windows-15-65-. -vendorFilter=intel -rendererFilter=opengl -version = 4 - -#Altros diff --git a/Workarounds/BreathOfTheWild_KakarikoShadows/8e9e804a3cd384c3_00000000000ff259_ps.txt b/Workarounds/BreathOfTheWild_KakarikoShadows/8e9e804a3cd384c3_00000000000ff259_ps.txt index d7efaec6..97e3e40a 100644 --- a/Workarounds/BreathOfTheWild_KakarikoShadows/8e9e804a3cd384c3_00000000000ff259_ps.txt +++ b/Workarounds/BreathOfTheWild_KakarikoShadows/8e9e804a3cd384c3_00000000000ff259_ps.txt @@ -1,17 +1,43 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader 8e9e804a3cd384c3 // Square Shadows Fix - Workaround for the square shadows seen around torches in Kakariko Village // shader dumped from BotW v1.3.1, using Cemu 1.11.1 +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[13]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform samplerCubeArray textureUnitPS2;// Tex2 addr 0x3df6e800 res 3x3x1 dim 3 tm: 2 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x6) Sampler2 ClampX/Y/Z: 6 6 6 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x3df6f800 res 64x64x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[13]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform samplerCubeArray textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 3) uniform sampler2D textureUnitPS3; layout(location = 1) noperspective in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 @@ -135,7 +161,7 @@ bool predResult = true; vec3 cubeMapSTM; int cubeMapFaceId; float cubeMapArrayIndex2 = 0.0; -R0i = floatBitsToInt(vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)); +R0i = floatBitsToInt(GET_FRAGCOORD()); R1i = floatBitsToInt(passParameterSem0); // 0 R6i.x = 0x3f800000; diff --git a/Workarounds/BreathOfTheWild_KakarikoShadows/ab0a485b9ae1bb1e_00000000000ff259_ps.txt b/Workarounds/BreathOfTheWild_KakarikoShadows/ab0a485b9ae1bb1e_00000000000ff259_ps.txt index 2a3fdc91..52194f82 100644 --- a/Workarounds/BreathOfTheWild_KakarikoShadows/ab0a485b9ae1bb1e_00000000000ff259_ps.txt +++ b/Workarounds/BreathOfTheWild_KakarikoShadows/ab0a485b9ae1bb1e_00000000000ff259_ps.txt @@ -1,17 +1,43 @@ #version 420 #extension GL_ARB_texture_gather : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +// This shaders was auto-converted from OpenGL to Cemu. + // shader ab0a485b9ae1bb1e // Square Shadows Fix - Workaround for the square shadows seen around torches in Kakariko Village // shader dumped from BotW v1.4.0, using Cemu 1.11.1 +#ifdef VULKAN +layout(set = 1, binding = 4) uniform ufBlock +{ uniform ivec4 uf_remappedPS[13]; -layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5054000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf494a800 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 2) uniform samplerCubeArray textureUnitPS2;// Tex2 addr 0x3de50000 res 3x3x1 dim 3 tm: 2 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x6) Sampler2 ClampX/Y/Z: 6 6 6 border: 1 -layout(binding = 3) uniform sampler2D textureUnitPS3;// Tex3 addr 0x3de51000 res 64x64x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler3 ClampX/Y/Z: 2 2 2 border: 1 +uniform vec4 uf_fragCoordScale; +}; +#else +uniform ivec4 uf_remappedPS[13]; +uniform vec2 uf_fragCoordScale; +#endif +TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0; +TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1; +TEXTURE_LAYOUT(2, 1, 2) uniform samplerCubeArray textureUnitPS2; +TEXTURE_LAYOUT(3, 1, 3) uniform sampler2D textureUnitPS3; layout(location = 1) noperspective in vec4 passParameterSem0; layout(location = 0) out vec4 passPixelColor0; layout(location = 1) out vec4 passPixelColor1; -uniform vec2 uf_fragCoordScale; +// uf_fragCoordScale was moved to the ufBlock void redcCUBE(vec4 src0, vec4 src1, out vec3 stm, out int faceId) { // stm -> x .. s, y .. t, z .. MajorAxis*2.0 @@ -134,7 +160,7 @@ bool predResult = true; vec3 cubeMapSTM; int cubeMapFaceId; float cubeMapArrayIndex2 = 0.0; -R0i = floatBitsToInt(vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)); +R0i = floatBitsToInt(GET_FRAGCOORD()); R1i = floatBitsToInt(passParameterSem0); // 0 backupReg0i = R0i.y; diff --git a/Workarounds/BreathOfTheWild_KakarikoShadows/rules.txt b/Workarounds/BreathOfTheWild_KakarikoShadows/rules.txt index 8b817bae..260021e7 100644 --- a/Workarounds/BreathOfTheWild_KakarikoShadows/rules.txt +++ b/Workarounds/BreathOfTheWild_KakarikoShadows/rules.txt @@ -1,9 +1,10 @@ [Definition] titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "Square Kakariko Torch Shadows Fix" -path = "The Legend of Zelda: Breath of the Wild/Workarounds/Kakariko Torch Shadows" -description = Workaround for the square shadows seen around torches in Kakariko Village. -version = 3 +name = Kakariko Torch Shadows workaround (OpenGL) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/Kakariko Torch Shadows (OpenGL)" +description = Workaround for the square shadows seen around torches in Kakariko Village when using OpenGL. +rendererFilter = opengl +version = 4 # Workaround for the square shadows seen around torches in Kakariko Village # found by Kiri diff --git a/Workarounds/BreathOfTheWild_LwzxNullCheck/rules.txt b/Workarounds/BreathOfTheWild_LwzxNullCheck/rules.txt index 24cee821..19dc128b 100644 --- a/Workarounds/BreathOfTheWild_LwzxNullCheck/rules.txt +++ b/Workarounds/BreathOfTheWild_LwzxNullCheck/rules.txt @@ -1,6 +1,7 @@ [Definition] titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -path = "The Legend of Zelda: Breath of the Wild/Workarounds/LWZX Crash" -description = You should enable this pack in any circumstance. This workaround fixes crashes that would occur at specific points in the game. +name = LWZX Crash Workaround (OpenGL) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/LWZX Crash (OpenGL)" +description = Should always be enabled, since it has no drawbacks. Technically only fixes crashes when Full sync at GX2DrawDone() isn't enabled. +rendererFilter = opengl version = 4 -rendererFilter=opengl diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/rules.txt b/Workarounds/BreathOfTheWild_NVIDIASmoke/rules.txt deleted file mode 100644 index 619f7c4c..00000000 --- a/Workarounds/BreathOfTheWild_NVIDIASmoke/rules.txt +++ /dev/null @@ -1,11 +0,0 @@ -[Definition] -titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "NVIDIA Explosion Smoke Workaround" -path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds/NVIDIA Explosion Smoke (OpenGL)" -description = Partially fixes thin paper look explosion smoke on NVIDIA when using accurateShaderMul = true. -vendorFilter=nvidia -rendererFilter=opengl -version = 4 - -# A quick found by Rajkosto, Xalphenos, Darkemaste -# Shaders dumped from Cemu 1.10.0f and BotW 1.3.1 diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/17aae2b035ae850c_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/17aae2b035ae850c_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/17aae2b035ae850c_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/17aae2b035ae850c_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/2938a1b3abfdfe49_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/2938a1b3abfdfe49_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/2938a1b3abfdfe49_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/2938a1b3abfdfe49_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/314c2583a1612026_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/314c2583a1612026_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/314c2583a1612026_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/314c2583a1612026_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/344d8b1f7d6f2b8e_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/344d8b1f7d6f2b8e_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/344d8b1f7d6f2b8e_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/344d8b1f7d6f2b8e_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/961cf134642327cc_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/961cf134642327cc_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/961cf134642327cc_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/961cf134642327cc_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/a4f029f0b16e3776_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/a4f029f0b16e3776_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/a4f029f0b16e3776_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/a4f029f0b16e3776_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/b9eeedc9f6628c36_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/b9eeedc9f6628c36_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/b9eeedc9f6628c36_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/b9eeedc9f6628c36_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/ea77e7f80b23e7b7_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/ea77e7f80b23e7b7_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/ea77e7f80b23e7b7_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/ea77e7f80b23e7b7_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_NVIDIASmoke/fc4a738a3df2bcce_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/fc4a738a3df2bcce_0000000000000000_vs.txt similarity index 100% rename from Workarounds/BreathOfTheWild_NVIDIASmoke/fc4a738a3df2bcce_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/fc4a738a3df2bcce_0000000000000000_vs.txt diff --git a/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/rules.txt b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/rules.txt new file mode 100644 index 00000000..eda1d9f9 --- /dev/null +++ b/Workarounds/BreathOfTheWild_Nvidia_ExplosionSmoke/rules.txt @@ -0,0 +1,11 @@ +[Definition] +titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 +name = Explosion Smoke workaround (Nvidia GPU and OpenGL) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds for OpenGL/Nvidia: Explosion Smoke" +description = Workaround for the smoke and explosion particles on Nvidia when using OpenGL and Shader Mul Accuracy is set to true in the game profile. +vendorFilter = nvidia +rendererFilter = opengl +version = 4 + +# A quick found by Rajkosto, Xalphenos, Darkemaste +# Shaders dumped from Cemu 1.10.0f and BotW 1.3.1 diff --git a/Workarounds/BreathOfTheWild_removeStretchedClouds/73ddf96c9094eb92_0000000000000000_vs.txt b/Workarounds/BreathOfTheWild_Nvidia_StretchedClouds/73ddf96c9094eb92_0000000000000000_vs.txt similarity index 97% rename from Workarounds/BreathOfTheWild_removeStretchedClouds/73ddf96c9094eb92_0000000000000000_vs.txt rename to Workarounds/BreathOfTheWild_Nvidia_StretchedClouds/73ddf96c9094eb92_0000000000000000_vs.txt index fd9c8539..d6332931 100644 --- a/Workarounds/BreathOfTheWild_removeStretchedClouds/73ddf96c9094eb92_0000000000000000_vs.txt +++ b/Workarounds/BreathOfTheWild_Nvidia_StretchedClouds/73ddf96c9094eb92_0000000000000000_vs.txt @@ -1,57 +1,72 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable -#extension GL_ARB_shading_language_packing : enable +#ifdef VULKAN +#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation) +#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0 +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw) +#define gl_VertexID gl_VertexIndex +#define gl_InstanceID gl_InstanceIndex +#else +#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location) +#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) +#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation) +#define SET_POSITION(_v) gl_Position = _v +#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw) +#endif +/* This shaders was auto-converted from OpenGL to Cemu. +Conversion output: +*/ + // shader 73ddf96c9094eb92 -uniform vec2 uf_windowSpaceToClipSpaceTransform; -uniform float uf_alphaTestRef; -layout(binding = 6, std140) uniform uniformBlockVS6 +UNIFORM_BUFFER_LAYOUT(6, 0, 2) uniform uniformBlockVS6 { vec4 uf_blockVS6[1024]; }; -layout(binding = 7, std140) uniform uniformBlockVS7 +UNIFORM_BUFFER_LAYOUT(7, 0, 3) uniform uniformBlockVS7 { vec4 uf_blockVS7[1024]; }; -layout(binding = 8, std140) uniform uniformBlockVS8 +UNIFORM_BUFFER_LAYOUT(8, 0, 4) uniform uniformBlockVS8 { vec4 uf_blockVS8[1024]; }; -layout(binding = 11, std140) uniform uniformBlockVS11 +UNIFORM_BUFFER_LAYOUT(11, 0, 5) uniform uniformBlockVS11 { vec4 uf_blockVS11[1024]; }; -layout(binding = 13, std140) uniform uniformBlockVS13 +UNIFORM_BUFFER_LAYOUT(13, 0, 6) uniform uniformBlockVS13 { vec4 uf_blockVS13[1024]; }; -layout(binding = 14, std140) uniform uniformBlockVS14 +UNIFORM_BUFFER_LAYOUT(14, 0, 7) uniform uniformBlockVS14 { vec4 uf_blockVS14[1024]; }; -layout(binding = 40) uniform sampler2D textureUnitVS8;// Tex8 addr 0x3cfaa000 res 256x256x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler26 ClampX/Y/Z: 2 2 2 border: 1 -layout(binding = 45) uniform sampler2D textureUnitVS13;// Tex13 addr 0x3d10f000 res 12x1x1 dim 1 tm: 2 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler31 ClampX/Y/Z: 2 2 2 border: 1 -layout(location = 0) in uvec4 attrDataSem0; -layout(location = 1) in uvec4 attrDataSem1; -layout(location = 2) in uvec4 attrDataSem2; -layout(location = 3) in uvec4 attrDataSem3; -layout(location = 4) in uvec4 attrDataSem4; -layout(location = 5) in uvec4 attrDataSem5; -layout(location = 6) in uvec4 attrDataSem6; -layout(location = 7) in uvec4 attrDataSem7; -layout(location = 8) in uvec4 attrDataSem8; -layout(location = 9) in uvec4 attrDataSem9; -layout(location = 10) in uvec4 attrDataSem10; +TEXTURE_LAYOUT(40, 0, 0) uniform sampler2D textureUnitVS8; +TEXTURE_LAYOUT(45, 0, 1) uniform sampler2D textureUnitVS13; +ATTR_LAYOUT(0, 0) in uvec4 attrDataSem0; +ATTR_LAYOUT(0, 1) in uvec4 attrDataSem1; +ATTR_LAYOUT(0, 2) in uvec4 attrDataSem2; +ATTR_LAYOUT(0, 3) in uvec4 attrDataSem3; +ATTR_LAYOUT(0, 4) in uvec4 attrDataSem4; +ATTR_LAYOUT(0, 5) in uvec4 attrDataSem5; +ATTR_LAYOUT(0, 6) in uvec4 attrDataSem6; +ATTR_LAYOUT(0, 7) in uvec4 attrDataSem7; +ATTR_LAYOUT(0, 8) in uvec4 attrDataSem8; +ATTR_LAYOUT(0, 9) in uvec4 attrDataSem9; +ATTR_LAYOUT(0, 10) in uvec4 attrDataSem10; out gl_PerVertex { vec4 gl_Position; - float gl_PointSize; }; layout(location = 0) out vec4 passParameterSem0; layout(location = 1) out vec4 passParameterSem1; @@ -138,7 +153,7 @@ attrDecoder.w = 0; R5i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), floatBitsToInt(1.0)); attrDecoder = attrDataSem10; attrDecoder = (attrDecoder>>24)|((attrDecoder>>8)&0xFF00)|((attrDecoder<<8)&0xFF0000)|((attrDecoder<<24)); -R11i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w)); +R10i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w)); attrDecoder = attrDataSem9; attrDecoder = (attrDecoder>>24)|((attrDecoder>>8)&0xFF00)|((attrDecoder<<8)&0xFF0000)|((attrDecoder<<24)); R9i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w)); @@ -452,7 +467,8 @@ PV1i.x = R127i.x; R125i.y = floatBitsToInt(intBitsToFloat(PV0i.w) * intBitsToFloat(PS0i)); PV1i.z = floatBitsToInt((0.0 > intBitsToFloat(PV0i.x))?1.0:0.0); PV1i.w = floatBitsToInt((intBitsToFloat(PV0i.x) > 0.0)?1.0:0.0); -tempResultf = log2(uf_blockVS7[114].w); +tempResultf = max(0.0, uf_blockVS7[114].w); +tempResultf = log2(tempResultf); if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; PS1i = floatBitsToInt(tempResultf); // 4 @@ -1977,7 +1993,8 @@ PS1i = R124i.z; PV0i.x = floatBitsToInt(intBitsToFloat(PS1i) * intBitsToFloat(PS1i)); R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(R7i.z)) + intBitsToFloat(PV1i.z))); PV0i.w = R123i.w; -tempResultf = log2(intBitsToFloat(PV1i.y)); +tempResultf = max(0.0, intBitsToFloat(PV1i.y)); +tempResultf = log2(tempResultf); if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; R5i.x = floatBitsToInt(tempResultf); PS0i = R5i.x; @@ -2033,14 +2050,16 @@ R7i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), uf_blockVS13[26].w)); R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.y),intBitsToFloat(PV1i.z)) + intBitsToFloat(0x3fc90da4))); PV0i.z = floatBitsToInt(-(intBitsToFloat(PV1i.y)) + 1.0); R127i.w = floatBitsToInt((mul_nonIEEE(-(uf_blockVS13[38].w),intBitsToFloat(PS1i)) + 1.0)); -tempResultf = log2(intBitsToFloat(PV1i.x)); +tempResultf = max(0.0, intBitsToFloat(PV1i.x)); +tempResultf = log2(tempResultf); if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; PS0i = floatBitsToInt(tempResultf); // 5 PV1i.y = floatBitsToInt(uf_blockVS13[28].y + 1.0); PV1i.z = floatBitsToInt(mul_nonIEEE(uf_blockVS13[38].x, intBitsToFloat(PS0i))); R125i.w = floatBitsToInt((uf_blockVS13[28].y * 1.0 + intBitsToFloat(R8i.x))); -tempResultf = log2(intBitsToFloat(PV0i.z)); +tempResultf = max(0.0, intBitsToFloat(PV0i.z)); +tempResultf = log2(tempResultf); if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F; PS1i = floatBitsToInt(tempResultf); // 6 @@ -2296,7 +2315,7 @@ R4i.z = ((R6i.z == 0)?(R1i.z):(R0i.y)); activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; // export //gl_Position = vec4(intBitsToFloat(R17i.x), intBitsToFloat(R17i.y), intBitsToFloat(R17i.z), intBitsToFloat(R17i.w)); -gl_Position = vec4(0.0); +SET_POSITION(vec4(0.0)); // export passParameterSem0 = vec4(intBitsToFloat(R24i.x), intBitsToFloat(R24i.y), intBitsToFloat(R24i.z), intBitsToFloat(R24i.w)); // export diff --git a/Workarounds/BreathOfTheWild_Nvidia_StretchedClouds/rules.txt b/Workarounds/BreathOfTheWild_Nvidia_StretchedClouds/rules.txt new file mode 100644 index 00000000..bb62bdc2 --- /dev/null +++ b/Workarounds/BreathOfTheWild_Nvidia_StretchedClouds/rules.txt @@ -0,0 +1,8 @@ +[Definition] +titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 +name = Stretched Clouds workaround (Nvidia GPU and OpenGL) +path = "The Legend of Zelda: Breath of the Wild/Workarounds/GPU specific workarounds for OpenGL/Nvidia: Stretched Clouds" +description = Workaround for some low-hanging clouds appearing to be stretched if you're using OpenGL and an Nvidia GPU. +vendorFilter = nvidia +rendererFilter = opengl +version = 4 diff --git a/Workarounds/BreathOfTheWild_removeStretchedClouds/rules.txt b/Workarounds/BreathOfTheWild_removeStretchedClouds/rules.txt deleted file mode 100644 index b394433f..00000000 --- a/Workarounds/BreathOfTheWild_removeStretchedClouds/rules.txt +++ /dev/null @@ -1,6 +0,0 @@ -[Definition] -titleIds = 00050000101C9300,00050000101C9400,00050000101C9500 -name = "Cloud fix" -path = "The Legend of Zelda: Breath of the Wild/Workarounds/Clouds" -description = Workaround for some clouds not rendering correctly -version = 3 \ No newline at end of file diff --git a/docs/v4-converter/README.md b/docs/v4-converter/README.md new file mode 100644 index 00000000..8f2de090 --- /dev/null +++ b/docs/v4-converter/README.md @@ -0,0 +1,39 @@ +#### Script to convert graphic packs from version 3 to version 4 (and make shaders Vulkan compatible) +These scripts can be used to convert graphic packs that contain old shaders that were only meant for OpenGL to shaders that are cross-compatible with both of Cemu's render API's. The script isn't meant for speed or ease-of-use, so read the instructions below if you are planning on doing anything with it. + +#### Setup +First of all, install [Node.js](https://nodejs.org) (use the current version). Then, I would suggest you download a zipped version of the [graphic pack repository code](https://github.com/slashiee/cemu_graphic_packs/archive/master.zip). Extract it somewhere logical, because you'll use this as your working directory. +After that, you need to [download the latest glslang](https://github.com/KhronosGroup/glslang/releases) and put the `glslangValidator.exe` and `spirv-remap.exe` from that zip's `bin` folder into that working directory you made above. The final step here is to copy the `convert-packs.js` and the `verify-graphicPacks.js` into that same working directory. Here's a screenshot of what it should look like at this point: +![working directory](https://i.imgur.com/B2CLjFy.png). + +### The process of converting graphic packs +Before doing anything, there's a few things that should be explained. Let's start with the use-cases for each script. + - The `convert-packs.js` is used to convert the graphic packs to OpenGL. It only uses the available information out of the shader code to predict what these shaders are expected to be in Vulkan and OpenGL if they were made by Cemu. It follows some strict rules that Cemu uses to replicate Cemu's own shaders. However, in rare cases it can be the case that not all of the information is kept intact by the graphic pack authors for this script to replicate it perfectly. + - The `verify-graphicPacks.js` script is used to verify the converted shaders's replication with the actual V4 shaders from Cemu itself. The person who converts the graphic packs will need to make a large shader dump from Cemu, put it in the working directory. If it finds any mistakes in the replication method it'll dump those shaders to the `manual` folder so that you can check the difference between what the shader is supposed to be and what the converted pack was. That way you can correct it's mistakes. + +##### First, use convert-packs.js +So, basically, you'll first want to open the convert-packs.js script and scroll to the bottom. It has two configuration options you'll want to edit, the `filterFolderNames` and the `verboseOutput` (which you should probably ignore) variables. Add the prefix of your game's folder name, for example "BreathOfTheWild", since all of the graphic pack folders that are related to that game use "BreathOfTheWild_GraphicPackName" etc. It'll then ignore all of the graphic packs in those folders. + +Now that you've set it all up, you can open up a command console in that folder and run the script using `node convert-packs.js`. It'll then start doing it's chaotic thing where it shows a bunch of information. Just make sure that there's no "error while compiling this shader" shenanigans. The rest of the warnings can mostly be ignored. Then, wait for it to finish executing (hopefully without any errors from the script itself). If there was an error in the shaders themselves, it should output them in an `error` folder in your working directory. + +If there's an error in any of the shaders, you'll have to debug the shader. Maybe it was the shader itself being wrong or it doing something funky with it's lines that should really be fixed in the shader itself. If you think that the shader doesn't do anything weird, please report it to me via the [Github issue](https://github.com/slashiee/cemu_graphic_packs/issues/408) or via Cemu's Discord in the gfx-packs channel. + +If nothing errored (hurray), you'll now have all of the converted graphic packs in a new folder called `graphicPacks` inside your working directory! See the next two steps with how to continue. + +##### Optionally, use verify-graphicPacks.js +As I've explained in the overview above, this isn't strictly necessary. However, it's highly recommended for games that have many and a lot of edited shaders though! + +The first thing you'll need to make it a shader dump using Cemu 1.16.0 or any newer Cemu version, since you want to match the replicated shaders with the real shaders. This shader dump is easily generated if you already had a big existing shader cache, since you can just enable the shader dump option under Cemu's Debug->Dump menu and load the game with the cache. While loading it'll dump all of the shaders. Otherwise you'll have to try and get as many shaders dumped as you can until you can get the amount of unverified shaders to an acceptable level (this script will make a summary of the shaders that weren't ported correctly at the end). +After you've created a decent dump, move your `dump` folder to your working directory. Make sure that the shaders will be located in `/working_space/dump/shaders/`. After that, you can run the script using `node.js verify-graphicPacks.js`. Make sure that you ran the previous script and the converted packs are still in your `graphicPacks` folder. + +Hopefully you're now satisfied by the amount of shaders that were verified (there's a change that some shaders are just not being used anymore in recent versions and therefor aren't able to be verified). If there was an invalid shader it'll be outputted to the `manual` folder in your graphic pack repository. Then you can keep them side-by-side to compare them, or use something like [Meld](https://meldmerge.org/) to see the exact difference between them. After you manually edited them you want to replace the invalid shader with your manually corrected shader in the `graphicPacks` folder. After all of that, let's go to the next step. + +##### Add the packs +_Just as a small notice for people who want to upload these converted packs to the [community graphic pack repository](https://github.com/slashiee/cemu_graphic_packs), it's very appreciated if you were to use pull requests before merging them directly into the main branch to prevent breaking people their graphic packs and us needing to revert changes and such. Also, please keep it to one game per pull request._ + +Once you've got a set of fully (verified and) converted shaders, you should be able to use the graphic packs from `graphicPacks` in your own Cemu folder! Would probably not hurt checking them with the game themselves obviously! + +If you're gonna contribute to community graphic packs you should just be able to go to your git folder and paste the files from the `graphicPacks` folder in there since it doesn't remove or create files. Just overwrite any existing files. Then, you can start to make a pull request or commit. When making the description of those, please include whether you used the verify-graphicPacks.js script to verify the converted packs, and if yes, which shaders were unverified in the summary and which were invalid (you shouldn't really have any of these ofcourse). + +----- +### Please report any issues with this script via this [Github issue](https://github.com/slashiee/cemu_graphic_packs/issues/408) or via Cemu's Discord server in the #gfx-packs channel. \ No newline at end of file diff --git a/docs/v4-converter/convert-packs.js b/docs/v4-converter/convert-packs.js new file mode 100644 index 00000000..168d19cd --- /dev/null +++ b/docs/v4-converter/convert-packs.js @@ -0,0 +1,610 @@ +const fs = require("fs"); +const path = require("path"); +const child_process = require("child_process"); + +// Main functions + +var manualFixingShaders = 0; +var manualCheckingShaders = 0; + +const crossHeader = [ + // Vulkan + "#ifdef VULKAN\r", + "#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)\r", + "#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)\r", + "#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)\r", + "#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0\r", + "#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)\r", + "#define gl_VertexID gl_VertexIndex", + "#define gl_InstanceID gl_InstanceIndex", + "#else\r", + // OpenGL + "#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)\r", + "#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140) \r", + "#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)\r", + "#define SET_POSITION(_v) gl_Position = _v\r", + "#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)\r", + "#endif\r" +]; + +const samplerTypes = ["sampler1D", "sampler2D", "sampler3D", "samplerCube", "sampler2DRect", "sampler1DArray", "sampler2DArray", "samplerCubeArray","samplerBuffer", "sampler2DMS", "sampler2DMSArray", "sampler1DShadow", "sampler2DShadow", "samplerCubeShadow", "sampler2DRectShadow", "sampler1DArrayShadow", "sampler2DArrayShadow", "samplerCubeArrayShadow"]; + +// Regex written on https://regex101.com/r/2aAtA1/5 +const uniformUfRegex = /^(\s*uniform)\s+([biuvd]?vec[234]|bool|int|uint|float|double)\s+(uf_alphaTestRef|uf_verticesPerInstance|uf_streamoutBufferBase\[\d+\]|uf_tex\[\d+\]Scale|uf_pointSize|uf_fragCoordScale|uf_windowSpaceToClipSpaceTransform|uf_remappedPS\[\d+\]|uf_remappedVS\[\d+\]|uf_uniformRegisterVS\[\d+\]|uf_uniformRegisterPS\[\d+\])\s*;.*/m; + +const layoutTextureRegex = /layout\s*\(binding\s*=\s*(\d+)\s*\)\s*/; +const layoutBufferRegex = /layout\s*\(binding\s*=\s*(\d+)\s*(?:,\s*std140|,\s*std430|,\s*shared|,\s*packed)\s*\)\s*/; + +const ufVariablesOrder = [ + "uf_remappedVS", "uf_remappedPS", "uf_uniformRegisterVS", + "uf_uniformRegisterPS", "uf_windowSpaceToClipSpaceTransform", + "uf_alphaTestRef", "uf_pointSize", "uf_fragCoordScale", + "uf_tex"/*"\dScale"*/, "uf_verticesPerInstance", "uf_streamoutBufferBase" +]; + +function convertRules(rulesText, dstPath) { + let rulesPresets = []; + let presetsValidation = {}; + let textLines = rulesText.split("\n"); + let prevUsedVersion = undefined; + + let currentSection = ""; + let currentPreset = {name: "", variables: []}; + + for (line in textLines) { + // Version number parsing + if (textLines[line].replace(/\s+/g, "").startsWith("version=")) { + if (textLines[line].replace(/\s+/g, "") != "version=3" && textLines[line].replace(/\s+/g, "") != "version=4") { + console.log("Why does this rules.txt file have something appended to the version variable?"); + } + + if (textLines[line].replace(/\s+/g, "").startsWith("version=3") || textLines[line].replace(/\s+/g, "").startsWith("version=4")) { + if (prevUsedVersion) console.warn("Why is there a second version definition in this file?"); + prevUsedVersion = parseInt(textLines[line].replace(/\s+/g, "").split("version=")[1]); + textLines[line] = "version = 4"; + } + else { + console.warn("What's this version? "+textLines[line]); + } + } + else { + // Parse preset variables + if (/^\[(.+)]/.test(textLines[line])) { + if (currentSection == "Preset") { + if (currentPreset.name == "") console.warn("Why does this preset not have a name?"); + + //console.log("Added new preset called "+currentPreset.name+" with the following variables: "+JSON.stringify(currentPreset)); + rulesPresets.push({name: currentPreset.name, variables: [...currentPreset.variables]}); + currentPreset = null; + } + currentSection = textLines[line].match(/^\[(.+)]/)[1]; + if (currentSection == "Preset") { + currentPreset = {name: "", variables: []}; + } + } + + if (currentSection == "Preset") { + let nameMatch = textLines[line].match(/^name[ ]?=[ ]?([^\n#]+)[ ]?/m); + + if (nameMatch != null) { + if (currentPreset.name != "") console.warn("Why does this preset have it's name two times?"); + else { + currentPreset.name = nameMatch[1].trim(); + } + } + let presetVariable = textLines[line].match(/^(?\$[a-zA-Z_]+)(?:(?:int))?[ ]*=[ ]*(?\d+\.\d+|\d+|0x[0-9a-fA-F]+|(?[+\-*\/\(\)\d]+))/m); + if (presetVariable != null) { + if (presetVariable.groups.expression != undefined) currentPreset.variables.push({key: presetVariable.groups.key, value: (presetVariable.groups.isInt != undefined ? 666 : 666.666667), isInt: (presetVariable.groups.isInt != undefined)}); + else currentPreset.variables.push({key: presetVariable.groups.key, value: (presetVariable.groups.isInt != undefined ? parseInt(presetVariable.groups.value) : parseFloat(presetVariable.groups.value)), isInt: (presetVariable.groups.isInt != undefined)}); + + if (presetsValidation.hasOwnProperty(presetVariable.groups.key)) presetsValidation[presetVariable.groups.key]++; + else presetsValidation[presetVariable.groups.key] = 1; + } + } + } + } + + if (currentSection == "Preset") rulesPresets.push({name: currentPreset.name, variables: [...currentPreset.variables]}); + + // Check for oddities in presets + for (variable in presetsValidation) { + if (presetsValidation[variable] != rulesPresets.length) console.warn("This shader doesn't have all the variables in each preset...", presetsValidation, rulesPresets); + } + + // Order variables + for (let i=0; i { + return (b.key.length - a.key.length); + }); + } + + // Add a Default preset if it doesn't have any presets yet since the code relies on that. + if (rulesPresets.length == 0) rulesPresets.push({name: "Default", variables: []}); + + fs.writeFileSync(dstPath, textLines.join("\n")); + return [prevUsedVersion, rulesPresets]; +} + +function convertShader(shaderText, rulesPresets, folderArray, vulkanSet) { + let shaderOutput = []; + let shaderLines = shaderText.split("\n"); + if (!shaderLines[0].startsWith("#")) console.warn("Why does "+path.join(process.cwd(), ...folderArray)+" not have a #version definition on it's first line?"); + let sharedUFBlockAlternativeLine = undefined; + + // First (header, GET_FRAGCOORD, SET_POSITION, ATTR_LAYOUT, GL_ARB_shading_language_packing and GL_ARB_arrays_of_arrays) pass + { + let newShaderLines = []; + let parsingHeader = true; + + for (line in shaderLines) { + let currLine = shaderLines[line]; + + if (currLine.startsWith("#extension GL_ARB_shading_language_packing")) { + continue; + } + if (currLine.startsWith("#extension GL_ARB_arrays_of_arrays")) { + continue; + } + + if (parsingHeader && !currLine.startsWith("#")) { + parsingHeader = false; + newShaderLines = newShaderLines.concat(crossHeader); + newShaderLines.push("// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.\r"); + if (verboseOutput) { + newShaderLines.push("/*\r"); + newShaderLines.push("Conversion output:\r"); + newShaderLines.push("%CONVERSION_OUTPUT%\r"); + newShaderLines.push("*/\r"); + } + newShaderLines.push("\r"); + sharedUFBlockAlternativeLine = newShaderLines.length; + } + + if (/(R[\d+]f = )vec4\(gl_FragCoord\.xy\*uf_fragCoordScale,gl_FragCoord\.zw\);/.test(currLine)) { + newShaderLines.push(currLine.split("=")[0]+"= GET_FRAGCOORD();"); + } + else if (/R[\d+]i = floatBitsToInt\(vec4\(gl_FragCoord\.xy\*uf_fragCoordScale,gl_FragCoord\.zw\)\);/.test(currLine)) { + newShaderLines.push(currLine.split("=")[0]+"= floatBitsToInt(GET_FRAGCOORD());"); + } + else if (/^gl_Position[ ]?=[ ]?(.*);$/m.test(currLine)) { + newShaderLines.push(`SET_POSITION(${currLine.match(/^gl_Position = (.*);$/m)[1]});`); + } + else if (currLine.startsWith("layout(location = ") && currLine.includes(" attrData")) { + OpenGLLocation = parseInt(currLine.substr(17)); + if (OpenGLLocation == NaN) throw "Tried finding the attrData's OpenGL binding, but returned a NaN."; + newShaderLines.push(`ATTR_LAYOUT(${vulkanSet}, ${OpenGLLocation})${currLine.split(")")[1]}`); + } + else { + newShaderLines.push(currLine); + } + } + shaderLines = newShaderLines; + } + + // Second (binding and ufBlock) pass + { + let ufBlockLineIndexes = {}; + let consecutiveUfVariables = true; + let allUfLines = []; + for (preset in rulesPresets) { + let currPreset = rulesPresets[preset]; + + // Add properties to store parsing information. + currPreset.ufBlockVariables = []; + currPreset.shaderChanges = new Array(shaderLines.length); + + // Fill shaders with presets + let presetChangedShader = []; + for (line in shaderLines) { + let currLine = shaderLines[line]; + + for (presetVar in currPreset.variables) { + let currPresetVar = currPreset.variables[presetVar]; + let currPresetVarOccur = currLine.split(currPresetVar.key).length-1; + for (let i=0; i currLine.match(uniformUfRegex)[3].startsWith(ufVariableStart)); + ufVariableShaderOrder.push(currLine.match(uniformUfRegex)[3]); + if (indexUfVariable != -1) ufVariableCrossOffList.splice(0, indexUfVariable); + else { + shaderOutput.push(`This shader (with the current ${currPreset.name}) doesn't follow the uf_* variable order from Cemu itself, so it might've been messed with. \r\nOrder found:${ufVariableShaderOrder}.`); + } + } + currPreset.textureBindingCounter = textureBindingCounter; + } + } + + // Sort the order of uf_variables + let beforeOrder = [...allUfLines]; + function getSortRank(unit) { + for (var i = 0; i < ufVariablesOrder.length; i++) { + if (unit.startsWith(ufVariablesOrder[i])) { + return i; + } + } + return ufVariablesOrder.length; + } + + allUfLines.sort(function(a, b){ + return getSortRank(a) - getSortRank(b); + }); + + if (beforeOrder.toString() != allUfLines.toString()) console.log(allUfLines); + + // Log some extra stuff + if (!consecutiveUfVariables) { + //shaderOutput.push("The uf_* variables weren't found to be consecutive, which means that someone probably messed with them.\r"); + // It seems that Cemu previously didn't insert all the uf_* variables consecutively. + // It's not really that big of a deal anyway to move them in one block anyways, and shouldn't cause any issues due to the early inserted backup method. + } + + if (allUfLines.length == 0) { + shaderOutput.push("This shader doesn't seem to have any uf_* variables. This could mean that this shader was edited.\r"); + } + + // Check if unified ufBlock can be made + let differingUfBlock = false; + let ufBlockLineSize = undefined; + for (let [ufVariableName, lineIndexes] of Object.entries(ufBlockLineIndexes)) { + // Check if each ufBlock has the same amount of variables. + let sameAmount = true; + if (ufBlockLineSize == undefined) ufBlockLineSize = lineIndexes.length; + else if (sameAmount) sameAmount = (ufBlockLineSize == lineIndexes.length); + + // Check if each uf variable is on the same lines. + let sameLineIndexes = true; + for (let i=0; i 1) { + shaderOutput.push(`Encountered a conflict between lines. Probably will end-up in a broken shader. Conflicts: ${conflictingLineChanges.toString()}\r`); + } + shaderLines[i] = conflictingLineChanges[0]; + } + } + } + + // Insert shader output into shader output + if (verboseOutput) shaderLines.splice(shaderLines.findIndex(line => line === "%CONVERSION_OUTPUT%\r"), 1, ...shaderOutput); + if (shaderOutput.length != 0) console.error("Encountered a few warnings in this shader "+path.join(process.cwd(), ...folderArray)+":\r\n", shaderOutput); + + shaderLines = shaderLines.join("\n").replace(/(UNIFORM_BUFFER_LAYOUT\(\d+,[ ]*\d+,[ ]*\d+\)[ ]*)\r*\n+(uniform[ ]+[a-zA-Z0-9_]+)/g, "$1$2").split("\n"); + + // Third (testing) pass + { + for (preset in rulesPresets) { + let currPreset = rulesPresets[preset]; + + // Replace values from this preset variable, if there are any. + let presetChangedShader = []; + for (line in shaderLines) { + let currLine = shaderLines[line]; + + for (presetVar in currPreset.variables) { + let currPresetVar = currPreset.variables[presetVar]; + let currPresetVarOccur = currLine.split(currPresetVar.key).length-1; + for (let i=0; i= "0000000000000000_0000000000000000_xx.txt".length) { + if (/^[a-zA-Z0-9]{16}_[\w]{16}_[p|v]s/.test(packFiles[file].name)) { + convertFiles.shaders.push({name: packFiles[file].name, shaderText: fs.readFileSync(path.join(process.cwd(), ...folderPathArray, dirEntries[entry].name, packFiles[file].name), {encoding: "utf8"}), vulkanSet: ((packFiles[file].name.substr(34, 2) == "vs") ? 0 : 1)}); + } + else { + convertFiles.otherFiles.push(packFiles[file].name); + //console.debug("Why does "+path+dirEntries[entry].name+"/ have "+packFiles[file].name+" as a disabled shader? Can this file be deleted?"); + } + } + else if (packFiles[file].isFile() && (packFiles[file].name == "patches.txt" || packFiles[file].name == "output.glsl")) { + convertFiles.otherFiles.push(packFiles[file].name); + } + else if (packFiles[file].isDirectory()) { + //console.debug("Why does "+path+dirEntries[entry].name+"/ have a folder called "+packFiles[file].name+"."); + fs.mkdirSync(path.join(process.cwd(), "/graphicPacks/", ...folderPathArray, dirEntries[entry].name), {recursive: true}); + convertFolder([...folderPathArray, dirEntries[entry].name]); + break; + } + else if (packFiles[file].isFile()) { + //console.debug("Why does "+dirEntries[entry].name+"/ have a random file called "+packFiles[file].name+"? Is this one necessary?"); + convertFiles.otherFiles.push(packFiles[file].name); + } + } + + if (convertFiles.rulesText == undefined) { + //console.warn("Why does "+dirEntries[entry].name+" not have a rules.txt file?"); + console.groupEnd(); + continue; + } + + fs.mkdirSync(path.join(process.cwd(), "/graphicPacks/", ...folderPathArray, dirEntries[entry].name), {recursive: true}); + convertPack(convertFiles, [...folderPathArray, dirEntries[entry].name], ["/graphicPacks/", ...folderPathArray, dirEntries[entry].name]); + console.groupEnd(); + } + } +} + +// Configuration +const filterFolderNames = ["BreathOfTheWild"]; +const verboseOutput = false; + + +if (fs.existsSync(path.join(process.cwd(), "/errors/"))) fs.rmdirSync(path.join(process.cwd(), "/errors/"), {recursive: true}); +fs.mkdirSync(path.join(process.cwd(), "/errors/")); + +console.group("Convert shaders from Filters..."); +convertFolder(["Filters"]); +console.groupEnd(); + +console.group("Convert shaders from Enhancements..."); +convertFolder(["Enhancements"]); +console.groupEnd(); + +console.group("Convert shaders from Resolutions..."); +convertFolder(["Resolutions"]); +console.groupEnd(); + +console.group("Convert shaders from Mods..."); +convertFolder(["Mods"]); +console.groupEnd(); + +console.group("Convert shaders from Workarounds..."); +convertFolder(["Workarounds"]); +console.groupEnd(); + +if (fs.existsSync("./preprocessed-shader.temp")) fs.unlinkSync("./preprocessed-shader.temp"); +if (fs.existsSync("./frag.spv")) fs.unlinkSync("./frag.spv"); +if (fs.existsSync("./vert.spv")) fs.unlinkSync("./vert.spv"); + +console.log(manualFixingShaders+" shaders need to be fixed manually and "+manualCheckingShaders+" shaders need to be checked, see the output above."); diff --git a/docs/v4-converter/verify-graphicPacks.js b/docs/v4-converter/verify-graphicPacks.js new file mode 100644 index 00000000..5bd39383 --- /dev/null +++ b/docs/v4-converter/verify-graphicPacks.js @@ -0,0 +1,308 @@ +const fs = require("fs"); +const path = require("path"); +const child_process = require("child_process"); + +var globalShaders = {}; +var unverifiedShaders = []; +var invalidShaders = []; +var verifiedShaders = []; + +const attributeLayoutRegex = /ATTR_LAYOUT\(\d+\s*,\s*(\d+)\)\s*in\s*uvec4\s*([a-zA-Z0-9_]+)\s*;/; +const bufferLayoutRegex = /UNIFORM_BUFFER_LAYOUT\((\d+)\s*,\s*\d+,\s*(\d+)\)(?:\s*uniform\s*([a-zA-Z]+\d)\s*)?/; +const splitBufferLayoutRegex = /uniform\s*([a-zA-Z]+\d+)\s*/; +const textureLayoutRegex = /TEXTURE_LAYOUT\((\d+), \d+, (\d+)\) uniform sampler2D ([a-zA-Z]+\d);/; +const ufBlocklayoutRegex = /layout\(set\s?=\s?\d+,\s?binding\s?=\s?(\d+)\)\s*uniform\s+ufBlock/; +const uniformUfRegex = /^\s*uniform\s+([biuvd]?vec[234]|bool|int|uint|float|double)\s+(uf_alphaTestRef|uf_verticesPerInstance|uf_streamoutBufferBase\[\d+\]|uf_tex\[\d+\]Scale|uf_pointSize|uf_fragCoordScale|uf_windowSpaceToClipSpaceTransform|uf_remappedPS\[\d+\]|uf_remappedVS\[\d+\]|uf_uniformRegisterVS\[\d+\]|uf_uniformRegisterPS\[\d+\])\s*;.*/m; + +function extractShaderInfo(shaderText) { + let shaderInfo = {attributeLayouts: [], bufferLayouts: [], textureLayouts: [], ufBlock: {VKLocation: undefined, ufVariables: []}}; + let shaderLines = shaderText.split("\n"); + + let ufBlockFlag = false; + for (let line = 0; line\$[a-zA-Z_]+)(?:(?:int))?[ ]*=[ ]*(?\d+\.\d+|\d+|0x[0-9a-fA-F]+|(?[+\-*\/\(\)\d]+))/m); + if (presetVariable != null) { + if (presetVariable.groups.expression != undefined) currentPreset.variables.push({key: presetVariable.groups.key, value: (presetVariable.groups.isInt != undefined ? 666 : 666.666667), isInt: (presetVariable.groups.isInt != undefined)}); + else currentPreset.variables.push({key: presetVariable.groups.key, value: (presetVariable.groups.isInt != undefined ? parseInt(presetVariable.groups.value) : parseFloat(presetVariable.groups.value)), isInt: (presetVariable.groups.isInt != undefined)}); + } + } + } + if (currentSection == "Preset") rulesPresets.push({name: currentPreset.name, variables: [...currentPreset.variables]}); + + for (let i=0; i { + return (b.key.length - a.key.length); + }); + } + + if (rulesPresets.length == 0) rulesPresets.push({name: "Default", variables: []}); + return [rulesPresets, packVersion]; +} + +function verifyShader(rulesPresets, dumpShader, shaderText, vulkanSet, shaderPath) { + // First, remove the Vulkan header + let shaderLines = shaderText.split("\n"); + let parsingVulkanHeader = false; + for (line in shaderLines) { + if (shaderLines[line].trim().startsWith("#ifdef VULKAN")) parsingVulkanHeader = true; + else if (parsingVulkanHeader && (shaderLines[line].trim().startsWith("#define") || shaderLines[line].trim().startsWith("#else"))) shaderLines[line] = "\r"; + else if (parsingVulkanHeader && shaderLines[line].trim().startsWith("#endif")) break; + else if (parsingVulkanHeader) console.error("what's this", shaderLines[line]); + } + + // Replace presets + for (preset in rulesPresets) { + let currPreset = rulesPresets[preset]; + let headerlessPresetLines = []; + + for (line in shaderLines) { + let currLine = shaderLines[line]; + + for (presetVar in currPreset.variables) { + let currPresetVar = currPreset.variables[presetVar]; + let currPresetVarOccur = currLine.split(currPresetVar.key).length-1; + for (let i=0; i= "0000000000000000_0000000000000000_xx.txt".length && /^[a-zA-Z0-9]{16}_[\w]{16}_[p|v]s/.test(packFiles[file].name)) { + verifyFiles.shaders.push({name: packFiles[file].name, shaderText: fs.readFileSync(path.join(process.cwd(), ...folderArray, dirEntries[entry].name, packFiles[file].name), {encoding: "utf8"}), vulkanSet: ((packFiles[file].name.substr(34, 2) == "vs") ? 0 : 1)}); + } + else if (packFiles[file].isDirectory()) { + verifyGraphicPacks([...folderArray, dirEntries[entry].name]); + break; + } + } + + verifyPack(verifyFiles, [...folderArray, dirEntries[entry].name]); + + console.groupEnd(); + } + } +} + +function extractDumpInfo(folderPath) { + shaderEntries = fs.readdirSync(folderPath, {withFileTypes: true}); + for (entry in shaderEntries) { + let currShaderEntry = shaderEntries[entry]; + if (!currShaderEntry.isFile() || path.extname(currShaderEntry.name) != ".txt" || path.basename(currShaderEntry.name, ".txt").slice(-2) == "gs") continue; + + globalShaders[path.basename(currShaderEntry.name, ".txt")] = extractShaderInfo(fs.readFileSync(folderPath+"/"+currShaderEntry.name, {encoding: "utf8"})); + } +} + +extractDumpInfo("./dump/shaders/"); + +console.info("Finished gathering information from shader dump."); + +verifyGraphicPacks(["graphicPacks", "Enhancements"]); +verifyGraphicPacks(["graphicPacks", "Resolutions"]); +verifyGraphicPacks(["graphicPacks", "Workarounds"]); +verifyGraphicPacks(["graphicPacks", "Mods"]); + +console.info("Finished verifying the graphic packs!"); +console.info("Verified shaders:"); +console.info(verifiedShaders.join("\r\n")); +console.info("Invalid shaders:"); +console.info(invalidShaders.join("\r\n")); +console.info("Unverified shaders:"); +console.info(unverifiedShaders.join("\r\n")); + +if (fs.existsSync("./manual/")) fs.rmdirSync("./manual/", {recursive: true}); +fs.mkdirSync("./manual/", {recursive: true}); + +for (file in invalidShaders) { + fs.mkdirSync("./manual/"+path.basename(invalidShaders[file], ".txt")+"/", {recursive: true}); + fs.copyFileSync("./dump/shaders/"+path.basename(invalidShaders[file]), "./manual/"+path.basename(invalidShaders[file], ".txt")+"/"+path.basename(invalidShaders[file], ".txt")+".dump"); + fs.copyFileSync(invalidShaders[file], "./manual/"+path.basename(invalidShaders[file], ".txt")+"/"+path.basename(invalidShaders[file])); +} \ No newline at end of file