mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-23 01:59:18 +01:00
[BOTW][2160p][1440p] Add shader edit to fix dof when focused on enemy
before: https://cdn.discordapp.com/attachments/186102414317846529/362008127085871114/unknown.png after: https://cdn.discordapp.com/attachments/186102414317846529/362008294186811393/unknown.png
This commit is contained in:
parent
31dacea9ca
commit
ee77e0b504
@ -0,0 +1,68 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem3;
|
||||
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 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = passParameterSem3;
|
||||
|
||||
const float offset = 0.7;
|
||||
R0f.z = (R0f.z + 0.00052083333333333 * offset); // horizontal move
|
||||
R0f.y = (R0f.y - 0.00092592592592593 * offset); // vertical move
|
||||
R0f.x = (R0f.x - 0.00052083333333333 * offset); // second horizontal move
|
||||
R0f.w = (R0f.w + 0.00092592592592593 * offset); // second vertical move
|
||||
|
||||
R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
|
||||
R2f.xyz = (texture(textureUnitPS0, R0f.zy).xyz);
|
||||
R3f.xyz = (texture(textureUnitPS0, R0f.xw).xyz);
|
||||
R0f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
|
||||
// 0
|
||||
PV0f.x = R1f.x + R2f.x;
|
||||
PV0f.x /= 2.0;
|
||||
PV0f.z = R1f.z + R2f.z;
|
||||
PV0f.z /= 2.0;
|
||||
PV0f.w = R1f.y + R2f.y;
|
||||
PV0f.w /= 2.0;
|
||||
R1f.w = 0.0;
|
||||
PS0f = R1f.w;
|
||||
// 1
|
||||
R123f.x = (R3f.y * 0.5 + PV0f.w);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (R3f.x * 0.5 + PV0f.x);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.w = (R3f.z * 0.5 + PV0f.z);
|
||||
PV1f.w = R123f.w;
|
||||
// 2
|
||||
R1f.x = (R0f.x * 0.5 + PV1f.y)/2.0;
|
||||
R1f.y = (R0f.y * 0.5 + PV1f.x)/2.0;
|
||||
R1f.z = (R0f.z * 0.5 + PV1f.w)/2.0;
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem3;
|
||||
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 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = passParameterSem3;
|
||||
|
||||
const float offset = 0.95;
|
||||
R0f.z = (R0f.z + 0.00052083333333333 * offset); // horizontal move
|
||||
R0f.y = (R0f.y - 0.00092592592592593 * offset); // vertical move
|
||||
R0f.x = (R0f.x - 0.00052083333333333 * offset); // second horizontal move
|
||||
R0f.w = (R0f.w + 0.00092592592592593 * offset); // second vertical move
|
||||
|
||||
R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
|
||||
R2f.xyz = (texture(textureUnitPS0, R0f.zy).xyz);
|
||||
R3f.xyz = (texture(textureUnitPS0, R0f.xw).xyz);
|
||||
R0f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
|
||||
// 0
|
||||
PV0f.x = R1f.x + R2f.x;
|
||||
PV0f.x /= 2.0;
|
||||
PV0f.z = R1f.z + R2f.z;
|
||||
PV0f.z /= 2.0;
|
||||
PV0f.w = R1f.y + R2f.y;
|
||||
PV0f.w /= 2.0;
|
||||
R1f.w = 0.0;
|
||||
PS0f = R1f.w;
|
||||
// 1
|
||||
R123f.x = (R3f.y * 0.5 + PV0f.w);
|
||||
PV1f.x = R123f.x;
|
||||
R123f.y = (R3f.x * 0.5 + PV0f.x);
|
||||
PV1f.y = R123f.y;
|
||||
R123f.w = (R3f.z * 0.5 + PV0f.z);
|
||||
PV1f.w = R123f.w;
|
||||
// 2
|
||||
R1f.x = (R0f.x * 0.5 + PV1f.y)/2.0;
|
||||
R1f.y = (R0f.y * 0.5 + PV1f.x)/2.0;
|
||||
R1f.z = (R0f.z * 0.5 + PV1f.w)/2.0;
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
Loading…
Reference in New Issue
Block a user