mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-22 17:49:17 +01:00
[HW] Better scaling, copy paste fixes
This looks pretty good in most resolutions, Stop gap commit before i break up x and y scaling and/or replace with patches
This commit is contained in:
parent
967c741636
commit
d70622fbe5
@ -3,7 +3,8 @@
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_packing : enable
|
||||
// shader 492839ddc5f8f43e //3rd level dof
|
||||
const float resScale = ($height/$gameHeight)*$internalRes;
|
||||
const float resXScale = intBitsToFloat($width)/intBitsToFloat($gameWidth);
|
||||
const float resYScale = intBitsToFloat($height)/intBitsToFloat($gameHeight);
|
||||
uniform ivec4 uf_uniformRegisterVS[256];
|
||||
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||
layout(location = 0) in uvec4 attrDataSem0;
|
||||
@ -222,18 +223,18 @@ tempResultf = clamp(tempResultf, -256.0, 255.0);
|
||||
ARi.x = int(tempResultf);
|
||||
PV1i.x = floatBitsToInt(tempResultf);
|
||||
// 2
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resScale);
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resXScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resXScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resXScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resXScale);
|
||||
// 3
|
||||
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
// 4
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale);
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale);
|
||||
// 5
|
||||
tempResulti = Ri[1].x;
|
||||
tempResulti = clamp(tempResulti, -256, 255);
|
||||
|
@ -3,7 +3,8 @@
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_packing : enable
|
||||
// shader 945d9672d0114248
|
||||
const float resScale = ($height/$gameHeight);
|
||||
const float resXScale = intBitsToFloat($width)/intBitsToFloat($gameWidth);
|
||||
const float resYScale = intBitsToFloat($height)/intBitsToFloat($gameHeight);
|
||||
uniform ivec4 uf_uniformRegisterVS[256];
|
||||
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||
layout(location = 0) in uvec4 attrDataSem0;
|
||||
@ -186,9 +187,9 @@ Ri[2] = ivec4(int(attrDecoder.x), int(attrDecoder.y), floatBitsToInt(0.0), float
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
Ri[3].y = 0;
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[1].y) + intBitsToFloat(uf_uniformRegisterVS[0].y)/resScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[1].y) + intBitsToFloat(uf_uniformRegisterVS[0].y)/resXScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) * 2.0);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[1].x) + intBitsToFloat(uf_uniformRegisterVS[0].x)/resScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[1].x) + intBitsToFloat(uf_uniformRegisterVS[0].x)/resXScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 2.0);
|
||||
// 1
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.z) + -(1.0));
|
||||
@ -224,18 +225,18 @@ tempResultf = clamp(tempResultf, -256.0, 255.0);
|
||||
ARi.x = int(tempResultf);
|
||||
PV1i.x = floatBitsToInt(tempResultf);
|
||||
// 2
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resScale);
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resXScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resXScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resXScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resXScale);
|
||||
// 3
|
||||
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
// 4
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale);
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale);
|
||||
// 5
|
||||
tempResulti = Ri[1].x;
|
||||
tempResulti = clamp(tempResulti, -256, 255);
|
||||
|
@ -4,7 +4,8 @@
|
||||
#extension GL_ARB_shading_language_packing : enable
|
||||
// shader b3609db7d1363f6a
|
||||
//cutscene dof
|
||||
const float resScale = ($height/$gameHeight)*$internalRes;
|
||||
const float resXScale = intBitsToFloat($width)/intBitsToFloat($gameWidth);
|
||||
const float resYScale = intBitsToFloat($height)/intBitsToFloat($gameHeight);
|
||||
uniform ivec4 uf_uniformRegisterVS[256];
|
||||
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||
layout(location = 0) in uvec4 attrDataSem0;
|
||||
@ -191,9 +192,9 @@ Ri[2] = ivec4(int(attrDecoder.x), int(attrDecoder.y), floatBitsToInt(0.0), float
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
Ri[3].y = 0;
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[1].y) + intBitsToFloat(uf_uniformRegisterVS[0].y)/resScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[1].y) + intBitsToFloat(uf_uniformRegisterVS[0].y)/resXScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) * 2.0);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[1].x) + intBitsToFloat(uf_uniformRegisterVS[0].x)/resScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[1].x) + intBitsToFloat(uf_uniformRegisterVS[0].x)/resXScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 2.0);
|
||||
// 1
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.z) + -(1.0));
|
||||
@ -229,18 +230,18 @@ tempResultf = clamp(tempResultf, -256.0, 255.0);
|
||||
ARi.x = int(tempResultf);
|
||||
PV1i.x = floatBitsToInt(tempResultf);
|
||||
// 2
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resScale);
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resXScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resXScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resXScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resXScale);
|
||||
// 3
|
||||
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
// 4
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale);
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale);
|
||||
// 5
|
||||
tempResulti = Ri[1].x;
|
||||
tempResulti = clamp(tempResulti, -256, 255);
|
||||
|
@ -3,7 +3,8 @@
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_packing : enable
|
||||
// shader f9feadb214b483b7
|
||||
const float resScale = ($height/$gameHeight)*$internalRes;
|
||||
const float resXScale = intBitsToFloat($width)/intBitsToFloat($gameWidth);
|
||||
const float resYScale = intBitsToFloat($height)/intBitsToFloat($gameHeight);
|
||||
uniform ivec4 uf_uniformRegisterVS[256];
|
||||
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||
layout(location = 0) in uvec4 attrDataSem0;
|
||||
@ -189,9 +190,9 @@ Ri[2] = ivec4(int(attrDecoder.x), int(attrDecoder.y), floatBitsToInt(0.0), float
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
Ri[3].y = 0;
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[1].y) + intBitsToFloat(uf_uniformRegisterVS[0].y)/resScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[1].y) + intBitsToFloat(uf_uniformRegisterVS[0].y)/resXScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) * 2.0);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[1].x) + intBitsToFloat(uf_uniformRegisterVS[0].x)/resScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[1].x) + intBitsToFloat(uf_uniformRegisterVS[0].x)/resXScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 2.0);
|
||||
// 1
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.z) + -(1.0));
|
||||
@ -227,18 +228,18 @@ tempResultf = clamp(tempResultf, -256.0, 255.0);
|
||||
ARi.x = int(tempResultf);
|
||||
PV1i.x = floatBitsToInt(tempResultf);
|
||||
// 2
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resScale);
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].y)/resXScale);
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].x)/resXScale);
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(Ri[2].y) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].w)/resXScale);
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(Ri[2].x) + intBitsToFloat(uf_uniformRegisterVS[ARi.x+2].z)/resXScale);
|
||||
// 3
|
||||
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_uniformRegisterVS[1].x)));
|
||||
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(uf_uniformRegisterVS[1].y)));
|
||||
// 4
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resScale);
|
||||
Ri[0].xyz = floatBitsToInt(vec3(intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.w),intBitsToFloat(PV1i.z)) + vec3(intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale,intBitsToFloat(uf_uniformRegisterVS[1].z)/resXScale));
|
||||
Ri[0].w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_uniformRegisterVS[1].w)/resXScale);
|
||||
// 5
|
||||
tempResulti = Ri[1].x;
|
||||
tempResulti = clamp(tempResulti, -256, 255);
|
||||
|
@ -76,7 +76,7 @@ $scaleBlur = 0.5
|
||||
|
||||
[Preset]
|
||||
name = 5760x1080 (48:9 HD)
|
||||
$width = 2560
|
||||
$width = 5760
|
||||
$height = 1080
|
||||
$gameWidth = 1280
|
||||
$gameHeight = 720
|
||||
@ -174,7 +174,7 @@ $scaleShader = 1.0
|
||||
$scaleBlur = 1.0
|
||||
|
||||
[Preset]
|
||||
name = 5120x2160 (4k 48:9)
|
||||
name = 115200x2160 (4k 48:9)
|
||||
$width = 11520
|
||||
$height = 2160
|
||||
$gameWidth = 1280
|
||||
|
Loading…
Reference in New Issue
Block a user