[HW] Revert to basic shader fix

Didn’t realize that VS  uf_uniformRegisterVS[ARi.x+2].y is actually used
to offset sampling x4 when doing the custom PS blur shader. Reverting to
simple scale by res in the meantime
This commit is contained in:
getdls 2018-12-20 15:26:14 +01:00
parent a8feaf4d74
commit 9430933e80
4 changed files with 71 additions and 482 deletions

View File

@ -3,9 +3,9 @@
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable
// shader b3609db7d1363f6a
//cutscene dof
const float resXScale = float($width)/float($gameWidth);
const float resYScale = float($height)/float($gameHeight);
//cutscene dof boxes
const float resXScale = (float($width)/float($gameWidth))*float($internalRes);
const float resYScale = (float($height)/float($gameHeight))*float($internalRes);
uniform ivec4 uf_uniformRegisterVS[256];
uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(location = 0) in uvec4 attrDataSem0;

View File

@ -1,101 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader bbf87e1769bdcea3 //foreground blur?
const float dither = $dither ;
const float scaleShader = $scaleShader;
const float scaleBlur = ($scaleBlur*$internalRes);
const int sampleScale = 2;
const float lightBloom = 0.95;
uniform ivec4 uf_remappedPS[1];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0x1aa0b000 res 320x180x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem128;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
// FabriceNeyret2 CC, single shader gaussian by intermediate MIPmap level. www.shadertoy.com/view/ltScRG
const int samples = 8 * sampleScale, //8 or 4 balances xy position
LOD = 2, // gaussian done on MIPmap at scale LOD
sLOD = 1 << LOD; // tile size = 2^LOD
const float sigma = float(samples) * .25;
float gaussian(vec2 i) {
return exp(-.5* dot(i /= sigma, i)) / (6.28 * sigma*sigma);
}
vec4 blur(sampler2D sp, vec2 U, vec2 scale) {
vec4 O = vec4(0);
int s = samples / sLOD;
for (int i = 0; i < s*s; i++) {
vec2 d = vec2(i%s, i / s)*float(sLOD) - float(samples) / 2.;
O += gaussian(d) * textureLod(sp, U + scale * d, float(LOD));
}
return O / O.a;
}
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));}
void main()
{
vec4 R0f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem128;
vec2 coord = passParameterSem128.xy*textureSize(textureUnitPS0, 0); //
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0);
vec2 uv = coord * ps;
R0f.xyz = blur(textureUnitPS0, R0f.xy, ps*scaleBlur).xyz; //1.0 4k //.66 2k //0.075 1k //.51 4kx2
//R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
// 0
PV0f.x = R0f.z * intBitsToFloat(0x3dea747e);
PV0f.w = intBitsToFloat(uf_remappedPS[0].x);
PV0f.w = clamp(PV0f.w, 0.0, 1.0);
// 1
backupReg0f = R0f.x;
backupReg1f = R0f.y;
tempf.x = dot(vec4(backupReg0f,backupReg1f,PV0f.x,-0.0),vec4(intBitsToFloat(0x3e990abb),intBitsToFloat(0x3f162c13),1.0,0.0));
PV1f.x = tempf.x;
PV1f.y = tempf.x;
PV1f.z = tempf.x;
PV1f.w = tempf.x;
PS1f = -(PV0f.w) + intBitsToFloat(0x3f800054);
// 2
PV0f.z = PV1f.x + -(intBitsToFloat(uf_remappedPS[0].x));
PS0f = 1.0 / PS1f;
// 3
PV1f.w = PV0f.z * PS0f;
PV1f.w = clamp(PV1f.w, 0.0, 1.0);
// 4
backupReg0f = R0f.x;
backupReg1f = R0f.y;
backupReg2f = R0f.z;
R0f.x = mul_nonIEEE(backupReg0f, PV1f.w);
R0f.y = mul_nonIEEE(backupReg1f, PV1f.w);
R0f.z = mul_nonIEEE(backupReg2f, PV1f.w);
// export
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
}

View File

