[BotW] blur shaders updates and fixes

update this first before adding splatoon
caution: gpu taxing at high res, if get framerate drop, try replacing them with ones from lower res, bloom will appear smaller and brighter (concentrated)
hope cemu will get more specific texture exclude so we don't have to upscale the blurs...
any advice on optimization is appreciated
This commit is contained in:
NAVras-Z 2017-10-13 11:48:39 +08:00
parent 3b479af442
commit 6c05eebe65
77 changed files with 675 additions and 815 deletions

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<10; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 5120
// 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;
@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<10; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<14; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 7680
// 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;
@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<14; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<20; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 10240
// 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;
@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<20; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<4; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 1920
// 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;
@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<4; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<4; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 2560
// 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;
@ -10,24 +10,24 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
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<5; i++) {
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++) {
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];
}
@ -35,5 +35,5 @@ for (int i=1; i<2; i++) {
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
}
//py blurninja.py --expand 4 --reduce 4 17 --linear
//py blurninja.py --expand 3 --reduce 3 13 --linear
//game original --expand 2 --reduce 2 9 --linear

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<5; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 2560
// 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;
@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<5; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<5; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 3440
// 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;
@ -10,24 +10,24 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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.12858845, 0.22686677, 0.13719611, 0.05487844, 0.01422774, 0.00231288, 0.00022383 );
uniform float offset[] = float[]( 0.00000000, 1.46153846, 3.41025641, 5.35897436, 7.30769231, 9.25641026, 11.20512821 );
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<7; i++) {
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++) {
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];
}
@ -35,5 +35,5 @@ for (int i=1; i<2; i++) {
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
}
//py blurninja.py --expand 7 --reduce 7 25 --linear
//py blurninja.py --expand 4 --reduce 4 17 --linear
//game original --expand 2 --reduce 2 9 --linear

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<7; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 3200
// 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;
@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<7; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<8; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 3840
// 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;
@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<8; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -10,8 +10,8 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
@ -27,7 +27,7 @@ for (int i=1; i<8; i++) {
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
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];
}

View File

@ -1,36 +1,35 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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 );
}

View File

@ -1,36 +1,38 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * 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 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * weight[i];
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];
}
passPixelColor0 = R1f;
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

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 5120
// 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;
@ -10,24 +10,24 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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 );
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<10; i++) {
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<2; i++) {
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];
}
@ -35,5 +35,5 @@ for (int i=1; i<2; i++) {
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
}
//py blurninja.py --expand 8 --reduce 8 37 --linear
//py blurninja.py --expand 6 --reduce 6 29 --linear
//game original --expand 2 --reduce 2 9 --linear

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 10584c6fc5857351 // bloom pre-spread
// 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;
@ -36,7 +36,7 @@ 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 );
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++ ) {

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 12d8627fe9906695 // vertical bloom 1080
// 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;
@ -10,15 +10,15 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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<2; i++) {
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];
}

View File

@ -1,36 +1,26 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 45d85f1d25e7d0de // vertical blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.38461538 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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]) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(0.0, offset[i]) / scale) ) * 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 = R1f;
passPixelColor0 = R2f;
}

View File

@ -1,36 +1,28 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float factor = 2.0; //higher is less blur
// shader 4dc5fdeced670c5e // horizontal blur
// 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;
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; }
uniform float weight[] = float[]( 0.18571429, 0.28870130, 0.10363636, 0.01480519 );
uniform float offset[] = float[]( 0.00000000, 1.42105263, 3.31578947, 5.21052632 );
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 ores = vec2( float(ires.x), float(ires.y) ) * uf_fragCoordScale;
vec2 scale = ores * factor;
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], 0.0) / scale) ) * weight[i];
R1f += texture( textureUnitPS0, R0f-(vec2(offset[i], 0.0) / scale) ) * 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 = R1f;
passPixelColor0 = R2f;
}
//game original py blurninja.py --expand 2 --reduce 2 5 --linear

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 6279271034da8f93 // horizontal bloom 1920
// 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;
@ -10,15 +10,15 @@ uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float w = data / 1.38461538 * uf_fragCoordScale.x;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
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<2; i++) {
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];
}

View File

@ -1,6 +1,6 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader c92c1c4c0a2fb839
// 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
@ -129,15 +129,14 @@ R4i.xyz = floatBitsToInt(textureLod(textureUnitPS1, intBitsToFloat(R4i.zy),intBi
if( activeMaskStackC[2] == true ) {
vec2 R9f = vec2( passParameterSem2.x, passParameterSem2.y ); //center point
ivec2 ires = textureSize(textureUnitPS1,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
vec2 res = vec2( R2i.x - R1i.x, R3i.x - R4i.y ) * 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;
R10f += textureLod( textureUnitPS1, R9f + vec2(x,y)*res, intBitsToFloat(R1i.w) ).xyz;
count += 1.0;
}
}

View File

@ -1,33 +1,22 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader cb0e6e8cbec4502a
// 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;
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((passParameterSem3.x + passParameterSem3.z)/2, (passParameterSem3.y+passParameterSem3.w)/2); //center point
ivec2 ires = textureSize(textureUnitPS0,0);
vec2 res = vec2( float(ires.x), float(ires.y) );
int r = int(floor(2.0 / uf_fragCoordScale.y + 0.5));
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 );
R1f += texture( textureUnitPS0, R0f + vec2(x,y)*res );
count += 1.0;
}
}