mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-22 09:39:17 +01:00
[TP] DOF,AA removal 4320, 1440, 2160
Twilight princess Update - Buffers for dof shadow Add - AA removal in enhancements
This commit is contained in:
parent
366fc98318
commit
b187e5bbf6
@ -0,0 +1,151 @@
|
||||
#version 400
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 34755035276148c0 // AA removal Twlight princess
|
||||
uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4001000 res 1920x1080x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
|
||||
uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5187000 res 1920x1080x1 dim 1 tm: 4 format 0011 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
|
||||
in vec4 passParameter0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
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 R123i = ivec4(0);
|
||||
ivec4 R127i = ivec4(0);
|
||||
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
|
||||
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||
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;
|
||||
int loopStuckCounter = 0;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameter0);
|
||||
|
||||
R1i.xyzw = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R0i.xy)).wzxy);
|
||||
R2i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).xyzw);
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
/*
|
||||
R0i.w = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R0i.xy)).y);
|
||||
// 0
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(0xba088889));
|
||||
PV0i.x = R1i.x;
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(0xba72b9d6));
|
||||
PV0i.y = R1i.y;
|
||||
R2i.z = R0i.x;
|
||||
PV0i.z = R2i.z;
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(0xba72b9d6));
|
||||
PS0i = R2i.y;
|
||||
// 1
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(0xba088889));
|
||||
PV1i.x = R3i.x;
|
||||
R3i.y = R0i.y;
|
||||
PV1i.y = R3i.y;
|
||||
R1i.xyzw = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R1i.xy)).xyzw);
|
||||
R2i.yz = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R2i.zy)).yz);
|
||||
R3i.xy = floatBitsToInt(textureGather(textureUnitPS1, intBitsToFloat(R3i.xy)).xy);
|
||||
// 0
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(R2i.z) + intBitsToFloat(R3i.x));
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(R0i.w));
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(R3i.y));
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(R2i.y));
|
||||
// 1
|
||||
R123i.x = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.x))));
|
||||
PV1i.x = R123i.x;
|
||||
R123i.y = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.y))));
|
||||
PV1i.y = R123i.y;
|
||||
R123i.z = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.z))));
|
||||
PV1i.z = R123i.z;
|
||||
R123i.w = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(0x40000000) + -(intBitsToFloat(PV0i.w))));
|
||||
PV1i.w = R123i.w;
|
||||
// 2
|
||||
PV0i.x = floatBitsToInt(max(intBitsToFloat(PV1i.x), -(intBitsToFloat(PV1i.x))));
|
||||
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.y), -(intBitsToFloat(PV1i.y))));
|
||||
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.z), -(intBitsToFloat(PV1i.z))));
|
||||
PV0i.w = floatBitsToInt(max(intBitsToFloat(PV1i.w), -(intBitsToFloat(PV1i.w))));
|
||||
// 3
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(0xb400d959));
|
||||
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(0xb400d959));
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(0xb400d959));
|
||||
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(0xb400d959));
|
||||
// 4
|
||||
R123i.x = ((intBitsToFloat(PV1i.w) >= 0.0)?(floatBitsToInt(1.0)):(0));
|
||||
PV0i.x = R123i.x;
|
||||
R123i.y = ((intBitsToFloat(PV1i.z) >= 0.0)?(floatBitsToInt(1.0)):(0));
|
||||
PV0i.y = R123i.y;
|
||||
R123i.z = ((intBitsToFloat(PV1i.y) >= 0.0)?(floatBitsToInt(1.0)):(0));
|
||||
PV0i.z = R123i.z;
|
||||
R123i.w = ((intBitsToFloat(PV1i.x) >= 0.0)?(floatBitsToInt(1.0)):(0));
|
||||
PV0i.w = R123i.w;
|
||||
// 5
|
||||
tempi.x = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV0i.y) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV0i.z) * intBitsToFloat(0x3e800000) + intBitsToFloat(PV0i.w) * intBitsToFloat(0x3e800000));
|
||||
PV1i.x = tempi.x;
|
||||
PV1i.y = tempi.x;
|
||||
PV1i.z = tempi.x;
|
||||
PV1i.w = tempi.x;
|
||||
// 6
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(0x3f400000)));
|
||||
PV0i.z = R127i.z;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt((intBitsToFloat(PV0i.z) * intBitsToFloat(0xba088889) + intBitsToFloat(R0i.x)));
|
||||
PV1i.x = R1i.x;
|
||||
R1i.y = R0i.y;
|
||||
PV1i.y = R1i.y;
|
||||
R2i.z = R0i.x;
|
||||
PV1i.z = R2i.z;
|
||||
R2i.y = floatBitsToInt((intBitsToFloat(PV0i.z) * intBitsToFloat(0xba72b9d6) + intBitsToFloat(R0i.y)));
|
||||
PS1i = R2i.y;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(0x3a088889) + intBitsToFloat(R0i.x)));
|
||||
PV0i.x = R3i.x;
|
||||
R3i.y = R0i.y;
|
||||
PV0i.y = R3i.y;
|
||||
R0i.w = floatBitsToInt((intBitsToFloat(R127i.z) * intBitsToFloat(0x3a72b9d6) + intBitsToFloat(R0i.y)));
|
||||
PV0i.w = R0i.w;
|
||||
R1i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyzw);
|
||||
R2i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.zy)).xyzw);
|
||||
R3i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R3i.xy)).xyzw);
|
||||
R0i.xyzw = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xw)).xyzw);
|
||||
// 0
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(R1i.w) + intBitsToFloat(R2i.w));
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(R2i.z));
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(R2i.y));
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(R2i.x));
|
||||
// 1
|
||||
PV1i.x = floatBitsToInt(intBitsToFloat(R3i.w) + intBitsToFloat(PV0i.x));
|
||||
PV1i.y = floatBitsToInt(intBitsToFloat(R3i.z) + intBitsToFloat(PV0i.y));
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(PV0i.z));
|
||||
PV1i.w = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(PV0i.w));
|
||||
// 2
|
||||
backupReg0i = R0i.y;
|
||||
backupReg1i = R0i.x;
|
||||
PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(PV1i.x));
|
||||
PV0i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(PV1i.y));
|
||||
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV1i.z));
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(PV1i.w));
|
||||
// 3
|
||||
R0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(0x3e800000)));
|
||||
PV1i.x = R0i.x;
|
||||
R0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(0x3e800000)));
|
||||
PV1i.y = R0i.y;
|
||||
R0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(0x3e800000)));
|
||||
PV1i.z = R0i.z;
|
||||
R0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.x), intBitsToFloat(0x3e800000)));
|
||||
PV1i.w = R0i.w;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w)); */
|
||||
}
|
@ -1,15 +1,39 @@
|
||||
[Definition]
|
||||
titleIds = 000500001019C800,000500001019E600,000500001019E500
|
||||
name = "Twilight Princess HD - 4320p (8K)"
|
||||
name ="Twilight Princess HD 4320p"
|
||||
|
||||
[TextureRedefine] # tv
|
||||
width = 1920
|
||||
height = 1080
|
||||
overwriteWidth = 7680
|
||||
overwriteHeight = 4320
|
||||
[TextureRedefine] #
|
||||
width = 1920
|
||||
height = 1080
|
||||
formatsExcluded = 0x41A # exclude the intro background texture
|
||||
overwriteWidth = 7680
|
||||
overwriteHeight = 4320
|
||||
|
||||
[TextureRedefine] # gamepad
|
||||
width = 854
|
||||
height = 480
|
||||
overwriteWidth = 2562
|
||||
overwriteHeight = 1440
|
||||
#[TextureRedefine] # gamepad view
|
||||
#width = 854
|
||||
#height = 480
|
||||
#formatsExcluded =
|
||||
#overwriteWidth = 3413
|
||||
#overwriteHeight = 1920
|
||||
|
||||
[TextureRedefine] # Blur, bloom
|
||||
width = 960
|
||||
height = 540
|
||||
#formatsExcluded =
|
||||
overwriteWidth = 3840
|
||||
overwriteHeight = 2160
|
||||
|
||||
#[TextureRedefine] #colour grading
|
||||
#width = 480
|
||||
#height = 270
|
||||
#formats = 0x01a
|
||||
#overwriteWidth = 1920
|
||||
#overwriteHeight = 1080
|
||||
|
||||
##Textures
|
||||
[TextureRedefine] # Link shadow n light
|
||||
width = 384
|
||||
height = 384
|
||||
formats = 0x01a
|
||||
overwriteWidth = 1536
|
||||
overwriteHeight = 1536
|
@ -1,9 +1,39 @@
|
||||
[Definition]
|
||||
titleIds = 000500001019C800,000500001019E600,000500001019E500
|
||||
name = "Twilight Princess HD - 1440p (2K)"
|
||||
name ="Twilight Princess HD 1440p"
|
||||
|
||||
[TextureRedefine] # tv
|
||||
width = 1920
|
||||
height = 1080
|
||||
overwriteWidth = 2560
|
||||
overwriteHeight = 1440
|
||||
[TextureRedefine] # game rendering resolution. #
|
||||
width = 1920
|
||||
height = 1080
|
||||
formatsExcluded = 0x41A # exclude the intro background texture
|
||||
overwriteWidth = 2560
|
||||
overwriteHeight = 1440
|
||||
|
||||
#[TextureRedefine] # gamepad view
|
||||
#width = 854
|
||||
#height = 480
|
||||
#formatsExcluded =
|
||||
#overwriteWidth = 1138
|
||||
#overwriteHeight = 640
|
||||
|
||||
[TextureRedefine] # Blur, bloom
|
||||
width = 960
|
||||
height = 540
|
||||
#formatsExcluded =
|
||||
overwriteWidth = 1280
|
||||
overwriteHeight = 720
|
||||
|
||||
#[TextureRedefine] #colour grading
|
||||
#width = 480
|
||||
#height = 270
|
||||
#formats = 0x01a
|
||||
#overwriteWidth = 640
|
||||
#overwriteHeight = 360
|
||||
|
||||
##Textures
|
||||
[TextureRedefine] # Link shadow n light
|
||||
width = 384
|
||||
height = 384
|
||||
formats = 0x01a
|
||||
overwriteWidth = 1536
|
||||
overwriteHeight = 1536
|
@ -1,9 +1,39 @@
|
||||
[Definition]
|
||||
titleIds = 000500001019C800,000500001019E600,000500001019E500
|
||||
name = "Twilight Princess HD - 2160p (4K)"
|
||||
name ="Twilight Princess HD 2160p"
|
||||
|
||||
[TextureRedefine] # tv
|
||||
width = 1920
|
||||
height = 1080
|
||||
overwriteWidth = 3840
|
||||
overwriteHeight = 2160
|
||||
[TextureRedefine] #
|
||||
width = 1920
|
||||
height = 1080
|
||||
formatsExcluded = 0x41A # exclude the intro background texture
|
||||
overwriteWidth = 3840
|
||||
overwriteHeight = 2160
|
||||
|
||||
#[TextureRedefine] # gamepad view
|
||||
#width = 854
|
||||
#height = 480
|
||||
#formatsExcluded =
|
||||
#overwriteWidth = 1707 #Nearest integer
|
||||
#overwriteHeight = 960
|
||||
|
||||
[TextureRedefine] # Blur, bloom
|
||||
width = 960
|
||||
height = 540
|
||||
#formatsExcluded =
|
||||
overwriteWidth = 1920
|
||||
overwriteHeight = 1080
|
||||
|
||||
#[TextureRedefine] #colour grading
|
||||
#width = 480
|
||||
#height = 270
|
||||
#formats = 0x01a
|
||||
#overwriteWidth = 960 #Nearest integer
|
||||
#overwriteHeight = 540
|
||||
|
||||
##Textures
|
||||
[TextureRedefine] # Link shadow n light
|
||||
width = 384
|
||||
height = 384
|
||||
formats = 0x01a
|
||||
overwriteWidth = 1536
|
||||
overwriteHeight = 1536
|
Loading…
Reference in New Issue
Block a user