@ -1,325 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader bfccd6ff47ca5ce8
//DOF base
const float dither = $dither ;
const float scaleShader = $scaleShader;
const float scaleBlur = $scaleBlur;
const int sampleScale = 2;
const float lightBloom = 0.95;
highp float lineRand(vec2 co)
{
highp float a = 12.9898;
highp float b = 78.233;
highp float c = 43758.5453;
highp float dt = dot(co.xy, vec2(a, b));
highp float sn = mod(dt, 3.14);
return fract(sin(sn) * c);
}
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e13800 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: 0
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5198000 res 1024x2048x1 dim 1 tm: 4 format 0005 compSel: 0 0 0 0 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(binding = 2) uniform sampler2D textureUnitPS2;// Tex2 addr 0x10ea5000 res 1280x720x1 dim 1 tm: 4 format 0011 compSel: 0 0 0 0 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem128;
layout(location = 1) in vec4 passParameterSem129;
layout(location = 0) out vec4 passPixelColor0;
layout(location = 1) out vec4 passPixelColor1;
uniform vec2 uf_fragCoordScale;
// FabriceNeyret2 CC, single shader gaussian by intermediate MIPmap level. www.shadertoy.com/view/ltScRG
const int samples = 8 * sampleScale, //8 or 4 balances xy position
LOD = 2, // gaussian done on MIPmap at scale LOD
sLOD = 1 << LOD; // tile size = 2^LOD
const float sigma = float(samples) * .25;
float gaussian(vec2 i) {
return exp(-.5* dot(i /= sigma, i)) / (6.28 * sigma*sigma);
}
vec4 blur(sampler2D sp, vec2 U, vec2 scale) {
vec4 O = vec4(0);
int s = samples / sLOD;
for (int i = 0; i < s*s; i++) {
vec2 d = vec2(i%s, i / s)*float(sLOD) - float(samples) / 2.;
O += gaussian(d) * textureLod(sp, U + scale * d, float(LOD));
}
return O / O.a;
}
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));}
void main()
{
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R4i = ivec4(0);
ivec4 R5i = ivec4(0);
ivec4 R6i = ivec4(0);
ivec4 R7i = ivec4(0);
ivec4 R8i = ivec4(0);
ivec4 R122i = ivec4(0);
ivec4 R123i = ivec4(0);
ivec4 R124i = ivec4(0);
ivec4 R125i = ivec4(0);
ivec4 R126i = ivec4(0);
ivec4 R127i = ivec4(0);
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
int PS0i = 0, PS1i = 0;
ivec4 tempi = ivec4(0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem128);
R1i = floatBitsToInt(passParameterSem129);
vec2 coord = passParameterSem128.xy*textureSize(textureUnitPS0, 0); //
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0);
vec2 uv = coord * ps;
R5i.xyz = floatBitsToInt(blur(textureUnitPS0, passParameterSem128.xy, ps*scaleBlur)).xyz; //1.0 4k //.66 2k //0.075 1k //.51 4kx2
//R5i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).xyz);
R2i.x = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.xy)).x);
R6i.xyz = R5i.xyz;
R0i.x = R2i.x;
R7i.xyz = R6i.xyz;
R3i.x = R0i.x;
R8i.xyz = R7i.xyz;
R1i.x = R3i.x;
/*
R6i.xyz = floatBitsToInt(blur(textureUnitPS0, passParameterSem128.zw, ps*scaleBlur)).xyz;
R6i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.zw)).xyz);
R0i.x = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R0i.zw)).x);
R7i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyz);
R3i.x = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R1i.xy)).x);
R8i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.zw)).xyz);
R1i.x = floatBitsToInt(texture(textureUnitPS2, intBitsToFloat(R1i.zw)).x);
*/
// 0
R4i.x = 0x3727c5ac;
R2i.y = 0x3f000000;
R0i.z = 0x3f000000;
R1i.w = 0x3727c5ac;
R3i.y = 0x3f000000;
PS0i = R3i.y;
// 1
R1i.y = 0x3f000000;
R2i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R2i.xy)).w);
R0i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R0i.xz)).w);
R3i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R3i.xy)).w);
R1i.x = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xy)).w);
// 0
R127i.x = R0i.x;
PV0i.x = R127i.x;
PV0i.y = floatBitsToInt(intBitsToFloat(R2i.x) + -(0.5));
PV0i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(0.5));
R126i.w = R2i.x;
PV0i.w = R126i.w;
R124i.w = R3i.x;
PS0i = R124i.w;
// 1
PV1i.x = floatBitsToInt(max(intBitsToFloat(PV0i.z), -(intBitsToFloat(PV0i.z))));
PV1i.x = floatBitsToInt(intBitsToFloat(PV1i.x) * 2.0);
R126i.y = ((0.5 > intBitsToFloat(PV0i.w))?int(0xFFFFFFFF):int(0x0));
PV1i.z = floatBitsToInt(max(intBitsToFloat(PV0i.y), -(intBitsToFloat(PV0i.y))));
PV1i.z = floatBitsToInt(intBitsToFloat(PV1i.z) * 2.0);
R127i.w = ((0.5 > intBitsToFloat(PV0i.x))?int(0xFFFFFFFF):int(0x0));
R124i.x = R1i.x;
PS1i = R124i.x;
// 2
PV0i.x = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + 1.0);
PV0i.x = clampFI32(PV0i.x);
PV0i.y = floatBitsToInt(-(intBitsToFloat(PV1i.z)) + 1.0);
PV0i.y = clampFI32(PV0i.y);
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.x) + -(0.5));
PV0i.w = floatBitsToInt(intBitsToFloat(R3i.x) + -(0.5));
// 3
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(0x3727c5ac));
R127i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(0x3727c5ac));
PV1i.z = floatBitsToInt(max(intBitsToFloat(PV0i.w), -(intBitsToFloat(PV0i.w))));
PV1i.z = floatBitsToInt(intBitsToFloat(PV1i.z) * 2.0);
PV1i.w = floatBitsToInt(max(intBitsToFloat(PV0i.z), -(intBitsToFloat(PV0i.z))));
PV1i.w = floatBitsToInt(intBitsToFloat(PV1i.w) * 2.0);
// 4
PV0i.x = floatBitsToInt(-(intBitsToFloat(PV1i.w)) + 1.0);
PV0i.x = clampFI32(PV0i.x);
PV0i.y = floatBitsToInt(-(intBitsToFloat(PV1i.z)) + 1.0);
PV0i.y = clampFI32(PV0i.y);
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.x));
// 5
backupReg0i = R127i.y;
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(0x3727c5ac));
R127i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(0x3727c5ac));
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
PS1i = floatBitsToInt(1.0 / intBitsToFloat(backupReg0i));
// 6
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.z) + 1.0);
PV0i.z = floatBitsToInt(intBitsToFloat(PS1i) + -(1.0));
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.x));
// 7
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.y) + -(intBitsToFloat(0x3f7dff82)));
PV1i.x = clampFI32(PV1i.x);
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + 1.0);
PV1i.z = floatBitsToInt(intBitsToFloat(PS0i) + -(1.0));
PS1i = floatBitsToInt(1.0 / intBitsToFloat(R127i.y));
// 8
backupReg0i = R126i.y;
backupReg0i = R126i.y;
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.y) + -(intBitsToFloat(0x3f7dff82)));
PV0i.x = clampFI32(PV0i.x);
R126i.y = ((backupReg0i == 0)?(R1i.w):(PV1i.x));
PV0i.y = R126i.y;
R127i.z = floatBitsToInt(intBitsToFloat(PV1i.z) + 1.0);
R125i.w = ((backupReg0i == 0)?(PV1i.x):(R1i.w));
R126i.z = floatBitsToInt(intBitsToFloat(PS1i) + -(1.0));
PS0i = R126i.z;
// 9
R126i.x = ((R127i.w == 0)?(PV0i.x):(R4i.x));
R127i.y = ((R127i.w == 0)?(R4i.x):(PV0i.x));
PV1i.y = R127i.y;
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(PV0i.y)) + 0.0));
PV1i.z = R123i.z;
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.x),intBitsToFloat(PV0i.y)) + 0.0));
PV1i.w = R123i.w;
R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.z),intBitsToFloat(PV0i.y)) + 0.0));
PS1i = R122i.x;
// 10
backupReg0i = R126i.y;
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.w),intBitsToFloat(R126i.y)) + 0.0));
PV0i.x = R123i.x;
R126i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.z),intBitsToFloat(PV1i.y)) + intBitsToFloat(PS1i)));
R125i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.z)));
R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.x),intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.w)));
PS0i = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV1i.y));
// 11
R125i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R127i.x),intBitsToFloat(R127i.y)) + intBitsToFloat(PV0i.x)));
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.x),intBitsToFloat(R125i.w)) + 0.0));
PV1i.y = R123i.y;
R124i.z = floatBitsToInt(intBitsToFloat(PS0i) + 0.0);
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R125i.w)) + 0.0));
PV1i.w = R123i.w;
R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.z),intBitsToFloat(R125i.w)) + 0.0));
PS1i = R122i.x;
// 12
backupReg0i = R6i.z;
backupReg1i = R125i.w;
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R126i.w),intBitsToFloat(R125i.w)) + 0.0));
PV0i.x = R123i.x;
R125i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.x),intBitsToFloat(R126i.x)) + intBitsToFloat(PV1i.y)));
R6i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(R126i.x)) + intBitsToFloat(PS1i)));
R125i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R126i.x)) + intBitsToFloat(PV1i.w)));
PS0i = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(R126i.x));
// 13
backupReg0i = R127i.x;
backupReg1i = R126i.z;
R127i.x = floatBitsToInt(intBitsToFloat(R127i.z) + -(intBitsToFloat(0x3f7dff82)));
R127i.x = clampFI32(R127i.x);
R124i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg0i),intBitsToFloat(R126i.x)) + intBitsToFloat(PV0i.x)));
R126i.z = floatBitsToInt(intBitsToFloat(PS0i) + 0.0);
PV1i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + 1.0);
R126i.w = 0x3727c5ac;
PS1i = R126i.w;
// 14
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + -(intBitsToFloat(0x3f7dff82)));
PV0i.x = clampFI32(PV0i.x);
PV0i.y = ((0.5 > intBitsToFloat(R124i.w))?int(0xFFFFFFFF):int(0x0));
PV0i.z = 0x3727c5ac;
PV0i.w = ((0.5 > intBitsToFloat(R124i.x))?int(0xFFFFFFFF):int(0x0));
// 15
backupReg0i = R126i.w;
R123i.x = ((PV0i.y == 0)?(R126i.w):(R127i.x));
PV1i.x = R123i.x;
R127i.y = ((PV0i.w == 0)?(PV0i.z):(PV0i.x));
PV1i.y = R127i.y;
R127i.z = ((PV0i.w == 0)?(PV0i.x):(PV0i.z));
R126i.w = ((PV0i.y == 0)?(R127i.x):(backupReg0i));
// 16
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.w),intBitsToFloat(PV1i.x)) + intBitsToFloat(R125i.x)));
PV0i.x = R123i.x;
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.z),intBitsToFloat(PV1i.x)) + intBitsToFloat(R126i.y)));
PV0i.y = R123i.y;
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.y),intBitsToFloat(PV1i.x)) + intBitsToFloat(R125i.z)));
PV0i.z = R123i.z;
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.x),intBitsToFloat(PV1i.x)) + intBitsToFloat(R127i.w)));
PV0i.w = R123i.w;
PS0i = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(PV1i.y));
// 17
backupReg0i = R127i.y;
backupReg0i = R127i.y;
backupReg0i = R127i.y;
R125i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.z),intBitsToFloat(R127i.y)) + intBitsToFloat(PV0i.y)));
R127i.y = floatBitsToInt(intBitsToFloat(R124i.z) + intBitsToFloat(PS0i));
R124i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.y),intBitsToFloat(backupReg0i)) + intBitsToFloat(PV0i.z)));
R127i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.x),intBitsToFloat(backupReg0i)) + intBitsToFloat(PV0i.w)));
R127i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.x),intBitsToFloat(backupReg0i)) + intBitsToFloat(PV0i.x)));
PS1i = R127i.x;
// 18
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.z),intBitsToFloat(R126i.w)) + intBitsToFloat(R6i.z)));
PV0i.x = R123i.x;
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.y),intBitsToFloat(R126i.w)) + intBitsToFloat(R125i.w)));
PV0i.y = R123i.y;
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R7i.x),intBitsToFloat(R126i.w)) + intBitsToFloat(R125i.y)));
PV0i.z = R123i.z;
R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R124i.w),intBitsToFloat(R126i.w)) + intBitsToFloat(R124i.y)));
PS0i = R122i.x;
// 19
backupReg0i = R127i.z;
backupReg1i = R124i.x;
backupReg0i = R127i.z;
backupReg2i = R126i.w;
backupReg0i = R127i.z;
R124i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.z),intBitsToFloat(R127i.z)) + intBitsToFloat(PV0i.x)));
R125i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.y),intBitsToFloat(R127i.z)) + intBitsToFloat(PV0i.y)));
R127i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R8i.x),intBitsToFloat(backupReg0i)) + intBitsToFloat(PV0i.z)));
R126i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(backupReg1i),intBitsToFloat(backupReg0i)) + intBitsToFloat(PS0i)));
PS1i = floatBitsToInt(intBitsToFloat(backupReg2i) + intBitsToFloat(backupReg0i));
// 20
PV0i.z = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(PS1i));
PS0i = floatBitsToInt(1.0 / intBitsToFloat(R127i.y));
// 21
R6i.x = floatBitsToInt(intBitsToFloat(R127i.w) * intBitsToFloat(PS0i));
R6i.y = floatBitsToInt(intBitsToFloat(R124i.z) * intBitsToFloat(PS0i));
R6i.z = floatBitsToInt(intBitsToFloat(R125i.x) * intBitsToFloat(PS0i));
PV1i.w = floatBitsToInt(intBitsToFloat(R127i.x) * intBitsToFloat(PS0i));
PS1i = floatBitsToInt(1.0 / intBitsToFloat(PV0i.z));
// 22
R8i.x = floatBitsToInt(intBitsToFloat(R127i.z) * intBitsToFloat(PS1i));
R8i.y = floatBitsToInt(intBitsToFloat(R125i.y) * intBitsToFloat(PS1i));
R8i.z = floatBitsToInt(intBitsToFloat(R124i.x) * intBitsToFloat(PS1i));
PV0i.w = floatBitsToInt(intBitsToFloat(R126i.w) * intBitsToFloat(PS1i));
R6i.w = floatBitsToInt(min(intBitsToFloat(PV1i.w), 0.5));
PS0i = R6i.w;
// 23
R8i.w = floatBitsToInt(max(intBitsToFloat(PV0i.w), 0.5));
PV1i.w = R8i.w;
// 24
R1i.xyz = ivec3(R8i.x,R8i.y,R8i.z);
R1i.w = PV1i.w;
// 25
R0i.xyz = ivec3(R6i.x,R6i.y,R6i.z);
R0i.w = R6i.w;
// export
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w));
passPixelColor1 = vec4(intBitsToFloat(R1i.x), intBitsToFloat(R1i.y), intBitsToFloat(R1i.z), intBitsToFloat(R1i.w));
}

