mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-26 11:34:15 +01:00
remove blur shaders (#107)
* [BotW] remove blur shaders * [Splatoon] remove blur shaders Removing blur shaders for now we've noticed some of them got really CPU intensive. Our new plan: Creating branch with 'fixed' shaders that are less intensive (maybe something with the vertex shaders) and then when they're corrected push them to the master. It probably won't look as good but would (preferable, maybe not possible) remain radius and remove the grid look.
This commit is contained in:
parent
3e2c260094
commit
6f5bfdfaf2
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 2880
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.11011604, 0.20071416, 0.13842356, 0.07060718, 0.02643049, 0.00717399, 0.00138786, 0.00018683, 0.00001693, 0.00000098 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47169811, 3.43396226, 5.39622642, 7.35849057, 9.32075472, 11.28301887, 13.24528302, 15.20754717, 17.16981132 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<10; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 2880
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.08123271, 0.15437530, 0.12585196, 0.08706739, 0.05105315, 0.02532582, 0.01060251, 0.00373415, 0.00110209, 0.00027128 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48453608, 3.46391753, 5.44329897, 7.42268041, 9.40206186, 11.38144330, 13.36082474, 15.34020619, 17.31958763 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<10; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 2880
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.08123271, 0.15437530, 0.12585196, 0.08706739, 0.05105315, 0.02532582, 0.01060251, 0.00373415, 0.00110209, 0.00027128 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48453608, 3.46391753, 5.44329897, 7.42268041, 9.40206186, 11.38144330, 13.36082474, 15.34020619, 17.31958763 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<10; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 30 --reduce 30 37 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 2880
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.11011604, 0.20071416, 0.13842356, 0.07060718, 0.02643049, 0.00717399, 0.00138786, 0.00018683, 0.00001693, 0.00000098 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47169811, 3.43396226, 5.39622642, 7.35849057, 9.32075472, 11.28301887, 13.24528302, 15.20754717, 17.16981132 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<10; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 8 --reduce 8 37 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 4320
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.08679764, 0.16377778, 0.12975631, 0.08523885, 0.04634210, 0.02079453, 0.00767262, 0.00231673, 0.00056902, 0.00011284, 0.00001790, 0.00000225, 0.00000022, 0.00000002 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48235294, 3.45882353, 5.43529412, 7.41176471, 9.38823529, 11.36470588, 13.34117647, 15.31764706, 17.29411765, 19.27058824, 21.24705882, 23.22352941, 25.20000000 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<14; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 4320
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.05721114, 0.11153873, 0.10071616, 0.08380551, 0.06425089, 0.04537556, 0.02951030, 0.01766751, 0.00973277, 0.00493097, 0.00229618, 0.00098211, 0.00038554, 0.00013879, 0.00004577, 0.00001382, 0.00000381 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49230769, 3.48205128, 5.47179487, 7.46153846, 9.45128205, 11.44102564, 13.43076923, 15.42051282, 17.41025641, 19.40000000, 21.38974359, 23.37948718, 25.36923077, 27.35897436, 29.34871795, 31.33846154 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<17; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 4320
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.05721114, 0.11153873, 0.10071616, 0.08380551, 0.06425089, 0.04537556, 0.02951030, 0.01766751, 0.00973277, 0.00493097, 0.00229618, 0.00098211, 0.00038554, 0.00013879, 0.00004577, 0.00001382, 0.00000381 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49230769, 3.48205128, 5.47179487, 7.46153846, 9.45128205, 11.44102564, 13.43076923, 15.42051282, 17.41025641, 19.40000000, 21.38974359, 23.37948718, 25.36923077, 27.35897436, 29.34871795, 31.33846154 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<17; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 65 --reduce 65 65 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 4320
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.08679764, 0.16377778, 0.12975631, 0.08523885, 0.04634210, 0.02079453, 0.00767262, 0.00231673, 0.00056902, 0.00011284, 0.00001790, 0.00000225, 0.00000022, 0.00000002 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48235294, 3.45882353, 5.43529412, 7.41176471, 9.38823529, 11.36470588, 13.34117647, 15.31764706, 17.29411765, 19.27058824, 21.24705882, 23.22352941, 25.20000000 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<14; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 14 --reduce 14 57 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 5760
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.05842515, 0.11378184, 0.10229613, 0.08445599, 0.06401931, 0.04454418, 0.02843975, 0.01665463, 0.00894132, 0.00439816, 0.00198084, 0.00081621, 0.00030743, 0.00010575, 0.00003318, 0.00000949, 0.00000247, 0.00000058, 0.00000013, 0.00000002 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49197861, 3.48128342, 5.47058824, 7.45989305, 9.44919786, 11.43850267, 13.42780749, 15.41711230, 17.40641711, 19.39572193, 21.38502674, 23.37433155, 25.36363636, 27.35294118, 29.34224599, 31.33155080, 33.32085561, 35.31016043, 37.29946524 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<20; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 5760
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.04202302, 0.08289284, 0.07843703, 0.07101047, 0.06150497, 0.05096469, 0.04039985, 0.03063492, 0.02222034, 0.01541512, 0.01022743, 0.00648881, 0.00393634, 0.00228295, 0.00126565, 0.00067063, 0.00033957, 0.00016428, 0.00007592, 0.00003351, 0.00001412, 0.00000568, 0.00000218, 0.00000080, 0.00000028, 0.00000009 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49584488, 3.49030471, 5.48476454, 7.47922438, 9.47368421, 11.46814404, 13.46260388, 15.45706371, 17.45152355, 19.44598338, 21.44044321, 23.43490305, 25.42936288, 27.42382271, 29.41828255, 31.41274238, 33.40720222, 35.40166205, 37.39612188, 39.39058172, 41.38504155, 43.37950139, 45.37396122, 47.36842105, 49.36288089 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<26; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 5760
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.04202302, 0.08289284, 0.07843703, 0.07101047, 0.06150497, 0.05096469, 0.04039985, 0.03063492, 0.02222034, 0.01541512, 0.01022743, 0.00648881, 0.00393634, 0.00228295, 0.00126565, 0.00067063, 0.00033957, 0.00016428, 0.00007592, 0.00003351, 0.00001412, 0.00000568, 0.00000218, 0.00000080, 0.00000028, 0.00000009 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49584488, 3.49030471, 5.48476454, 7.47922438, 9.47368421, 11.46814404, 13.46260388, 15.45706371, 17.45152355, 19.44598338, 21.44044321, 23.43490305, 25.42936288, 27.42382271, 29.41828255, 31.41274238, 33.40720222, 35.40166205, 37.39612188, 39.39058172, 41.38504155, 43.37950139, 45.37396122, 47.36842105, 49.36288089 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<26; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 130 --reduce 130 101 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 5760
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.05842515, 0.11378184, 0.10229613, 0.08445599, 0.06401931, 0.04454418, 0.02843975, 0.01665463, 0.00894132, 0.00439816, 0.00198084, 0.00081621, 0.00030743, 0.00010575, 0.00003318, 0.00000949, 0.00000247, 0.00000058, 0.00000013, 0.00000002 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49197861, 3.48128342, 5.47058824, 7.45989305, 9.44919786, 11.43850267, 13.42780749, 15.41711230, 17.40641711, 19.39572193, 21.38502674, 23.37433155, 25.36363636, 27.35294118, 29.34224599, 31.33155080, 33.32085561, 35.31016043, 37.29946524 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<20; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 29 --reduce 29 129 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 0457fe3efc9a772f
|
||||
// Used for: Vertical Bloom 2880
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.09502547, 0.17728101, 0.13421680, 0.08118479, 0.03910895, 0.01493251, 0.00448942, 0.00105364, 0.00019089, 0.00002632, 0.00000271, 0.00000020, 0.00000001 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47887324, 3.45070423, 5.42253521, 7.39436620, 9.36619718, 11.33802817, 13.30985915, 15.28169014, 17.25352113, 19.22535211, 21.19718310, 23.16901408 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<13; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 34eaf9e211e76379 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[4];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c6000 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(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x156f2000 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(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 1) in vec4 passParameterSem1;
|
||||
layout(location = 2) in vec4 passParameterSem2;
|
||||
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
|
||||
void main()
|
||||
{
|
||||
vec4 R0f = vec4(0.0);
|
||||
vec2 R1f = vec2(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R4f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem1.x + passParameterSem2.x)/2, (passParameterSem1.y + passParameterSem1.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem2.x - passParameterSem1.x, passParameterSem1.w - passParameterSem1.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R2f += texture( textureUnitPS0, R1f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f.yxwz = R2f/count;
|
||||
|
||||
R0f.x = (texture(textureUnitPS1, R0f.xy).x);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
|
||||
R127f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedPS[0].z)) + intBitsToFloat(uf_remappedPS[0].w));
|
||||
R127f.w = clamp(R127f.w, 0.0, 1.0);
|
||||
PS0f = R127f.w;
|
||||
// 1
|
||||
|
||||
R127f.z = mul_nonIEEE(PS0f, intBitsToFloat(uf_remappedPS[1].z));
|
||||
PS1f = R127f.z;
|
||||
// 2
|
||||
|
||||
// 3
|
||||
PV1f.x = max(PV0f.w, 0.0);
|
||||
PV1f.y = max(PV0f.y, 0.0);
|
||||
PV1f.z = max(PV0f.z, 0.0);
|
||||
PV1f.w = max(PV0f.x, 0.0);
|
||||
// 4
|
||||
R127f.x = min(PV1f.y, intBitsToFloat(0x461c4000));
|
||||
PV0f.x = R127f.x;
|
||||
R127f.y = min(PV1f.w, intBitsToFloat(0x461c4000));
|
||||
PV0f.y = R127f.y;
|
||||
R126f.z = min(PV1f.x, intBitsToFloat(0x461c4000));
|
||||
PV0f.z = R126f.z;
|
||||
R126f.w = min(PV1f.z, intBitsToFloat(0x461c4000));
|
||||
PV0f.w = R126f.w;
|
||||
// 5
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,PV0f.w),vec4(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z),intBitsToFloat(uf_remappedPS[2].w)));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
// 6
|
||||
R123f.y = (mul_nonIEEE(R127f.w,R127f.z) + PV1f.x);
|
||||
PV0f.y = R123f.y;
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[3].z));
|
||||
// 8
|
||||
R2f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R2f.y = mul_nonIEEE(R127f.y, PV1f.x);
|
||||
R2f.z = mul_nonIEEE(R126f.z, PV1f.x);
|
||||
R2f.w = mul_nonIEEE(R126f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 2880
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.08123271, 0.15437530, 0.12585196, 0.08706739, 0.05105315, 0.02532582, 0.01060251, 0.00373415, 0.00110209, 0.00027128 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48453608, 3.46391753, 5.44329897, 7.42268041, 9.40206186, 11.38144330, 13.36082474, 15.34020619, 17.31958763 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<10; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 2880
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.08123271, 0.15437530, 0.12585196, 0.08706739, 0.05105315, 0.02532582, 0.01060251, 0.00373415, 0.00110209, 0.00027128 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48453608, 3.46391753, 5.44329897, 7.42268041, 9.40206186, 11.38144330, 13.36082474, 15.34020619, 17.31958763 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<10; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 30 --reduce 30 37 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,41 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 9fad3b3505a6d831
|
||||
// Used for: Horizontal Bloom 2880
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.09502547, 0.17728101, 0.13421680, 0.08118479, 0.03910895, 0.01493251, 0.00448942, 0.00105364, 0.00019089, 0.00002632, 0.00000271, 0.00000020, 0.00000001 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47887324, 3.45070423, 5.42253521, 7.39436620, 9.36619718, 11.33802817, 13.30985915, 15.28169014, 17.25352113, 19.22535211, 21.19718310, 23.16901408 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<13; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 9 --reduce 9 53 --linear
|
||||
// game original py blurninja.py --expand 0 --reduce 0 13 --linear
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 0457fe3efc9a772f
|
||||
// Used for: Vertical Bloom 4320
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.07731484, 0.14762709, 0.12265258, 0.08781380, 0.05412785, 0.02868527, 0.01304628, 0.00508044, 0.00168915, 0.00047786, 0.00011455, 0.00002316, 0.00000393, 0.00000055, 0.00000006, 0.00000001 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48598131, 3.46728972, 5.44859813, 7.42990654, 9.41121495, 11.39252336, 13.37383178, 15.35514019, 17.33644860, 19.31775701, 21.29906542, 23.28037383, 25.26168224, 27.24299065, 29.22429907 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<16; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 34eaf9e211e76379 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[4];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c6000 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(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x156f2000 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(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 1) in vec4 passParameterSem1;
|
||||
layout(location = 2) in vec4 passParameterSem2;
|
||||
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
|
||||
void main()
|
||||
{
|
||||
vec4 R0f = vec4(0.0);
|
||||
vec2 R1f = vec2(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R4f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem1.x + passParameterSem2.x)/2, (passParameterSem1.y + passParameterSem1.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem2.x - passParameterSem1.x, passParameterSem1.w - passParameterSem1.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R2f += texture( textureUnitPS0, R1f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f.yxwz = R2f/count;
|
||||
|
||||
R0f.x = (texture(textureUnitPS1, R0f.xy).x);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
|
||||
R127f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedPS[0].z)) + intBitsToFloat(uf_remappedPS[0].w));
|
||||
R127f.w = clamp(R127f.w, 0.0, 1.0);
|
||||
PS0f = R127f.w;
|
||||
// 1
|
||||
|
||||
R127f.z = mul_nonIEEE(PS0f, intBitsToFloat(uf_remappedPS[1].z));
|
||||
PS1f = R127f.z;
|
||||
// 2
|
||||
|
||||
// 3
|
||||
PV1f.x = max(PV0f.w, 0.0);
|
||||
PV1f.y = max(PV0f.y, 0.0);
|
||||
PV1f.z = max(PV0f.z, 0.0);
|
||||
PV1f.w = max(PV0f.x, 0.0);
|
||||
// 4
|
||||
R127f.x = min(PV1f.y, intBitsToFloat(0x461c4000));
|
||||
PV0f.x = R127f.x;
|
||||
R127f.y = min(PV1f.w, intBitsToFloat(0x461c4000));
|
||||
PV0f.y = R127f.y;
|
||||
R126f.z = min(PV1f.x, intBitsToFloat(0x461c4000));
|
||||
PV0f.z = R126f.z;
|
||||
R126f.w = min(PV1f.z, intBitsToFloat(0x461c4000));
|
||||
PV0f.w = R126f.w;
|
||||
// 5
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,PV0f.w),vec4(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z),intBitsToFloat(uf_remappedPS[2].w)));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
// 6
|
||||
R123f.y = (mul_nonIEEE(R127f.w,R127f.z) + PV1f.x);
|
||||
PV0f.y = R123f.y;
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[3].z));
|
||||
// 8
|
||||
R2f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R2f.y = mul_nonIEEE(R127f.y, PV1f.x);
|
||||
R2f.z = mul_nonIEEE(R126f.z, PV1f.x);
|
||||
R2f.w = mul_nonIEEE(R126f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 4320
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.05721114, 0.11153873, 0.10071616, 0.08380551, 0.06425089, 0.04537556, 0.02951030, 0.01766751, 0.00973277, 0.00493097, 0.00229618, 0.00098211, 0.00038554, 0.00013879, 0.00004577, 0.00001382, 0.00000381 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49230769, 3.48205128, 5.47179487, 7.46153846, 9.45128205, 11.44102564, 13.43076923, 15.42051282, 17.41025641, 19.40000000, 21.38974359, 23.37948718, 25.36923077, 27.35897436, 29.34871795, 31.33846154 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<17; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 4320
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.05721114, 0.11153873, 0.10071616, 0.08380551, 0.06425089, 0.04537556, 0.02951030, 0.01766751, 0.00973277, 0.00493097, 0.00229618, 0.00098211, 0.00038554, 0.00013879, 0.00004577, 0.00001382, 0.00000381 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49230769, 3.48205128, 5.47179487, 7.46153846, 9.45128205, 11.44102564, 13.43076923, 15.42051282, 17.41025641, 19.40000000, 21.38974359, 23.37948718, 25.36923077, 27.35897436, 29.34871795, 31.33846154 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<17; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 65 --reduce 65 65 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,41 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 9fad3b3505a6d831
|
||||
// Used for: Horizontal Bloom 4320
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.07731484, 0.14762709, 0.12265258, 0.08781380, 0.05412785, 0.02868527, 0.01304628, 0.00508044, 0.00168915, 0.00047786, 0.00011455, 0.00002316, 0.00000393, 0.00000055, 0.00000006, 0.00000001 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48598131, 3.46728972, 5.44859813, 7.42990654, 9.41121495, 11.39252336, 13.37383178, 15.35514019, 17.33644860, 19.31775701, 21.29906542, 23.28037383, 25.26168224, 27.24299065, 29.22429907 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<16; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 15 --reduce 15 77 --linear
|
||||
// game original py blurninja.py --expand 0 --reduce 0 13 --linear
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 0457fe3efc9a772f
|
||||
// Used for: Vertical Bloom 5760
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.06731324, 0.12996513, 0.11288345, 0.08757379, 0.06065717, 0.03748843, 0.02065758, 0.01013916, 0.00442739, 0.00171752, 0.00059095, 0.00017999, 0.00004843, 0.00001148, 0.00000239, 0.00000044, 0.00000007, 0.00000001 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48936170, 3.47517730, 5.46099291, 7.44680851, 9.43262411, 11.41843972, 13.40425532, 15.39007092, 17.37588652, 19.36170213, 21.34751773, 23.33333333, 25.31914894, 27.30496454, 29.29078014, 31.27659574, 33.26241135 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<18; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 34eaf9e211e76379 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[4];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c6000 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(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x156f2000 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(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 1) in vec4 passParameterSem1;
|
||||
layout(location = 2) in vec4 passParameterSem2;
|
||||
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
|
||||
void main()
|
||||
{
|
||||
vec4 R0f = vec4(0.0);
|
||||
vec2 R1f = vec2(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R4f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem1.x + passParameterSem2.x)/2, (passParameterSem1.y + passParameterSem1.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem2.x - passParameterSem1.x, passParameterSem1.w - passParameterSem1.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R2f += texture( textureUnitPS0, R1f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f.yxwz = R2f/count;
|
||||
|
||||
R0f.x = (texture(textureUnitPS1, R0f.xy).x);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
|
||||
R127f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedPS[0].z)) + intBitsToFloat(uf_remappedPS[0].w));
|
||||
R127f.w = clamp(R127f.w, 0.0, 1.0);
|
||||
PS0f = R127f.w;
|
||||
// 1
|
||||
|
||||
R127f.z = mul_nonIEEE(PS0f, intBitsToFloat(uf_remappedPS[1].z));
|
||||
PS1f = R127f.z;
|
||||
// 2
|
||||
|
||||
// 3
|
||||
PV1f.x = max(PV0f.w, 0.0);
|
||||
PV1f.y = max(PV0f.y, 0.0);
|
||||
PV1f.z = max(PV0f.z, 0.0);
|
||||
PV1f.w = max(PV0f.x, 0.0);
|
||||
// 4
|
||||
R127f.x = min(PV1f.y, intBitsToFloat(0x461c4000));
|
||||
PV0f.x = R127f.x;
|
||||
R127f.y = min(PV1f.w, intBitsToFloat(0x461c4000));
|
||||
PV0f.y = R127f.y;
|
||||
R126f.z = min(PV1f.x, intBitsToFloat(0x461c4000));
|
||||
PV0f.z = R126f.z;
|
||||
R126f.w = min(PV1f.z, intBitsToFloat(0x461c4000));
|
||||
PV0f.w = R126f.w;
|
||||
// 5
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,PV0f.w),vec4(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z),intBitsToFloat(uf_remappedPS[2].w)));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
// 6
|
||||
R123f.y = (mul_nonIEEE(R127f.w,R127f.z) + PV1f.x);
|
||||
PV0f.y = R123f.y;
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[3].z));
|
||||
// 8
|
||||
R2f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R2f.y = mul_nonIEEE(R127f.y, PV1f.x);
|
||||
R2f.z = mul_nonIEEE(R126f.z, PV1f.x);
|
||||
R2f.w = mul_nonIEEE(R126f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 5760
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.04202302, 0.08289284, 0.07843703, 0.07101047, 0.06150497, 0.05096469, 0.04039985, 0.03063492, 0.02222034, 0.01541512, 0.01022743, 0.00648881, 0.00393634, 0.00228295, 0.00126565, 0.00067063, 0.00033957, 0.00016428, 0.00007592, 0.00003351, 0.00001412, 0.00000568, 0.00000218, 0.00000080, 0.00000028, 0.00000009 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49584488, 3.49030471, 5.48476454, 7.47922438, 9.47368421, 11.46814404, 13.46260388, 15.45706371, 17.45152355, 19.44598338, 21.44044321, 23.43490305, 25.42936288, 27.42382271, 29.41828255, 31.41274238, 33.40720222, 35.40166205, 37.39612188, 39.39058172, 41.38504155, 43.37950139, 45.37396122, 47.36842105, 49.36288089 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<26; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 5760
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.04202302, 0.08289284, 0.07843703, 0.07101047, 0.06150497, 0.05096469, 0.04039985, 0.03063492, 0.02222034, 0.01541512, 0.01022743, 0.00648881, 0.00393634, 0.00228295, 0.00126565, 0.00067063, 0.00033957, 0.00016428, 0.00007592, 0.00003351, 0.00001412, 0.00000568, 0.00000218, 0.00000080, 0.00000028, 0.00000009 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.49584488, 3.49030471, 5.48476454, 7.47922438, 9.47368421, 11.46814404, 13.46260388, 15.45706371, 17.45152355, 19.44598338, 21.44044321, 23.43490305, 25.42936288, 27.42382271, 29.41828255, 31.41274238, 33.40720222, 35.40166205, 37.39612188, 39.39058172, 41.38504155, 43.37950139, 45.37396122, 47.36842105, 49.36288089 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<26; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 130 --reduce 130 101 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,41 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 9fad3b3505a6d831
|
||||
// Used for: Horizontal Bloom 5760
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.06731324, 0.12996513, 0.11288345, 0.08757379, 0.06065717, 0.03748843, 0.02065758, 0.01013916, 0.00442739, 0.00171752, 0.00059095, 0.00017999, 0.00004843, 0.00001148, 0.00000239, 0.00000044, 0.00000007, 0.00000001 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.48936170, 3.47517730, 5.46099291, 7.44680851, 9.43262411, 11.41843972, 13.40425532, 15.39007092, 17.37588652, 19.36170213, 21.34751773, 23.33333333, 25.31914894, 27.30496454, 29.29078014, 31.27659574, 33.26241135 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<18; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 18 --reduce 18 105 --linear
|
||||
// game original py blurninja.py --expand 0 --reduce 0 13 --linear
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.20064856, 0.30320227, 0.09647345 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.41176471, 3.29411765 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.20064856, 0.30320227, 0.09647345 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.41176471, 3.29411765 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 4 --reduce 4 9 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 3 --reduce 3 13 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.20064856, 0.30320227, 0.09647345 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.41176471, 3.29411765 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.20064856, 0.30320227, 0.09647345 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.41176471, 3.29411765 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 4 --reduce 4 9 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 3 --reduce 3 13 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.16122494, 0.26575540, 0.12180456, 0.02865990, 0.00316767 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44000000, 3.36000000, 5.28000000, 7.20000000 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<5; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.15644460, 0.26148598, 0.12689761, 0.03339411 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44444444, 3.37037037, 5.29629630 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.15644460, 0.26148598, 0.12689761, 0.03339411 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44444444, 3.37037037, 5.29629630 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 7 --reduce 7 13 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.16122494, 0.26575540, 0.12180456, 0.02865990, 0.00316767 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44000000, 3.36000000, 5.28000000, 7.20000000 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<5; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 4 --reduce 4 17 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.16122494, 0.26575540, 0.12180456, 0.02865990, 0.00316767 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44000000, 3.36000000, 5.28000000, 7.20000000 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<5; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.15644460, 0.26148598, 0.12689761, 0.03339411 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44444444, 3.37037037, 5.29629630 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.15644460, 0.26148598, 0.12689761, 0.03339411 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44444444, 3.37037037, 5.29629630 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 7 --reduce 7 13 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 1440
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.16122494, 0.26575540, 0.12180456, 0.02865990, 0.00316767 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44000000, 3.36000000, 5.28000000, 7.20000000 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<5; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 4 --reduce 4 17 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 1800
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.13583460, 0.23632042, 0.13504024, 0.04857179, 0.01068579, 0.00136997, 0.00009448 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.45714286, 3.40000000, 5.34285714, 7.28571429, 9.22857143, 11.17142857 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<7; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 1800
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.12618160, 0.22395869, 0.13875701, 0.05806447, 0.01612902 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.46341463, 3.41463415, 5.36585366, 7.31707317 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<5; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 1800
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.12618160, 0.22395869, 0.13875701, 0.05806447, 0.01612902 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.46341463, 3.41463415, 5.36585366, 7.31707317 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<5; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 12 --reduce 12 17 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 1800
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.13583460, 0.23632042, 0.13504024, 0.04857179, 0.01068579, 0.00136997, 0.00009448 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.45714286, 3.40000000, 5.34285714, 7.28571429, 9.22857143, 11.17142857 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<7; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 5 --reduce 5 25 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.12537086, 0.22251971, 0.13786547, 0.05769140, 0.01602539, 0.00287352, 0.00031864, 0.00002045 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.46341463, 3.41463415, 5.36585366, 7.31707317, 9.26829268, 11.21951220, 13.17073171 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<8; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.10621973, 0.19485826, 0.13789364, 0.07373992, 0.02961301, 0.00884599, 0.00193931 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47368421, 3.43859649, 5.40350877, 7.36842105, 9.33333333, 11.29824561 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<7; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.10621973, 0.19485826, 0.13789364, 0.07373992, 0.02961301, 0.00884599, 0.00193931 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47368421, 3.43859649, 5.40350877, 7.36842105, 9.33333333, 11.29824561 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<7; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 16 --reduce 16 25 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.12537086, 0.22251971, 0.13786547, 0.05769140, 0.01602539, 0.00287352, 0.00031864, 0.00002045 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.46341463, 3.41463415, 5.36585366, 7.31707317, 9.26829268, 11.21951220, 13.17073171 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<8; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 6 --reduce 6 29 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.12537086, 0.22251971, 0.13786547, 0.05769140, 0.01602539, 0.00287352, 0.00031864, 0.00002045 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.46341463, 3.41463415, 5.36585366, 7.31707317, 9.26829268, 11.21951220, 13.17073171 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<8; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.10621973, 0.19485826, 0.13789364, 0.07373992, 0.02961301, 0.00884599, 0.00193931 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47368421, 3.43859649, 5.40350877, 7.36842105, 9.33333333, 11.29824561 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<7; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.10621973, 0.19485826, 0.13789364, 0.07373992, 0.02961301, 0.00884599, 0.00193931 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.47368421, 3.43859649, 5.40350877, 7.36842105, 9.33333333, 11.29824561 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<7; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 16 --reduce 16 25 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,39 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 2160
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
uniform float weight[] = float[]( 0.12537086, 0.22251971, 0.13786547, 0.05769140, 0.01602539, 0.00287352, 0.00031864, 0.00002045 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.46341463, 3.41463415, 5.36585366, 7.31707317, 9.26829268, 11.21951220, 13.17073171 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<8; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 6 --reduce 6 29 --linear
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,83 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 10584c6fc5857351 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[2];
|
||||
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 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()
|
||||
{
|
||||
vec2 R0f = vec2(0.0);
|
||||
vec4 R1f = vec4(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem0.x + passParameterSem1.x)/2, (passParameterSem0.y + passParameterSem0.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem1.x - passParameterSem0.x, passParameterSem0.w - passParameterSem0.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f = R1f/count;
|
||||
R127f.xzw = PV0f.xzw;
|
||||
R126f.y = PV0f.y;
|
||||
// 3
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,-0.0),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),0.0));
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
PS1f = mul_nonIEEE(PV0f.w, intBitsToFloat(uf_remappedPS[0].w));
|
||||
// 4
|
||||
tempf.x = dot(vec4(R127f.x,R126f.y,R127f.z,PS1f),vec4(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z),1.0));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV0f.x = tempf.x;
|
||||
PV0f.y = tempf.x;
|
||||
PV0f.z = tempf.x;
|
||||
PV0f.w = tempf.x;
|
||||
R127f.y = tempf.x;
|
||||
PS0f = 1.0 / PV1f.x;
|
||||
// 5
|
||||
PV1f.z = PS0f * intBitsToFloat(uf_remappedPS[1].x);
|
||||
PV1f.z = clamp(PV1f.z, 0.0, 1.0);
|
||||
// 6
|
||||
PV0f.y = mul_nonIEEE(R127f.y, PV1f.z);
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[1].z));
|
||||
// 8
|
||||
R1f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R1f.y = mul_nonIEEE(R126f.y, PV1f.x);
|
||||
R1f.z = mul_nonIEEE(R127f.z, PV1f.x);
|
||||
R1f.w = mul_nonIEEE(R127f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 12d8627fe9906695 // vertical bloom 720
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4240800 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = R2f;
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 720
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = R2f;
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 720
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = R2f;
|
||||
}
|
||||
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,30 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 6279271034da8f93 // horizontal bloom 720
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4247000 res 96x96x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 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;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22702703, 0.31621622, 0.07027027 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = R2f;
|
||||
}
|
||||
|
||||
|
||||
//game original --expand 2 --reduce 2 9 --linear
|
@ -1,144 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader c92c1c4c0a2fb839 // camera rune dof
|
||||
uniform ivec4 uf_remappedPS[5];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e91800 res 1280x720x1 dim 1 tm: 4 format 0806 compSel: 0 4 4 5 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 0xf46ac800 res 640x360x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0xf4813000 res 640x360x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 5 mipView: 0x0 (num 0x4) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 1
|
||||
layout(location = 0) in vec4 passParameterSem2;
|
||||
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()
|
||||
{
|
||||
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 R127i = ivec4(0);
|
||||
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;
|
||||
bool activeMaskStack[2];
|
||||
bool activeMaskStackC[3];
|
||||
activeMaskStack[0] = false;
|
||||
activeMaskStackC[0] = false;
|
||||
activeMaskStackC[1] = false;
|
||||
activeMaskStack[0] = true;
|
||||
activeMaskStackC[0] = true;
|
||||
activeMaskStackC[1] = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0i = floatBitsToInt(passParameterSem2);
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
R1i.w = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
|
||||
R1i.z = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
// 0
|
||||
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.w),intBitsToFloat(uf_remappedPS[0].x)) + intBitsToFloat(uf_remappedPS[1].x)));
|
||||
R123i.x = clampFI32(R123i.x);
|
||||
PV0i.x = R123i.x;
|
||||
// 1
|
||||
R0i.z = floatBitsToInt(max(intBitsToFloat(R1i.z), intBitsToFloat(PV0i.x)));
|
||||
PV1i.z = R0i.z;
|
||||
// 2
|
||||
R1i.y = ((intBitsToFloat(PV1i.z) != 0.0)?int(0xFFFFFFFF):int(0x0));
|
||||
PV0i.y = R1i.y;
|
||||
// 3
|
||||
if( (PV0i.y == 0)) discard;
|
||||
}
|
||||
if( activeMaskStackC[1] == true ) {
|
||||
activeMaskStack[1] = activeMaskStack[0];
|
||||
activeMaskStackC[2] = activeMaskStackC[1];
|
||||
// 0
|
||||
predResult = (R1i.y != 0);
|
||||
activeMaskStack[1] = predResult;
|
||||
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
|
||||
}
|
||||
else {
|
||||
activeMaskStack[1] = false;
|
||||
activeMaskStackC[2] = false;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
// 0
|
||||
PV0i.w = floatBitsToInt(intBitsToFloat(uf_remappedPS[2].y) + -(1.0));
|
||||
// 1
|
||||
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(R0i.z)) + 1.0));
|
||||
PV1i.z = R123i.z;
|
||||
// 2
|
||||
tempResultf = log2(intBitsToFloat(PV1i.z));
|
||||
PS0i = floatBitsToInt(tempResultf);
|
||||
// 3
|
||||
R127i.x = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
|
||||
PV1i.x = R127i.x;
|
||||
// 4
|
||||
R2i.z = PV1i.x;
|
||||
R1i.w = PV1i.x;
|
||||
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.x)));
|
||||
// 5
|
||||
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + intBitsToFloat(uf_remappedPS[3].w));
|
||||
R3i.w = R127i.x;
|
||||
R4i.w = R127i.x;
|
||||
PS1i = R4i.w;
|
||||
// 6
|
||||
backupReg0i = R127i.x;
|
||||
R127i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].y)));
|
||||
PV0i.x = R127i.x;
|
||||
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].x)));
|
||||
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].w)));
|
||||
R127i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.z), intBitsToFloat(uf_remappedPS[4].z)));
|
||||
PV0i.w = R127i.w;
|
||||
R2i.w = floatBitsToInt(intBitsToFloat(backupReg0i) + 1.0);
|
||||
R2i.w = clampFI32(R2i.w);
|
||||
PS0i = R2i.w;
|
||||
// 7
|
||||
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.y));
|
||||
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.x));
|
||||
R3i.z = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.w));
|
||||
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.y)));
|
||||
PS1i = R2i.x;
|
||||
// 8
|
||||
R3i.x = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R127i.z));
|
||||
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.x)));
|
||||
R4i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R127i.w)));
|
||||
R4i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R127i.z)));
|
||||
PS0i = R4i.y;
|
||||
}
|
||||
if( activeMaskStackC[2] == true ) {
|
||||
|
||||
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
|
||||
vec2 res = vec2( intBitsToFloat(R2i.x) - intBitsToFloat(R1i.x), intBitsToFloat(R4i.y) - intBitsToFloat(R3i.x) ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec3 R10f = vec3(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
R2i.xyz = floatBitsToInt(R10f/count);
|
||||
|
||||
}
|
||||
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
|
||||
// export
|
||||
passPixelColor0 = vec4(intBitsToFloat(R2i.x), intBitsToFloat(R2i.y), intBitsToFloat(R2i.z), intBitsToFloat(R2i.w));
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader cb0e6e8cbec4502a // dof blur
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y + passParameterSem3.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem3.x - passParameterSem3.z, passParameterSem3.w - passParameterSem3.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
vec4 R1f = vec4(0.0);
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
passPixelColor0 = R1f/count;
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 0457fe3efc9a772f
|
||||
// Used for: Vertical Bloom 1080
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.38461538 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.15498264, 0.25904242, 0.12571176, 0.03308204, 0.00441094, 0.00026152 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44444444, 3.37037037, 5.29629630, 7.22222222, 9.14814815 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<6; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*w) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*w) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 34eaf9e211e76379 // bloom pre-blur
|
||||
uniform ivec4 uf_remappedPS[4];
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c6000 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(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0x156f2000 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(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 1) in vec4 passParameterSem1;
|
||||
layout(location = 2) in vec4 passParameterSem2;
|
||||
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
|
||||
void main()
|
||||
{
|
||||
vec4 R0f = vec4(0.0);
|
||||
vec2 R1f = vec2(0.0);
|
||||
vec4 R2f = vec4(0.0);
|
||||
vec4 R3f = vec4(0.0);
|
||||
vec4 R4f = vec4(0.0);
|
||||
vec4 R123f = 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 = vec2((passParameterSem1.x + passParameterSem2.x)/2, (passParameterSem1.y + passParameterSem1.w)/2); //center point
|
||||
vec2 res = vec2( passParameterSem2.x - passParameterSem1.x, passParameterSem1.w - passParameterSem1.y ) * uf_fragCoordScale;
|
||||
int r = int(floor(1.0 / uf_fragCoordScale.y + 0.5));
|
||||
float count = 0.0;
|
||||
for( int x=-r; x<=r; x++ ) {
|
||||
for( int y=-r; y<=r; y++ ) {
|
||||
if( pow(x,2) + pow(y,2) <= pow(r,2) ) {
|
||||
R2f += texture( textureUnitPS0, R1f + vec2(x,y)*res );
|
||||
count += 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
PV0f.yxwz = R2f/count;
|
||||
|
||||
R0f.x = (texture(textureUnitPS1, R0f.xy).x);
|
||||
// 0
|
||||
backupReg0f = R0f.x;
|
||||
|
||||
R127f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedPS[0].z)) + intBitsToFloat(uf_remappedPS[0].w));
|
||||
R127f.w = clamp(R127f.w, 0.0, 1.0);
|
||||
PS0f = R127f.w;
|
||||
// 1
|
||||
|
||||
R127f.z = mul_nonIEEE(PS0f, intBitsToFloat(uf_remappedPS[1].z));
|
||||
PS1f = R127f.z;
|
||||
// 2
|
||||
|
||||
// 3
|
||||
PV1f.x = max(PV0f.w, 0.0);
|
||||
PV1f.y = max(PV0f.y, 0.0);
|
||||
PV1f.z = max(PV0f.z, 0.0);
|
||||
PV1f.w = max(PV0f.x, 0.0);
|
||||
// 4
|
||||
R127f.x = min(PV1f.y, intBitsToFloat(0x461c4000));
|
||||
PV0f.x = R127f.x;
|
||||
R127f.y = min(PV1f.w, intBitsToFloat(0x461c4000));
|
||||
PV0f.y = R127f.y;
|
||||
R126f.z = min(PV1f.x, intBitsToFloat(0x461c4000));
|
||||
PV0f.z = R126f.z;
|
||||
R126f.w = min(PV1f.z, intBitsToFloat(0x461c4000));
|
||||
PV0f.w = R126f.w;
|
||||
// 5
|
||||
tempf.x = dot(vec4(PV0f.x,PV0f.y,PV0f.z,PV0f.w),vec4(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z),intBitsToFloat(uf_remappedPS[2].w)));
|
||||
tempf.x = clamp(tempf.x, 0.0, 1.0);
|
||||
PV1f.x = tempf.x;
|
||||
PV1f.y = tempf.x;
|
||||
PV1f.z = tempf.x;
|
||||
PV1f.w = tempf.x;
|
||||
// 6
|
||||
R123f.y = (mul_nonIEEE(R127f.w,R127f.z) + PV1f.x);
|
||||
PV0f.y = R123f.y;
|
||||
// 7
|
||||
PV1f.x = mul_nonIEEE(PV0f.y, intBitsToFloat(uf_remappedPS[3].z));
|
||||
// 8
|
||||
R2f.x = mul_nonIEEE(R127f.x, PV1f.x);
|
||||
R2f.y = mul_nonIEEE(R127f.y, PV1f.x);
|
||||
R2f.z = mul_nonIEEE(R126f.z, PV1f.x);
|
||||
R2f.w = mul_nonIEEE(R126f.w, PV1f.x);
|
||||
// export
|
||||
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 45d85f1d25e7d0de // vertical blur 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.33333333 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.20064856, 0.30320227, 0.09647345 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.41176471, 3.29411765 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 4dc5fdeced670c5e // horizontal blur 1080
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf45c5000 res 320x180x1 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: 1
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float w = data / 1.33333333 * uf_fragCoordScale.x;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
||||
|
||||
uniform float weight[] = float[]( 0.20064856, 0.30320227, 0.09647345 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.41176471, 3.29411765 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<3; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*w, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<2; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*w, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 4 --reduce 4 9 --linear
|
||||
//game original py blurninja.py --expand 2 --reduce 2 5 --linear
|
@ -1,41 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
// shader 9fad3b3505a6d831
|
||||
// Used for: Horizontal Bloom 1080
|
||||
// Implementation of http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
|
||||
|
||||
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
|
||||
float data = passParameterSem0.z - passParameterSem0.w;
|
||||
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
||||
|
||||
uniform float o_weight[] = float[]( 0.22558594, 0.31420898, 0.06982422, 0.00317383 );
|
||||
uniform float o_offset[] = float[]( 0.00000000, 1.38461538, 3.23076923, 5.07692308 );
|
||||
|
||||
uniform float weight[] = float[]( 0.15498264, 0.25904242, 0.12571176, 0.03308204, 0.00441094, 0.00026152 );
|
||||
uniform float offset[] = float[]( 0.00000000, 1.44444444, 3.37037037, 5.29629630, 7.22222222, 9.14814815 );
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 R0f = vec2(passParameterSem0.w, passParameterSem0.x);
|
||||
|
||||
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
||||
for (int i=1; i<6; i++) {
|
||||
R1f += texture( textureUnitPS0, R0f + vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
R1f += texture( textureUnitPS0, R0f - vec2(offset[i]*h, 0.0) ) * weight[i];
|
||||
}
|
||||
|
||||
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
|
||||
for (int i=1; i<4; i++) {
|
||||
R2f += texture( textureUnitPS0, R0f + vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
R2f += texture( textureUnitPS0, R0f - vec2(o_offset[i]*h, 0.0) ) * o_weight[i];
|
||||
}
|
||||
|
||||
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
|
||||
}
|
||||
|
||||
//py blurninja.py --expand 3 --reduce 3 --linear 21
|
||||
// game original py blurninja.py --expand 0 --reduce 0 13 --linear
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user