mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-26 19:44:14 +01:00
[BotW] AO Fix and some AA Restore extra bits
This commit is contained in:
parent
94870ed334
commit
b254e944ab
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 4.0;
|
||||||
|
const float resYScale = 4.0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 4.0;
|
||||||
|
const float resYScale = 4.0;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 4.0;
|
||||||
|
const float resYScale = 4.0;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 6.0;
|
||||||
|
const float resYScale = 6.0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 6.0;
|
||||||
|
const float resYScale = 6.0;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 6.0;
|
||||||
|
const float resYScale = 6.0;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 8.0;
|
||||||
|
const float resYScale = 8.0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 8.0;
|
||||||
|
const float resYScale = 8.0;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 8.0;
|
||||||
|
const float resYScale = 8.0;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 1.5;
|
||||||
|
const float resYScale = 1.5;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 1.5;
|
||||||
|
const float resYScale = 1.5;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 1.5;
|
||||||
|
const float resYScale = 1.5;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.0;
|
||||||
|
const float resYScale = 1.5;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.0;
|
||||||
|
const float resYScale = 1.5;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.0;
|
||||||
|
const float resYScale = 1.5;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.0;
|
||||||
|
const float resYScale = 2.0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.0;
|
||||||
|
const float resYScale = 2.0;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.0;
|
||||||
|
const float resYScale = 2.0;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.6875;
|
||||||
|
const float resYScale = 2.0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.6875;
|
||||||
|
const float resYScale = 2.0;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.6875;
|
||||||
|
const float resYScale = 2.0;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.5;
|
||||||
|
const float resYScale = 2.5;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.5;
|
||||||
|
const float resYScale = 2.5;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 2.5;
|
||||||
|
const float resYScale = 2.5;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 3.0;
|
||||||
|
const float resYScale = 3.0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 3.0;
|
||||||
|
const float resYScale = 3.0;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 3.0;
|
||||||
|
const float resYScale = 3.0;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 4.0;
|
||||||
|
const float resYScale = 3.0;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 4.0;
|
||||||
|
const float resYScale = 3.0;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 4.0;
|
||||||
|
const float resYScale = 3.0;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
@ -0,0 +1,179 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 0d6127fbed646d2b
|
||||||
|
// AO Fix
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 1.25;
|
||||||
|
const float resYScale = 1.25;
|
||||||
|
|
||||||
|
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;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
layout(location = 1) out vec4 passParameterSem5;
|
||||||
|
layout(location = 2) out vec4 passParameterSem6;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ivec4 R0i = ivec4(0);
|
||||||
|
ivec4 R1i = ivec4(0);
|
||||||
|
ivec4 R2i = ivec4(0);
|
||||||
|
ivec4 R3i = ivec4(0);
|
||||||
|
ivec4 R4i = ivec4(0);
|
||||||
|
ivec4 R123i = ivec4(0);
|
||||||
|
ivec4 R124i = ivec4(0);
|
||||||
|
ivec4 R125i = ivec4(0);
|
||||||
|
ivec4 R126i = ivec4(0);
|
||||||
|
ivec4 R127i = ivec4(0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
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;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0i = ivec4(gl_VertexID, 0, 0, gl_InstanceID);
|
||||||
|
attrDecoder.xyzw = attrDataSem0.xyzw;
|
||||||
|
attrDecoder = ((attrDecoder>>8)&0xFF)|((attrDecoder<<8)&0xFF00);
|
||||||
|
attrDecoder.xyzw = floatBitsToInt(vec4(unpackHalf2x16(attrDecoder.x|(attrDecoder.y<<16)),unpackHalf2x16(attrDecoder.z|(attrDecoder.w<<16))));
|
||||||
|
R1i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
attrDecoder.x = attrDataSem1.x;
|
||||||
|
attrDecoder.x = (attrDecoder.x>>24)|((attrDecoder.x>>8)&0xFF00)|((attrDecoder.x<<8)&0xFF0000)|((attrDecoder.x<<24));
|
||||||
|
attrDecoder.y = 0;
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
attrDecoder.xyzw = uvec4((attrDecoder.x>>0)&0x3FF,(attrDecoder.x>>10)&0x3FF,(attrDecoder.x>>20)&0x3FF,(attrDecoder.x>>30)&0x3);
|
||||||
|
if( (attrDecoder.x&0x200) != 0 ) attrDecoder.x |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.y&0x200) != 0 ) attrDecoder.y |= 0xFFFFFC00;
|
||||||
|
if( (attrDecoder.z&0x200) != 0 ) attrDecoder.z |= 0xFFFFFC00;
|
||||||
|
attrDecoder.x = floatBitsToUint(max(float(int(attrDecoder.x))/511.0,-1.0));
|
||||||
|
attrDecoder.y = floatBitsToUint(max(float(int(attrDecoder.y))/511.0,-1.0));
|
||||||
|
attrDecoder.z = floatBitsToUint(max(float(int(attrDecoder.z))/511.0,-1.0));
|
||||||
|
attrDecoder.w = floatBitsToUint(float(attrDecoder.w));
|
||||||
|
R2i = ivec4(int(attrDecoder.x), int(attrDecoder.y), int(attrDecoder.z), int(attrDecoder.w));
|
||||||
|
// 0
|
||||||
|
backupReg0i = R0i.x;
|
||||||
|
PV0i.x = 0x3f800000;
|
||||||
|
PV0i.y = 0x40400000;
|
||||||
|
PV0i.z = (backupReg0i == int(1))?int(0xFFFFFFFF):int(0x0);
|
||||||
|
R127i.w = 0x3f800000;
|
||||||
|
R127i.x = 0xbf800000;
|
||||||
|
PS0i = R127i.x;
|
||||||
|
// 1
|
||||||
|
R3i.x = uf_remappedVS[0].z;
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R3i.x) / 2.0);
|
||||||
|
PV1i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[1].z) * intBitsToFloat(0x3b808081));
|
||||||
|
R123i.z = ((PV0i.z == 0)?(PV0i.x):(0xc0400000));
|
||||||
|
PV1i.z = R123i.z;
|
||||||
|
R123i.w = ((PV0i.z == 0)?(PV0i.y):(0xbf800000));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R2i.w = 0x3f800000;
|
||||||
|
PS1i = R2i.w;
|
||||||
|
// 2
|
||||||
|
R2i.x = ((R0i.x == 0)?(R127i.x):(PV1i.w));
|
||||||
|
PV0i.x = R2i.x;
|
||||||
|
R2i.y = ((R0i.x == 0)?(R127i.w):(PV1i.z));
|
||||||
|
PV0i.y = R2i.y;
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + -(0.5));
|
||||||
|
R2i.z = floatBitsToInt(intBitsToFloat(R2i.z) * 2.0);
|
||||||
|
R0i.w = 0x3d2aaaab;
|
||||||
|
R0i.y = 0;
|
||||||
|
PS0i = R0i.y;
|
||||||
|
// 3
|
||||||
|
R1i.xyz = ivec3(0x3e000000,0,floatBitsToInt(-(intBitsToFloat(PV0i.y))));
|
||||||
|
R1i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[2].z)));
|
||||||
|
R1i.w = floatBitsToInt(intBitsToFloat(R1i.w) / 2.0);
|
||||||
|
R4i.x = floatBitsToInt((intBitsToFloat(PV0i.x) * 0.5 + 0.5));
|
||||||
|
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));
|
||||||
|
// export
|
||||||
|
// skipped export to semanticId 255
|
||||||
|
// 0
|
||||||
|
R126i.x = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
|
||||||
|
R4i.y = floatBitsToInt((intBitsToFloat(R1i.z) * 0.5 + 0.5));
|
||||||
|
PV0i.y = R4i.y;
|
||||||
|
PV0i.z = floatBitsToInt(-(intBitsToFloat(R2i.y)));
|
||||||
|
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
|
||||||
|
PV0i.w = R2i.x;
|
||||||
|
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) / 2.0);
|
||||||
|
R125i.z = floatBitsToInt(intBitsToFloat(R1i.w) + -(0.5));
|
||||||
|
PS0i = R125i.z;
|
||||||
|
// 1
|
||||||
|
R123i.x = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].w) * 2.0 / resXScale + intBitsToFloat(PV0i.y)));
|
||||||
|
PV1i.x = R123i.x;
|
||||||
|
R126i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedVS[4].x)));
|
||||||
|
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) * 2.0);
|
||||||
|
R1i.z = uf_remappedVS[4].y;
|
||||||
|
R1i.z = floatBitsToInt(intBitsToFloat(R1i.z) * 2.0);
|
||||||
|
R127i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.x));
|
||||||
|
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R1i.w));
|
||||||
|
PS1i = R127i.z;
|
||||||
|
// 2
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].y) * resYScale);
|
||||||
|
R127i.x = floatBitsToInt(intBitsToFloat(R127i.x) / 2.0);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedVS[3].x) * resXScale);
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
|
||||||
|
R126i.z = floatBitsToInt((intBitsToFloat(uf_remappedVS[3].z) * 2.0 / resXScale + intBitsToFloat(R4i.x)));
|
||||||
|
R126i.w = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R126i.x));
|
||||||
|
R124i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R125i.z));
|
||||||
|
PS0i = R124i.z;
|
||||||
|
// 3
|
||||||
|
R125i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R127i.z)));
|
||||||
|
R127i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(R127i.w)));
|
||||||
|
R127i.z = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].w)/resYScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.y)));
|
||||||
|
R123i.w = floatBitsToInt((-(intBitsToFloat(uf_remappedVS[3].z)/resXScale) * intBitsToFloat(0x3c23d70a) + intBitsToFloat(R4i.x)));
|
||||||
|
PV1i.w = R123i.w;
|
||||||
|
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.x), intBitsToFloat(PV0i.y)));
|
||||||
|
PS1i = R127i.w;
|
||||||
|
// 4
|
||||||
|
backupReg0i = R126i.w;
|
||||||
|
PV0i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R125i.z));
|
||||||
|
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(R126i.x));
|
||||||
|
R126i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(R127i.x)));
|
||||||
|
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(backupReg0i)));
|
||||||
|
R3i.z = PV1i.w;
|
||||||
|
PS0i = R3i.z;
|
||||||
|
// 5
|
||||||
|
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.y), intBitsToFloat(PV0i.y)));
|
||||||
|
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||||
|
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(R124i.z)));
|
||||||
|
R3i.w = R127i.z;
|
||||||
|
R4i.z = R127i.y;
|
||||||
|
PS1i = R4i.z;
|
||||||
|
// 6
|
||||||
|
R3i.x = floatBitsToInt(intBitsToFloat(R127i.w) * 0.25);
|
||||||
|
R3i.y = floatBitsToInt(intBitsToFloat(R126i.z) * 0.25);
|
||||||
|
R1i.z = R126i.w;
|
||||||
|
R4i.w = R125i.x;
|
||||||
|
R1i.w = PV1i.z;
|
||||||
|
PS0i = R1i.w;
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem5 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
|
||||||
|
// export
|
||||||
|
passParameterSem6 = vec4(intBitsToFloat(R3i.x), intBitsToFloat(R3i.y), intBitsToFloat(R3i.z), intBitsToFloat(R3i.w));
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
#extension GL_ARB_shading_language_packing : enable
|
||||||
|
// shader 8cab2ed476b991ea
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 1.25;
|
||||||
|
const float resYScale = 1.25;
|
||||||
|
|
||||||
|
uniform ivec4 uf_remappedVS[1];
|
||||||
|
uniform vec2 uf_windowSpaceToClipSpaceTransform;
|
||||||
|
layout(location = 0) in uvec4 attrDataSem0;
|
||||||
|
layout(location = 1) in uvec4 attrDataSem1;
|
||||||
|
out gl_PerVertex
|
||||||
|
{
|
||||||
|
vec4 gl_Position;
|
||||||
|
float gl_PointSize;
|
||||||
|
};
|
||||||
|
layout(location = 1) out vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passParameterSem0;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
uvec4 attrDecoder;
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
|
||||||
|
attrDecoder.xyz = attrDataSem0.xyz;
|
||||||
|
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
attrDecoder.xy = attrDataSem1.xy;
|
||||||
|
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
|
||||||
|
attrDecoder.z = 0;
|
||||||
|
attrDecoder.w = 0;
|
||||||
|
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
|
||||||
|
// 0
|
||||||
|
backupReg0f = R1f.x;
|
||||||
|
backupReg1f = R1f.y;
|
||||||
|
R1f.x = backupReg0f;
|
||||||
|
R1f.x *= 2.0;
|
||||||
|
R1f.y = backupReg1f;
|
||||||
|
R1f.y *= 2.0;
|
||||||
|
R1f.z = 1.0;
|
||||||
|
R0f.w = R2f.x;
|
||||||
|
PV0f.w = R0f.w;
|
||||||
|
R0f.y = R2f.y;
|
||||||
|
PS0f = R0f.y;
|
||||||
|
// 1
|
||||||
|
PV1f.x = -(intBitsToFloat(uf_remappedVS[0].w)/resXScale);
|
||||||
|
PV1f.x /= 2.0;
|
||||||
|
PV1f.y = -(intBitsToFloat(uf_remappedVS[0].z)/resYScale);
|
||||||
|
PV1f.y /= 2.0;
|
||||||
|
R2f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedVS[0].x)*resXScale) + 0.5);
|
||||||
|
PS1f = R2f.x;
|
||||||
|
// 2
|
||||||
|
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);
|
||||||
|
// export
|
||||||
|
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||||
|
// export
|
||||||
|
passParameterSem0 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
#version 420
|
||||||
|
#extension GL_ARB_texture_gather : enable
|
||||||
|
// shader a5b3a5e5ab2938bc
|
||||||
|
// AARestore v2
|
||||||
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
const float resXScale = 1.25;
|
||||||
|
const float resYScale = 1.25;
|
||||||
|
|
||||||
|
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
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 1) in vec4 passParameterSem1;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
uniform vec2 uf_fragCoordScale;
|
||||||
|
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; }
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 R0f = vec4(0.0);
|
||||||
|
vec4 R1f = vec4(0.0);
|
||||||
|
vec4 R2f = vec4(0.0);
|
||||||
|
vec4 R123f = vec4(0.0);
|
||||||
|
vec4 R125f = vec4(0.0);
|
||||||
|
vec4 R126f = vec4(0.0);
|
||||||
|
vec4 R127f = vec4(0.0);
|
||||||
|
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||||
|
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||||
|
float PS0f = 0.0, PS1f = 0.0;
|
||||||
|
vec4 tempf = vec4(0.0);
|
||||||
|
float tempResultf;
|
||||||
|
int tempResulti;
|
||||||
|
ivec4 ARi = ivec4(0);
|
||||||
|
bool predResult = true;
|
||||||
|
vec3 cubeMapSTM;
|
||||||
|
int cubeMapFaceId;
|
||||||
|
R0f = passParameterSem0;
|
||||||
|
R1f = passParameterSem1;
|
||||||
|
R2f.w = (texture(textureUnitPS1, R0f.xy).x);
|
||||||
|
R0f.xyzw = (textureGather(textureUnitPS2, R0f.xy).xyzw);
|
||||||
|
// 0
|
||||||
|
backupReg0f = R0f.y;
|
||||||
|
backupReg1f = R0f.x;
|
||||||
|
PV0f.x = -(R2f.w) + R0f.w;
|
||||||
|
PV0f.y = -(R2f.w) + R0f.z;
|
||||||
|
PV0f.z = -(R2f.w) + backupReg0f;
|
||||||
|
PV0f.w = -(R2f.w) + backupReg1f;
|
||||||
|
PS0f = R2f.w + intBitsToFloat(uf_remappedPS[0].x);
|
||||||
|
// 1
|
||||||
|
R127f.x = max(PV0f.w, -(PV0f.w));
|
||||||
|
PV1f.y = max(PV0f.z, -(PV0f.z));
|
||||||
|
R127f.z = max(PV0f.y, -(PV0f.y));
|
||||||
|
R127f.w = max(PV0f.x, -(PV0f.x));
|
||||||
|
PS1f = 1.0 / PS0f;
|
||||||
|
// 2
|
||||||
|
R126f.x = intBitsToFloat(uf_remappedPS[1].w) * PS1f;
|
||||||
|
R127f.y = PV1f.y * -(1.0);
|
||||||
|
R126f.z = floor(R1f.y);
|
||||||
|
R125f.w = floor(R1f.x);
|
||||||
|
PV0f.w = R125f.w;
|
||||||
|
PS0f = PV1f.y * -(1.0);
|
||||||
|
// 3
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.z,R127f.x,PS0f),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV1f.x = tempf.x;
|
||||||
|
PV1f.y = tempf.x;
|
||||||
|
PV1f.z = tempf.x;
|
||||||
|
PV1f.w = tempf.x;
|
||||||
|
R126f.w = tempf.x;
|
||||||
|
R126f.y = R1f.x + -(PV0f.w);
|
||||||
|
PS1f = R126f.y;
|
||||||
|
// 4
|
||||||
|
tempf.x = dot(vec4(R127f.w,R127f.x,R127f.z,R127f.y),vec4(1.0,-(1.0),1.0,1.0));
|
||||||
|
PV0f.x = tempf.x;
|
||||||
|
PV0f.y = tempf.x;
|
||||||
|
PV0f.z = tempf.x;
|
||||||
|
PV0f.w = tempf.x;
|
||||||
|
PS0f = R1f.y + -(R126f.z);
|
||||||
|
// 5
|
||||||
|
R123f.x = (mul_nonIEEE(R126f.x,PV0f.x) + PS0f);
|
||||||
|
R123f.x = clamp(R123f.x, 0.0, 1.0);
|
||||||
|
PV1f.x = R123f.x;
|
||||||
|
R123f.y = (mul_nonIEEE(R126f.x,R126f.w) + R126f.y);
|
||||||
|
R123f.y = clamp(R123f.y, 0.0, 1.0);
|
||||||
|
PV1f.y = R123f.y;
|
||||||
|
// 6
|
||||||
|
PV0f.z = R126f.z + PV1f.x;
|
||||||
|
PV0f.w = R125f.w + PV1f.y;
|
||||||
|
// 7
|
||||||
|
R1f.x = (mul_nonIEEE(PV0f.w,intBitsToFloat(uf_remappedPS[2].z)/resXScale) + R1f.z);
|
||||||
|
R1f.y = (mul_nonIEEE(PV0f.z,intBitsToFloat(uf_remappedPS[2].w)/resYScale) + R1f.w);
|
||||||
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
|
// export
|
||||||
|
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user