diff --git a/Source/XenobladeX/9dc2d340255dee89_0000000000000000_vs.txt b/Source/XenobladeX/9dc2d340255dee89_0000000000000000_vs.txt index 15437085..c315fa53 100644 --- a/Source/XenobladeX/9dc2d340255dee89_0000000000000000_vs.txt +++ b/Source/XenobladeX/9dc2d340255dee89_0000000000000000_vs.txt @@ -2,8 +2,8 @@ #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_shading_language_packing : enable -const float resXScale = ($width/$gameWidth); -const float resYScale = ($height/$gameHeight); +const float resXScale = intBitsToFloat($width)/intBitsToFloat($gameWidth); +const float resYScale = intBitsToFloat($height)/intBitsToFloat($gameHeight); // shader 9dc2d340255dee89 uniform ivec4 uf_remappedVS[1]; uniform vec2 uf_windowSpaceToClipSpaceTransform; diff --git a/Source/XenobladeX/_b253dca415790207_0000000000000079_ps.txt b/Source/XenobladeX/_b253dca415790207_0000000000000079_ps.txt index 1e700ae9..71957a8a 100644 --- a/Source/XenobladeX/_b253dca415790207_0000000000000079_ps.txt +++ b/Source/XenobladeX/_b253dca415790207_0000000000000079_ps.txt @@ -3,8 +3,9 @@ #extension GL_ARB_texture_gather : enable // shader b253dca415790207 // motion blur alpha +const float resScale = intBitsToFloat($height)/intBitsToFloat($gameHeight); -const float resScale = 2.0; +//const float resScale = 2.0; //const float resScale = 3; uniform ivec4 uf_remappedPS[5]; diff --git a/Source/XenobladeX/_ed70de7fe7542f87_00000000000003c9_ps.txt b/Source/XenobladeX/_ed70de7fe7542f87_00000000000003c9_ps.txt index 80e4e259..0346c716 100644 --- a/Source/XenobladeX/_ed70de7fe7542f87_00000000000003c9_ps.txt +++ b/Source/XenobladeX/_ed70de7fe7542f87_00000000000003c9_ps.txt @@ -4,7 +4,8 @@ #extension GL_ARB_separate_shader_objects : enable // shader ed70de7fe7542f87 //motion blur sample spread scaling -const float resScale = 2.0; +const float resScale = intBitsToFloat($height)/intBitsToFloat($gameHeight); +//const float resScale = 2.0; layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf470a000 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: 0 layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4e12000 res 320x180x1 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: 0 layout(location = 0) in vec4 passParameterSem0; diff --git a/Source/XenobladeX/af7acf7fb6dca1be_0000000000079249_ps.txt b/Source/XenobladeX/af7acf7fb6dca1be_0000000000079249_ps.txt index e53863f1..620c7ef8 100644 --- a/Source/XenobladeX/af7acf7fb6dca1be_0000000000079249_ps.txt +++ b/Source/XenobladeX/af7acf7fb6dca1be_0000000000079249_ps.txt @@ -4,9 +4,8 @@ // shader af7acf7fb6dca1be //cutscene shadow scaling //to do - extra edge smooth pass, - -const float resScaleDetail = ($width/$gameWidth); -const float resScale = ($height/$gameHeight); +const float resScaleDetail = intBitsToFloat($height)/intBitsToFloat($gameHeight); +const float resScale = (intBitsToFloat($height)/intBitsToFloat($gameHeight); //const float resScaleDetail = 2.0; //const float resScale = 3.0; const float shadowExposure = 0.85; //By truncating shadow, we decrease overall exposure during day only. diff --git a/Source/XenobladeX/fdb5a87dd0368c6b_000000000000f249_ps.txt b/Source/XenobladeX/fdb5a87dd0368c6b_000000000000f249_ps.txt index ee0164f4..24f971b7 100644 --- a/Source/XenobladeX/fdb5a87dd0368c6b_000000000000f249_ps.txt +++ b/Source/XenobladeX/fdb5a87dd0368c6b_000000000000f249_ps.txt @@ -1,8 +1,8 @@ #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable -const float resXScale = ($width/$gameWidth); -const float resYScale = ($height/$gameHeight); +const float resXScale = intBitsToFloat($width)/intBitsToFloat($gameWidth); +const float resYScale = intBitsToFloat($height)/intBitsToFloat($gameHeight); // shader fdb5a87dd0368c6b //shadow scaling uniform ivec4 uf_remappedPS[23]; layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 diff --git a/Source/XenobladeX/rules.txt b/Source/XenobladeX/rules.txt index 7b1288ee..0b1acc6b 100644 --- a/Source/XenobladeX/rules.txt +++ b/Source/XenobladeX/rules.txt @@ -16,17 +16,6 @@ $dither = 0.01 $scaleShader = 1.0 $scaleBlur = 0.05 -[Preset] -name = 640x360 -$width = 640 -$height = 360 -$gameWidth = 1280 -$gameHeight = 720 -$internalRes = 0.5 -$dither = 0.01 -$scaleShader = 1.0 -$scaleBlur = 0.05 - [Preset] name = 3840x720 (48:9) $width = 3840 @@ -40,6 +29,17 @@ $scaleBlur = 0.05 // Quality +[Preset] +name = 1600x900 +$width = 1600 +$height = 900 +$gameWidth = 1280 +$gameHeight = 720 +$internalRes = 1.0 +$dither = 0.1 +$scaleShader = (720.0/900.0) # factor for any shader that can't handle fractional scaling +$scaleBlur = 0.5 + [Preset] name = 1920x1080 (HD) $width = 1920 @@ -48,18 +48,7 @@ $gameWidth = 1280 $gameHeight = 720 $internalRes = 1.0 $dither = 0.15 -$scaleShader = 1.0 -$scaleBlur = 0.5 - -[Preset] -name = 1920x1200 (10:9 HD) -$width = 1920 -$height = 1200 -$gameWidth = 1280 -$gameHeight = 720 -$internalRes = 1.0 -$dither = 0.15 -$scaleShader = 1.0 +$scaleShader = (720.0/1080.0) $scaleBlur = 0.5 [Preset] @@ -70,7 +59,7 @@ $gameWidth = 1280 $gameHeight = 720 $internalRes = 1.0 $dither = 0.15 -$scaleShader = 1.0 +$scaleShader = (720.0/1080.0) $scaleBlur = 0.5 [Preset] @@ -81,18 +70,18 @@ $gameWidth = 1280 $gameHeight = 720 $internalRes = 1.0 $dither = 0.15 -$scaleShader = 1.0 +$scaleShader = (720.0/1080.0) $scaleBlur = 0.5 [Preset] -name = 1600x900 -$width = 1600 -$height = 900 +name = 1920x1200 (10:9 HD) +$width = 1920 +$height = 1200 $gameWidth = 1280 $gameHeight = 720 $internalRes = 1.0 -$dither = 0.1 -$scaleShader = 1.0 +$dither = 0.15 +$scaleShader = (720.0/1200.0) $scaleBlur = 0.5 [Preset] @@ -145,9 +134,9 @@ $width = 3200 $height = 1800 $gameWidth = 1280 $gameHeight = 720 -$internalRes = 1.0 +$internalRes = 2.0 $dither = 0.2 -$scaleShader = 1.0 +$scaleShader = (1440.0/1800.0) $scaleBlur = 0.5 [Preset] @@ -240,11 +229,8 @@ overwriteHeight = ($height/$gameHeight) * 720 width = 1024 height = 1024 formats = 0x005 -#overwriteWidth = ($height/$gameHeight) * 1024 -#overwriteHeight = ($height/$gameHeight) * 1024 -overwriteWidth = 3072 #1080 breaks without rounding -overwriteHeight = 3072 - +overwriteWidth = ($height/$gameHeight) * (1024*$scaleShader) +overwriteHeight = ($height/$gameHeight) * (1024*$scaleShader) [TextureRedefine] #ingame menu width = 1024 @@ -286,10 +272,9 @@ overwriteHeight = ($height/$gameHeight) * (360*$internalRes) width = 512 height = 512 formats = 0x005 -#overwriteWidth = ($height/$gameHeight) * 512 -#overwriteHeight = ($height/$gameHeight) * 512 -overwriteWidth = 3072 #1080 breaks without rounding -overwriteHeight = 3072 +overwriteWidth = ($height/$gameHeight) * (1024*$scaleShader) +overwriteHeight = ($height/$gameHeight) * (1024*$scaleShader) + [TextureRedefine] width = 512 diff --git a/Source/XenobladeX_Performance/rules.txt b/Source/XenobladeX_Performance/rules.txt new file mode 100644 index 00000000..a50cebf8 --- /dev/null +++ b/Source/XenobladeX_Performance/rules.txt @@ -0,0 +1,28 @@ +[Definition] +titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00 +name = Resolution +path = "Xenoblade Chronicles X/Graphics/Performance Resolution" +description = Changes the resolution of the game. +version = 3 + +[Preset] +name = 320x180 +$width = 320 +$height = 180 +$gameWidth = 1280 +$gameHeight = 720 + +[Preset] +name = 640x360 +$width = 640 +$height = 360 +$gameWidth = 1280 +$gameHeight = 720 + +[TextureRedefine] +width = 1280 +height = 720 +formatsExcluded = 0x031,0x431,0x035,0x034,0x033 #dialog prompt fixes, XCX Logo NLA +tileModesExcluded = 0x001 +overwriteWidth = ($width/$gameWidth) * 1280 +overwriteHeight = ($height/$gameHeight) * 720 \ No newline at end of file