View File

@ -129,16 +129,16 @@ $dither = 0.1
$scaleShader = 1.0
$scaleBlur = 0.5
[Preset]
name = 2560x1440 (Native x2) 1080 FX scaling
$width = 2560
$height = 1440
$gameWidth = 1280
$gameHeight = 720
$internalRes = 0.75
$dither = 0.15
$scaleShader = (720.0/1080.0)
$scaleBlur = 0.5
#[Preset]
#name = 2560x1440 (Native x2) 1080 FX scaling
#$width = 2560
#$height = 1440
#$gameWidth = 1280
#$gameHeight = 720
#$internalRes = 0.75
#$dither = 0.15
#$scaleShader = (720.0/1080.0)
#$scaleBlur = 0.5
[Preset]
name = 3200x1800
@ -184,16 +184,16 @@ $dither = 0.2
$scaleShader = 1.0
$scaleBlur = 1.0
[Preset]
name = 3840x2160 (4k - 1080 FX scaling)
$width = 3840
$height = 2160
$gameWidth = 1280
$gameHeight = 720
$internalRes = 0.5
$dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
#[Preset]
#name = 3840x2160 (4k - 1080 FX scaling)
#$width = 3840
#$height = 2160
#$gameWidth = 1280
#$gameHeight = 720
#$internalRes =(1440.0/2160.0)
#$dither = 0.25
#$scaleShader = 1.0 # (1440.0/2160.0)
#$scaleBlur = 2.0
[Preset]
name = 5120x2880 (Native 4x)
@ -206,42 +206,42 @@ $dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
[Preset]
name = 5120x2880 (1080 FX scaling)
$width = 5120
$height = 2880
$gameWidth = 1280
$gameHeight = 720
$internalRes = 0.375
$dither = 0.25
$scaleShader = (720.0/1080.0)
$scaleBlur = 1.0
#[Preset]
#name = 5120x2880 (1080 FX scaling)
#$width = 5120
#$height = 2880
#$gameWidth = 1280
#$gameHeight = 720
#$internalRes = 0.375
#$dither = 0.25
#$scaleShader = (720.0/1080.0)
#$scaleBlur = 1.0
// Enthusiast
// Enthusiast
[Preset]
name = 7680x4320
$width = 7680
$height = 4320
$gameWidth = 1280
$gameHeight = 720
$internalRes = 0.5
$dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
#[Preset]#6
#name = 7680x4320
#$width = 7680
#$height = 4320
#$gameWidth = 1280
#$gameHeight = 720
#$internalRes = 1.0
#$dither = 0.25
#$scaleShader = 1.0
#$scaleBlur = 1.0
[Preset]
name = 10240x5760
$width = 10240
$height = 5760
$gameWidth = 1280
$gameHeight = 720
$internalRes = 0.5
$dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
#[Preset]
#name = 10240x5760
#$width = 10240
#$height = 5760
#$gameWidth = 1280
#$gameHeight = 720
#$internalRes = 0.5
#$dither = 0.25
#$scaleShader = 1.0
#$scaleBlur = 1.0
[TextureRedefine]
@ -288,13 +288,21 @@ height = 480
overwriteWidth = ($width/$gameWidth) * 864
overwriteHeight = ($height/$gameHeight) * 480
[TextureRedefine]
width = 640
height = 368
#formats = 0x816,0x80e,0x035,0x033,0x007
tileModesExcluded = 0x001
overwriteWidth = ($width/$gameWidth) * (640)
overwriteHeight = ($height/$gameHeight) * (368)
[TextureRedefine]
width = 640
height = 360
#formats = 0x816,0x80e,0x035,0x033,0x007
tileModesExcluded = 0x001
overwriteWidth = ($width/$gameWidth) * (640*$internalRes)
overwriteHeight = ($height/$gameHeight) * (360*$internalRes)
overwriteWidth = ($width/$gameWidth) * (640)
overwriteHeight = ($height/$gameHeight) * (360)
[TextureRedefine]
width = 512
@ -360,10 +368,17 @@ height = 180
overwriteWidth = ($width/$gameWidth) * (160*$internalRes)
overwriteHeight = ($height/$gameHeight) * (180*$internalRes)
[TextureRedefine] #test 41a
width = 160
height = 96
#formats = 0x816 #0x41a
overwriteWidth = ($width/$gameWidth) * (160*$internalRes)
overwriteHeight = ($height/$gameHeight) * (96*$internalRes)
[TextureRedefine]
width = 160
height = 90
formats = 0x816 #0x41a
#formats = 0x816 #0x41a
overwriteWidth = ($width/$gameWidth) * (160*$internalRes)
overwriteHeight = ($height/$gameHeight) * (90*$internalRes)