[XCX] source 1.4.x + issue fixes, Contrasty

This commit is contained in:
getdls 2018-10-31 19:33:19 +01:00
parent 8025b55cb2
commit 88f8108a18
30 changed files with 1217 additions and 4967 deletions

View File

@ -0,0 +1,157 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 59df1c7e1806366c
//contrasty AA shader
uniform vec2 uf_fragCoordScale;
const float hazeFactor = 0.1;
const float gamma = $gamma; // 1.0 is neutral Botw is already colour graded at this stage
const float exposure = $exposure; // 1.0 is neutral
const float vibrance = $vibrance; // 0.0 is neutral
const float crushContrast = $crushContrast; // 0.0 is neutral. Use small increments, loss of shadow detail
const float contrastCurve = $contrastCurve;
vec3 RGB_Lift = vec3($redShadows, $greenShadows , $blueSadows); // [0.000 to 2.000] Adjust shadows for Red, Green and Blue.
vec3 RGB_Gamma = vec3($redMid ,$greenMid, $blueMid); // [0.000 to 2.000] Adjust midtones for Red, Green and Blue
vec3 RGB_Gain = vec3($redHilight, $greenHilight, $blueHilight); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue
//lumasharpen
const float sharp_mix = $sharp_mix;
const float sharp_strength = 2.0;
const float sharp_clamp = 0.75;
const float offset_bias = 1.0;
float Sigmoid (float x) {
return 1.0 / (1.0 + (exp(-(x - 0.5) * 5.5)));
}
#define px (1.0/1920.0*uf_fragCoordScale.x)
#define py (1.0/1080.0*uf_fragCoordScale.y)
#define CoefLuma vec3(0.2126, 0.7152, 0.0722)
float lumasharping(sampler2D tex, vec2 pos) {
vec4 colorInput = texture(tex, pos);
vec3 ori = colorInput.rgb;
// -- Combining the strength and luma multipliers --
vec3 sharp_strength_luma = (CoefLuma * sharp_strength);
// -- Gaussian filter --
// [ .25, .50, .25] [ 1 , 2 , 1 ]
// [ .50, 1, .50] = [ 2 , 4 , 2 ]
// [ .25, .50, .25] [ 1 , 2 , 1 ]
vec3 blur_ori = texture(tex, pos + vec2(px, -py) * 0.5 * offset_bias).rgb; // South East
blur_ori += texture(tex, pos + vec2(-px, -py) * 0.5 * offset_bias).rgb; // South West
blur_ori += texture(tex, pos + vec2(px, py) * 0.5 * offset_bias).rgb; // North East
blur_ori += texture(tex, pos + vec2(-px, py) * 0.5 * offset_bias).rgb; // North West
blur_ori *= 0.25; // ( /= 4) Divide by the number of texture fetches
// -- Calculate the sharpening --
vec3 sharp = ori - blur_ori; //Subtracting the blurred image from the original image
// -- Adjust strength of the sharpening and clamp it--
vec4 sharp_strength_luma_clamp = vec4(sharp_strength_luma * (0.5 / sharp_clamp), 0.5); //Roll part of the clamp into the dot
float sharp_luma = clamp((dot(vec4(sharp, 1.0), sharp_strength_luma_clamp)), 0.0, 1.0); //Calculate the luma, adjust the strength, scale up and clamp
sharp_luma = (sharp_clamp * 2.0) * sharp_luma - sharp_clamp; //scale down
return sharp_luma;
}
vec3 LiftGammaGainPass(vec3 colorInput)
{ //reshade BSD https://reshade.me , Alexkiri port
vec3 color = colorInput;
color = color * (1.5 - 0.5 * RGB_Lift) + 0.5 * RGB_Lift - 0.5;
color = clamp(color, 0.0, 1.0);
color *= RGB_Gain;
color = pow(color, 1.0 / RGB_Gamma);
return clamp(color, 0.0, 1.0);
}
vec3 contrasty(vec3 colour){
vec3 fColour = (colour.xyz);
//fColour = LiftGammaGainPass(fColour);
fColour = clamp(exposure * fColour, 0.0, 1.0);
fColour = pow(fColour, vec3(1.0 / gamma));
float luminance = fColour.r*0.299 + fColour.g*0.587 + fColour.b*0.114;
float mn = min(min(fColour.r, fColour.g), fColour.b);
float mx = max(max(fColour.r, fColour.g), fColour.b);
float sat = (1.0 - (mx - mn)) * (1.0 - mx) * luminance * 5.0;
vec3 lightness = vec3((mn + mx) / 2.0);
fColour = LiftGammaGainPass(fColour);
// vibrance
fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat);
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
return fColour;
}
uniform ivec4 uf_remappedPS[2];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 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 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
layout(location = 0) out vec4 passPixelColor0;
//uniform vec2 uf_fragCoordScale;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R4i = ivec4(0);
ivec4 R123i = ivec4(0);
ivec4 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;
bool activeMaskStack[2];
bool activeMaskStackC[3];
activeMaskStack[0] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
R1f = passParameterSem1;
R0f.xyzw = (texture(textureUnitPS1, R0f.xy).xyzw);
R0f.xyz = contrasty(R0f.xyz);
R0f.xyz = mix(R0f.xyz, smoothstep(0.0, 1.0, R0f.xyz), contrastCurve);
float smask = lumasharping(textureUnitPS1, passParameterSem0.xy);
vec3 temp3 = R0f.xyz;
R0f.xyz = mix(R0f.xyz, (temp3.xyz += (smask)), sharp_mix);
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
}

View File

@ -2,8 +2,7 @@
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable #extension GL_ARB_shading_language_packing : enable
// shader 497a209b49886520 // shader 497a209b49886520 //depth?
//align water depth
uniform ivec4 uf_remappedVS[1]; uniform ivec4 uf_remappedVS[1];
uniform vec2 uf_windowSpaceToClipSpaceTransform; uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0xf545c000 res 1x1x1 dim 1 tm: 2 format 081e compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 0 layout(binding = 32) uniform sampler2D textureUnitVS0;// Tex0 addr 0xf545c000 res 1x1x1 dim 1 tm: 2 format 081e compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler18 ClampX/Y/Z: 2 2 2 border: 0
@ -60,16 +59,17 @@ backupReg0f = R2f.x;
backupReg1f = R2f.y; backupReg1f = R2f.y;
R2f.x = backupReg0f; R2f.x = backupReg0f;
R2f.y = backupReg1f; R2f.y = backupReg1f;
R0f.z = intBitsToFloat(0x3f000000); R0f.z = intBitsToFloat(0x3f000000)*0.25;
R0f.w = (mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedVS[0].x)) +intBitsToFloat(uf_remappedVS[0].z)*3); R0f.w = (mul_nonIEEE(backupReg0f,intBitsToFloat(uf_remappedVS[0].x)) + intBitsToFloat(uf_remappedVS[0].z));
R0f.y = (mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedVS[0].y)) +intBitsToFloat(uf_remappedVS[0].w)*3); R0f.y = (mul_nonIEEE(backupReg1f,intBitsToFloat(uf_remappedVS[0].y)) + intBitsToFloat(uf_remappedVS[0].w));
PS0f = R0f.y; PS0f = R0f.y;
R3f.xy = (textureLod(textureUnitVS0, R0f.zz,0.0).xy); R3f.xy = (textureLod(textureUnitVS0, R0f.zz,0.0).xy)*0.533335;
// export // export
gl_Position = vec4(R1f.x*(1.0 / 1.004), R1f.y*(1.0 / 1.006), R1f.z, R1f.w); gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
// export // export
passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.z); passParameterSem1 = vec4(R2f.x, R2f.y, R2f.z, R2f.z);
// export // export
// export
passParameterSem2 = vec4(R0f.w, R0f.y, R0f.z, R0f.z); passParameterSem2 = vec4(R0f.w, R0f.y, R0f.z, R0f.z);
// 0 // 0
backupReg0f = R3f.x; backupReg0f = R3f.x;

View File

@ -0,0 +1,95 @@
[Definition]
titleIds = 0005000010116100,00050000101C4C00,00050000101C4D00
name = Contrasty
path = "Xenoblade Chronicles X/Contrasty"
description = Colour and contrast - Replaces AA removal
version = 3
[Preset]
name = default
$redShadows = 1.0
$greenShadows = 1.0
$blueSadows = 1.0
$redMid = 1.0
$greenMid = 1.0
$blueMid = 1.0
$redHilight = 1.0
$greenHilight =1.0
$blueHilight = 1.0
$contrastCurve = 0.0
$hazeFactor = 1.0
$bloom = 1.0
$gamma = 1.0
$exposure = 1.0
$vibrance = 0.0
$crushContrast = 0.0
$bleach = 1.0
$sharp_mix = 0.0
[Preset]
name = High Contrasty
$redShadows = 1.0
$greenShadows = 1.0
$blueSadows = 1.0
$redMid = 0.99
$greenMid = 0.99
$blueMid = 0.99
$redHilight = 1.0
$greenHilight =1.0
$blueHilight = 1.0
$contrastCurve = 0.4
$hazeFactor = 0.25
$bloom = 0.85
$gamma = 1.12
$exposure = 1.01
$vibrance = 0.15
$crushContrast = 0.00
$bleach = 0.85
$sharp_mix = 0.1
[Preset]
name = Colourfull
$redShadows = 1.0
$greenShadows = 1.0
$blueSadows = 1.0
$redMid = 0.99
$greenMid = 0.98
$blueMid = 0.99
$redHilight = 1.0
$greenHilight =0.99
$blueHilight = 1.0
$contrastCurve = 0.333
$hazeFactor = 0.25
$bloom = 0.85
$gamma = 1.1
$exposure = 1.01
$vibrance = 0.35
$crushContrast = 0.00
$bleach = 0.85
$sharp_mix = 0.1
[Preset]
name = Neutral Contrasty
$redShadows = 1.01
$greenShadows = 1.01
$blueSadows = 1.01
$redMid = 1.0
$greenMid = 1.0
$blueMid = 1.0
$redHilight = 0.99
$greenHilight =0.99
$blueHilight = 0.99
$contrastCurve = 0.25
$hazeFactor = 1.0
$bloom = 0.85
$gamma = 1.05
$exposure = 1.0
$vibrance = 0.0
$crushContrast = 0.00
$bleach = 0.85
$sharp_mix = 0.1

View File

@ -1,60 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader 037490dc03a83598
//sun wite-out-de-band, pre-mix bloom brightness
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e76000 res 320x180x1 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(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0;
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);
}
uniform vec2 uf_fragCoordScale;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
vec4 R0f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw)* (0.995 - (lineRand(gl_FragCoord.yx)*0.075));
//R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
// 0
backupReg0f = R0f.x;
backupReg1f = R0f.y;
backupReg2f = R0f.z;
backupReg3f = R0f.w;
R0f.x = backupReg0f;
R0f.x = clamp(R0f.x, 0.0, 1.0);
R0f.y = backupReg1f;
R0f.y = clamp(R0f.y, 0.0, 1.0);
R0f.z = backupReg2f;
R0f.z = clamp(R0f.z, 0.0, 1.0);
R0f.w = backupReg3f;
R0f.w = clamp(R0f.w, 0.0, 1.0);
// export
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,502 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 430ac3a85ece61af // bloom sampling scale
const float resScale = ($height/$gameHeight);
highp float lineRand(vec2 co) //to reduce banding
{
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);
}
//const float resScale = ($height/$gameHeight); // = 4.0;
uniform ivec4 uf_remappedPS[2];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 256x144x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 6 6 6 border: 0
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0);
vec4 R5f = vec4(0.0);
vec4 R6f = vec4(0.0);
vec4 R7f = vec4(0.0);
vec4 R8f = vec4(0.0);
vec4 R9f = vec4(0.0);
vec4 R10f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
R0f.xy = R0f.xy + (lineRand(gl_FragCoord.xy)*0.005);
// 0
backupReg0f = R0f.y;
backupReg1f = R0f.x;
R0f.x = intBitsToFloat(uf_remappedPS[0].x);
PV0f.y = backupReg0f + -(intBitsToFloat(uf_remappedPS[0].y)/ resScale);
PV0f.z = backupReg1f + -(intBitsToFloat(uf_remappedPS[0].x)/ resScale);
R0f.w = intBitsToFloat(uf_remappedPS[0].y);
R1f.w = intBitsToFloat(uf_remappedPS[1].x) * intBitsToFloat(uf_remappedPS[1].y);
PS0f = R1f.w;
// 1
R10f.x = PV0f.z * intBitsToFloat(0x3d000000);
PV1f.x = R10f.x;
R2f.z = PS0f * intBitsToFloat(uf_remappedPS[1].y);
PV1f.z = R2f.z;
R5f.w = PV0f.y * intBitsToFloat(0x3d000000);
PV1f.w = R5f.w;
// 2
R1f.x = PV1f.x + intBitsToFloat(uf_remappedPS[0].x)/resScale;
PV0f.x = R1f.x;
R1f.y = PV1f.w + intBitsToFloat(uf_remappedPS[0].y) / resScale;
PV0f.y = R1f.y;
R2f.w = PV1f.z * intBitsToFloat(uf_remappedPS[1].y) ;
PV0f.w = R2f.w;
// 3
R2f.x = R10f.x + PV0f.x;
PV1f.x = R2f.x;
R2f.y = R5f.w + PV0f.y;
PV1f.y = R2f.y;
R3f.w = PV0f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.w = R3f.w;
// 4
R3f.x = R10f.x + PV1f.x;
R3f.y = R5f.w + PV1f.y;
R4f.w = PV1f.w * intBitsToFloat(uf_remappedPS[1].y);
R0f.xyz = (texture(textureUnitPS0, R0f.xw).xyz);
R1f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R4f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);
R5f.xyz = (texture(textureUnitPS0, R3f.xy).xyz);
// 0
backupReg0f = R0f.y;
R123f.x = (R0f.z * intBitsToFloat(uf_remappedPS[1].x) + 0.0);
PV0f.x = R123f.x;
R0f.y = R5f.w + R3f.y;
PV0f.y = R0f.y;
R123f.z = (R0f.x * intBitsToFloat(uf_remappedPS[1].x) + 0.0);
PV0f.z = R123f.z;
R123f.w = (backupReg0f * intBitsToFloat(uf_remappedPS[1].x) + 0.0);
PV0f.w = R123f.w;
R0f.x = R10f.x + R3f.x;
PS0f = R0f.x;
// 1
backupReg0f = R1f.z;
R123f.x = (R1f.w * R1f.y + PV0f.w);
PV1f.x = R123f.x;
R123f.y = (R1f.w * R1f.x + PV0f.z);
PV1f.y = R123f.y;
R1f.z = R10f.x + PS0f;
PV1f.z = R1f.z;
R123f.w = (R1f.w * backupReg0f + PV0f.x);
PV1f.w = R123f.w;
R1f.y = R5f.w + PV0f.y;
PS1f = R1f.y;
// 2
backupReg0f = R4f.x;
R4f.x = R10f.x + PV1f.z;
PV0f.x = R4f.x;
R123f.y = (R2f.z * R4f.y + PV1f.x);
PV0f.y = R123f.y;
R123f.z = (R2f.z * R4f.z + PV1f.w);
PV0f.z = R123f.z;
R123f.w = (R2f.z * backupReg0f + PV1f.y);
PV0f.w = R123f.w;
R4f.y = R5f.w + PS1f;
PS0f = R4f.y;
// 3
backupReg0f = R5f.x;
backupReg1f = R5f.z;
backupReg2f = R2f.w;
backupReg3f = R5f.y;
R5f.x = (R2f.w * backupReg0f + PV0f.w);
R5f.y = R4f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.y = R5f.y;
R5f.z = (R2f.w * backupReg1f + PV0f.z);
R2f.w = (backupReg2f * backupReg3f + PV0f.y);
R3f.x = R10f.x + PV0f.x;
PS1f = R3f.x;
// 4
R6f.x = R10f.x + PS1f;
R3f.y = R5f.w + R4f.y;
R1f.w = PV1f.y * intBitsToFloat(uf_remappedPS[1].y);
R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
R1f.xyz = (texture(textureUnitPS0, R1f.zy).xyz);
R4f.xyz = (texture(textureUnitPS0, R4f.xy).xyz);
R2f.xyz = (texture(textureUnitPS0, R3f.xy).xyz);
// 0
R123f.x = (R3f.w * R0f.y + R2f.w);
PV0f.x = R123f.x;
R123f.y = (R3f.w * R0f.x + R5f.x);
PV0f.y = R123f.y;
R123f.z = (R3f.w * R0f.z + R5f.z);
PV0f.z = R123f.z;
R6f.w = R5f.w + R3f.y;
// 1
R0f.x = R1f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.x = R0f.x;
R123f.y = (R4f.w * R1f.z + PV0f.z);
PV1f.y = R123f.y;
R123f.z = (R4f.w * R1f.y + PV0f.x);
PV1f.z = R123f.z;
R123f.w = (R4f.w * R1f.x + PV0f.y);
PV1f.w = R123f.w;
R1f.x = R10f.x + R6f.x;
PS1f = R1f.x;
// 2
R123f.x = (R5f.y * R4f.x + PV1f.w);
PV0f.x = R123f.x;
R1f.y = R5f.w + R6f.w;
PV0f.y = R1f.y;
R123f.z = (R5f.y * R4f.y + PV1f.z);
PV0f.z = R123f.z;
R123f.w = (R5f.y * R4f.z + PV1f.y);
PV0f.w = R123f.w;
R4f.w = PV1f.x * intBitsToFloat(uf_remappedPS[1].y);
PS0f = R4f.w;
// 3
backupReg0f = R2f.x;
R2f.x = (R1f.w * R2f.z + PV0f.w);
R4f.y = (R1f.w * R2f.y + PV0f.z);
R2f.z = (R1f.w * backupReg0f + PV0f.x);
R2f.w = R10f.x + R1f.x;
PV1f.w = R2f.w;
R2f.y = R5f.w + PV0f.y;
PS1f = R2f.y;
// 4
R5f.x = R10f.x + PV1f.w;
R5f.y = R5f.w + PS1f;
R4f.z = R4f.w * intBitsToFloat(uf_remappedPS[1].y);
R6f.xyz = (texture(textureUnitPS0, R6f.xw).xyz);
R1f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R3f.xyz = (texture(textureUnitPS0, R2f.wy).xyz);
R7f.xyz = (texture(textureUnitPS0, R5f.xy).xyz);
// 0
R123f.x = (R0f.x * R6f.z + R2f.x);
PV0f.x = R123f.x;
R127f.y = R4f.z * intBitsToFloat(uf_remappedPS[1].y);
PV0f.y = R127f.y;
R123f.z = (R0f.x * R6f.x + R2f.z);
PV0f.z = R123f.z;
R123f.w = (R0f.x * R6f.y + R4f.y);
PV0f.w = R123f.w;
R2f.y = R5f.w + R5f.y;
PS0f = R2f.y;
// 1
R123f.x = (R4f.w * R1f.y + PV0f.w);
PV1f.x = R123f.x;
R123f.y = (R4f.w * R1f.x + PV0f.z);
PV1f.y = R123f.y;
R2f.z = R10f.x + R5f.x;
PV1f.z = R2f.z;
R123f.w = (R4f.w * R1f.z + PV0f.x);
PV1f.w = R123f.w;
R2f.w = PV0f.y * intBitsToFloat(uf_remappedPS[1].y);
PS1f = R2f.w;
// 2
backupReg0f = R3f.x;
R3f.x = R10f.x + PV1f.z;
PV0f.x = R3f.x;
R123f.y = (R4f.z * R3f.y + PV1f.x);
PV0f.y = R123f.y;
R123f.z = (R4f.z * R3f.z + PV1f.w);
PV0f.z = R123f.z;
R123f.w = (R4f.z * backupReg0f + PV1f.y);
PV0f.w = R123f.w;
R3f.y = R5f.w + R2f.y;
PS0f = R3f.y;
// 3
backupReg0f = R7f.z;
R1f.x = (R127f.y * R7f.x + PV0f.w);
R1f.y = R2f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.y = R1f.y;
R7f.z = (R127f.y * backupReg0f + PV0f.z);
R4f.w = (R127f.y * R7f.y + PV0f.y);
R7f.x = R10f.x + PV0f.x;
PS1f = R7f.x;
// 4
R5f.x = R10f.x + PS1f;
PV0f.x = R5f.x;
R7f.y = R5f.w + R3f.y;
PV0f.y = R7f.y;
R6f.w = PV1f.y * intBitsToFloat(uf_remappedPS[1].y);
PV0f.w = R6f.w;
// 5
R8f.x = R10f.x + PV0f.x;
R5f.y = R5f.w + PV0f.y;
R1f.w = PV0f.w * intBitsToFloat(uf_remappedPS[1].y);
R2f.xyz = (texture(textureUnitPS0, R2f.zy).xyz);
R3f.xyz = (texture(textureUnitPS0, R3f.xy).xyz);
R4f.xyz = (texture(textureUnitPS0, R7f.xy).xyz);
R0f.xyz = (texture(textureUnitPS0, R5f.xy).xyz);
// 0
R123f.x = (R2f.w * R2f.y + R4f.w);
PV0f.x = R123f.x;
R123f.y = (R2f.w * R2f.x + R1f.x);
PV0f.y = R123f.y;
R123f.z = (R2f.w * R2f.z + R7f.z);
PV0f.z = R123f.z;
R8f.w = R5f.w + R5f.y;
// 1
backupReg0f = R3f.x;
R3f.x = R1f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.x = R3f.x;
R123f.y = (R1f.y * R3f.z + PV0f.z);
PV1f.y = R123f.y;
R123f.z = (R1f.y * R3f.y + PV0f.x);
PV1f.z = R123f.z;
R123f.w = (R1f.y * backupReg0f + PV0f.y);
PV1f.w = R123f.w;
R1f.x = R10f.x + R8f.x;
PS1f = R1f.x;
// 2
R123f.x = (R6f.w * R4f.x + PV1f.w);
PV0f.x = R123f.x;
R1f.y = R5f.w + R8f.w;
PV0f.y = R1f.y;
R123f.z = (R6f.w * R4f.y + PV1f.z);
PV0f.z = R123f.z;
R123f.w = (R6f.w * R4f.z + PV1f.y);
PV0f.w = R123f.w;
R6f.w = PV1f.x * intBitsToFloat(uf_remappedPS[1].y);
PS0f = R6f.w;
// 3
backupReg0f = R0f.x;
R0f.x = (R1f.w * R0f.z + PV0f.w);
R4f.y = (R1f.w * R0f.y + PV0f.z);
R0f.z = (R1f.w * backupReg0f + PV0f.x);
R0f.w = R10f.x + R1f.x;
PV1f.w = R0f.w;
R0f.y = R5f.w + PV0f.y;
PS1f = R0f.y;
// 4
R2f.x = R10f.x + PV1f.w;
R2f.y = R5f.w + PS1f;
R4f.z = R6f.w * intBitsToFloat(uf_remappedPS[1].y);
R8f.xyz = (texture(textureUnitPS0, R8f.xw).xyz);
R1f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R5f.xyz = (texture(textureUnitPS0, R0f.wy).xyz);
R7f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);
// 0
R123f.x = (R3f.x * R8f.z + R0f.x);
PV0f.x = R123f.x;
R127f.y = R4f.z * intBitsToFloat(uf_remappedPS[1].y);
PV0f.y = R127f.y;
R123f.z = (R3f.x * R8f.x + R0f.z);
PV0f.z = R123f.z;
R123f.w = (R3f.x * R8f.y + R4f.y);
PV0f.w = R123f.w;
R0f.y = R5f.w + R2f.y;
PS0f = R0f.y;
// 1
R123f.x = (R6f.w * R1f.y + PV0f.w);
PV1f.x = R123f.x;
R123f.y = (R6f.w * R1f.x + PV0f.z);
PV1f.y = R123f.y;
R0f.z = R10f.x + R2f.x;
PV1f.z = R0f.z;
R123f.w = (R6f.w * R1f.z + PV0f.x);
PV1f.w = R123f.w;
R0f.w = PV0f.y * intBitsToFloat(uf_remappedPS[1].y);
PS1f = R0f.w;
// 2
backupReg0f = R5f.x;
R5f.x = R10f.x + PV1f.z;
PV0f.x = R5f.x;
R123f.y = (R4f.z * R5f.y + PV1f.x);
PV0f.y = R123f.y;
R123f.z = (R4f.z * R5f.z + PV1f.w);
PV0f.z = R123f.z;
R123f.w = (R4f.z * backupReg0f + PV1f.y);
PV0f.w = R123f.w;
R5f.y = R5f.w + R0f.y;
PS0f = R5f.y;
// 3
backupReg0f = R7f.z;
R1f.x = (R127f.y * R7f.x + PV0f.w);
R1f.y = R0f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.y = R1f.y;
R7f.z = (R127f.y * backupReg0f + PV0f.z);
R6f.w = (R127f.y * R7f.y + PV0f.y);
R7f.x = R10f.x + PV0f.x;
PS1f = R7f.x;
// 4
R2f.x = R10f.x + PS1f;
PV0f.x = R2f.x;
R7f.y = R5f.w + R5f.y;
PV0f.y = R7f.y;
R8f.w = PV1f.y * intBitsToFloat(uf_remappedPS[1].y);
PV0f.w = R8f.w;
// 5
R9f.x = R10f.x + PV0f.x;
R2f.y = R5f.w + PV0f.y;
R1f.w = PV0f.w * intBitsToFloat(uf_remappedPS[1].y);
R0f.xyz = (texture(textureUnitPS0, R0f.zy).xyz);
R5f.xyz = (texture(textureUnitPS0, R5f.xy).xyz);
R4f.xyz = (texture(textureUnitPS0, R7f.xy).xyz);
R3f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);
// 0
R123f.x = (R0f.w * R0f.y + R6f.w);
PV0f.x = R123f.x;
R123f.y = (R0f.w * R0f.x + R1f.x);
PV0f.y = R123f.y;
R123f.z = (R0f.w * R0f.z + R7f.z);
PV0f.z = R123f.z;
R9f.w = R5f.w + R2f.y;
// 1
backupReg0f = R5f.x;
R5f.x = R1f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.x = R5f.x;
R123f.y = (R1f.y * R5f.z + PV0f.z);
PV1f.y = R123f.y;
R123f.z = (R1f.y * R5f.y + PV0f.x);
PV1f.z = R123f.z;
R123f.w = (R1f.y * backupReg0f + PV0f.y);
PV1f.w = R123f.w;
R1f.x = R10f.x + R9f.x;
PS1f = R1f.x;
// 2
R123f.x = (R8f.w * R4f.x + PV1f.w);
PV0f.x = R123f.x;
R1f.y = R5f.w + R9f.w;
PV0f.y = R1f.y;
R123f.z = (R8f.w * R4f.y + PV1f.z);
PV0f.z = R123f.z;
R123f.w = (R8f.w * R4f.z + PV1f.y);
PV0f.w = R123f.w;
R8f.w = PV1f.x * intBitsToFloat(uf_remappedPS[1].y);
PS0f = R8f.w;
// 3
backupReg0f = R3f.x;
R3f.x = (R1f.w * R3f.z + PV0f.w);
R4f.y = (R1f.w * R3f.y + PV0f.z);
R3f.z = (R1f.w * backupReg0f + PV0f.x);
R3f.w = R10f.x + R1f.x;
PV1f.w = R3f.w;
R3f.y = R5f.w + PV0f.y;
PS1f = R3f.y;
// 4
R0f.x = R10f.x + PV1f.w;
R0f.y = R5f.w + PS1f;
R4f.z = R8f.w * intBitsToFloat(uf_remappedPS[1].y);
R6f.w = 1.0;
R9f.xyz = (texture(textureUnitPS0, R9f.xw).xyz);
R1f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R2f.xyz = (texture(textureUnitPS0, R3f.wy).xyz);
R7f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
// 0
R123f.x = (R5f.x * R9f.z + R3f.x);
PV0f.x = R123f.x;
R127f.y = R4f.z * intBitsToFloat(uf_remappedPS[1].y);
PV0f.y = R127f.y;
R123f.z = (R5f.x * R9f.x + R3f.z);
PV0f.z = R123f.z;
R123f.w = (R5f.x * R9f.y + R4f.y);
PV0f.w = R123f.w;
R3f.y = R5f.w + R0f.y;
PS0f = R3f.y;
// 1
R123f.x = (R8f.w * R1f.y + PV0f.w);
PV1f.x = R123f.x;
R123f.y = (R8f.w * R1f.x + PV0f.z);
PV1f.y = R123f.y;
R3f.z = R10f.x + R0f.x;
PV1f.z = R3f.z;
R123f.w = (R8f.w * R1f.z + PV0f.x);
PV1f.w = R123f.w;
R3f.w = PV0f.y * intBitsToFloat(uf_remappedPS[1].y);
PS1f = R3f.w;
// 2
backupReg0f = R2f.x;
R2f.x = R10f.x + PV1f.z;
PV0f.x = R2f.x;
R123f.y = (R4f.z * R2f.y + PV1f.x);
PV0f.y = R123f.y;
R123f.z = (R4f.z * R2f.z + PV1f.w);
PV0f.z = R123f.z;
R123f.w = (R4f.z * backupReg0f + PV1f.y);
PV0f.w = R123f.w;
R2f.y = R5f.w + R3f.y;
PS0f = R2f.y;
// 3
backupReg0f = R7f.z;
R0f.x = (R127f.y * R7f.x + PV0f.w);
R0f.y = R3f.w * intBitsToFloat(uf_remappedPS[1].y);
PV1f.y = R0f.y;
R7f.z = (R127f.y * backupReg0f + PV0f.z);
R8f.w = (R127f.y * R7f.y + PV0f.y);
R7f.x = R10f.x + PV0f.x;
PS1f = R7f.x;
// 4
backupReg0f = R10f.x;
R10f.x = backupReg0f + PS1f;
R7f.y = R5f.w + R2f.y;
PV0f.y = R7f.y;
R9f.w = PV1f.y * intBitsToFloat(uf_remappedPS[1].y);
PV0f.w = R9f.w;
// 5
R10f.y = R5f.w + PV0f.y;
R5f.w = PV0f.w * intBitsToFloat(uf_remappedPS[1].y);
R3f.xyz = (texture(textureUnitPS0, R3f.zy).xyz);
R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);
R4f.xyz = (texture(textureUnitPS0, R7f.xy).xyz);
R10f.xyz = (texture(textureUnitPS0, R10f.xy).xyz);
// 0
R123f.x = (R3f.w * R3f.y + R8f.w);
PV0f.x = R123f.x;
R123f.y = (R3f.w * R3f.x + R0f.x);
PV0f.y = R123f.y;
R123f.z = (R3f.w * R3f.z + R7f.z);
PV0f.z = R123f.z;
// 1
R123f.y = (R0f.y * R2f.z + PV0f.z);
PV1f.y = R123f.y;
R123f.z = (R0f.y * R2f.y + PV0f.x);
PV1f.z = R123f.z;
R123f.w = (R0f.y * R2f.x + PV0f.y);
PV1f.w = R123f.w;
// 2
R123f.x = (R9f.w * R4f.x + PV1f.w);
PV0f.x = R123f.x;
R123f.z = (R9f.w * R4f.y + PV1f.z);
PV0f.z = R123f.z;
R123f.w = (R9f.w * R4f.z + PV1f.y);
PV0f.w = R123f.w;
// 3
R123f.x = (R5f.w * R10f.z + PV0f.w);
PV1f.x = R123f.x;
R123f.y = (R5f.w * R10f.y + PV0f.z);
PV1f.y = R123f.y;
R123f.z = (R5f.w * R10f.x + PV0f.x);
PV1f.z = R123f.z;
// 4
R6f.x = PV1f.z * intBitsToFloat(uf_remappedPS[1].z);
R6f.y = PV1f.y * intBitsToFloat(uf_remappedPS[1].z);
R6f.z = PV1f.x * intBitsToFloat(uf_remappedPS[1].z);
// export
passPixelColor0 = vec4(R6f.x, R6f.y, R6f.z, R6f.w);
}

View File

@ -1,554 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 4d4b09634a7eab30
// Last step vertical blend. half tv scaled + pre-blending = aprox half step reduction
// To-do candidate for multi pass / bokeh replacement
const float resScale = ($width/$gameWidth);
uniform ivec4 uf_remappedPS[7];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4fde000 res 640x360x1 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(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf51aa000 res 640x360x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 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 0xf4e12000 res 640x360x1 dim 1 tm: 4 format 0820 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
//const float resScale = ($height/$gameHeight); // = 2.0;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0);
vec4 R5f = vec4(0.0);
vec4 R6f = vec4(0.0);
vec4 R7f = vec4(0.0);
vec4 R8f = vec4(0.0);
vec4 R9f = vec4(0.0);
vec4 R10f = vec4(0.0);
vec4 R11f = vec4(0.0);
vec4 R12f = vec4(0.0);
vec4 R13f = vec4(0.0);
vec4 R14f = vec4(0.0);
vec4 R15f = vec4(0.0);
vec4 R16f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R124f = vec4(0.0);
vec4 R125f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
R15f.xyzw = (texture(textureUnitPS2, R0f.xy).xyzw);
// 0
R1f.x = R0f.x + (intBitsToFloat(uf_remappedPS[0].x) / resScale);
R1f.y = R0f.y + (intBitsToFloat(uf_remappedPS[0].y) / resScale);
R0f.z = R0f.x + (intBitsToFloat(uf_remappedPS[0].z) / resScale);
R0f.w = R0f.y + (intBitsToFloat(uf_remappedPS[0].w) / resScale);
R16f.w = R15f.w;
PS0f = R16f.w;
// 1
R2f.x = R0f.x + (intBitsToFloat(uf_remappedPS[1].x) / resScale);
R2f.y = R0f.y + (intBitsToFloat(uf_remappedPS[1].y) / resScale);
R1f.z = R0f.x + (intBitsToFloat(uf_remappedPS[1].z) / resScale);
R1f.w = R0f.y + (intBitsToFloat(uf_remappedPS[1].w) / resScale);
// 2
R3f.x = R0f.x + (intBitsToFloat(uf_remappedPS[2].x) / resScale);
R3f.y = R0f.y + (intBitsToFloat(uf_remappedPS[2].y) / resScale);
R2f.z = R0f.x + (intBitsToFloat(uf_remappedPS[2].z) / resScale);
R2f.w = R0f.y + (intBitsToFloat(uf_remappedPS[2].w) / resScale);
// 3
R4f.x = R0f.x + (intBitsToFloat(uf_remappedPS[3].x) / resScale);
R4f.y = R0f.y + (intBitsToFloat(uf_remappedPS[3].y) / resScale);
R3f.z = R0f.x + (intBitsToFloat(uf_remappedPS[3].z) / resScale);
R3f.w = R0f.y + (intBitsToFloat(uf_remappedPS[3].w)/ resScale);
R5f.xyzw = (texture(textureUnitPS1, R1f.xy).xyzw);
R6f.xyzw = (texture(textureUnitPS1, R0f.zw).xyzw);
R7f.xyzw = (texture(textureUnitPS1, R2f.xy).xyzw);
R9f.xyzw = (texture(textureUnitPS1, R1f.zw).xyzw);
R8f.xyzw = (texture(textureUnitPS1, R3f.xy).xyzw);
R11f.xyzw = (texture(textureUnitPS1, R2f.zw).xyzw);
R10f.xyzw = (texture(textureUnitPS0, R4f.xy).xyzw);
R12f.xyzw = (texture(textureUnitPS0, R3f.zw).xyzw);
// 0
R4f.x = R0f.x + (intBitsToFloat(uf_remappedPS[4].x) / resScale);
R4f.y = R0f.y + (intBitsToFloat(uf_remappedPS[4].y) / resScale);
R3f.z = R0f.x + (intBitsToFloat(uf_remappedPS[4].z) / resScale);
R3f.w = R0f.y + (intBitsToFloat(uf_remappedPS[4].w) / resScale);
R127f.z = R5f.w + -(0.5);
R127f.z *= 2.0;
R127f.z = clamp(R127f.z, 0.0, 1.0);
PS0f = R127f.z;
// 1
backupReg0f = R0f.x;
backupReg1f = R0f.y;
backupReg0f = R0f.x;
backupReg1f = R0f.y;
R0f.x = backupReg0f + (intBitsToFloat(uf_remappedPS[5].x) / resScale);
R0f.y = backupReg1f + (intBitsToFloat(uf_remappedPS[5].y) / resScale);
R2f.z = backupReg0f + (intBitsToFloat(uf_remappedPS[5].z) / resScale);
R2f.w = backupReg1f + (intBitsToFloat(uf_remappedPS[5].w) / resScale);
PS1f = R5f.x + -(0.0);
// 2
PV0f.x = R5f.y + -(0.0);
R127f.y = R6f.w + -(0.5);
R127f.y *= 2.0;
R127f.y = clamp(R127f.y, 0.0, 1.0);
R126f.z = R127f.z + 1.0;
PV0f.w = R5f.z + -(0.0);
R125f.z = (R127f.z * PS1f + R15f.x);
PS0f = R125f.z;
// 3
R123f.x = (R127f.z * PV0f.w + R15f.z);
PV1f.x = R123f.x;
R123f.y = (R127f.z * PV0f.x + R15f.y);
PV1f.y = R123f.y;
PV1f.z = R6f.x + -(0.0);
PV1f.w = R6f.y + -(0.0);
PS1f = R6f.z + -(0.0);
// 4
R3f.x = (R127f.y * PV1f.w + PV1f.y);
R3f.y = (R127f.y * PV1f.z + R125f.z);
R1f.z = R7f.w + -(0.5);
R1f.z *= 2.0;
R1f.z = clamp(R1f.z, 0.0, 1.0);
R1f.w = R126f.z + R127f.y;
R0f.w = (R127f.y * PS1f + PV1f.x);
PS0f = R0f.w;
R4f.xyzw = (texture(textureUnitPS0, R4f.xy).xyzw);
R13f.xyzw = (texture(textureUnitPS0, R3f.zw).xyzw);
R14f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
R2f.xyzw = (texture(textureUnitPS0, R2f.zw).xyzw);
// 0
PV0f.x = R7f.y + -(0.0);
PV0f.y = R7f.x + -(0.0);
R126f.z = R1f.w + R1f.z;
PV0f.w = R7f.z + -(0.0);
R127f.x = R9f.w + -(0.5);
R127f.x *= 2.0;
R127f.x = clamp(R127f.x, 0.0, 1.0);
PS0f = R127f.x;
// 1
R126f.x = (R1f.z * PV0f.w + R0f.w);
R123f.y = (R1f.z * PV0f.x + R3f.x);
PV1f.y = R123f.y;
R123f.z = (R1f.z * PV0f.y + R3f.y);
PV1f.z = R123f.z;
PV1f.w = R9f.x + -(0.0);
PS1f = R9f.y + -(0.0);
// 2
backupReg0f = R126f.z;
R125f.x = R8f.w + -(0.5);
R125f.x *= 2.0;
R125f.x = clamp(R125f.x, 0.0, 1.0);
PV0f.y = R9f.z + -(0.0);
R126f.z = backupReg0f + R127f.x;
R127f.w = (R127f.x * PV1f.w + PV1f.z);
R126f.w = (R127f.x * PS1f + PV1f.y);
PS0f = R126f.w;
// 3
PV1f.x = R8f.x + -(0.0);
PV1f.y = R8f.y + -(0.0);
R123f.z = (R127f.x * PV0f.y + R126f.x);
PV1f.z = R123f.z;
R125f.w = R5f.w + -(intBitsToFloat(0x3f666666));
PS1f = R8f.z + -(0.0);
// 4
backupReg0f = R125f.x;
backupReg0f = R125f.x;
backupReg1f = R126f.z;
backupReg0f = R125f.x;
backupReg0f = R125f.x;
R125f.x = (backupReg0f * PV1f.y + R126f.w);
R127f.y = (backupReg0f * PV1f.x + R127f.w);
R126f.z = backupReg1f + backupReg0f;
R127f.w = R11f.w + -(0.5);
R127f.w *= 2.0;
R127f.w = clamp(R127f.w, 0.0, 1.0);
R126f.w = (backupReg0f * PS1f + PV1f.z);
PS0f = R126f.w;
// 5
R127f.x = -(R15f.y) + R5f.y;
R126f.y = -(R15f.x) + R5f.x;
R125f.z = R125f.w * intBitsToFloat(0x41200000);
R125f.z = clamp(R125f.z, 0.0, 1.0);
R125f.w = -(R15f.z) + R5f.z;
R127f.z = R6f.w + -(intBitsToFloat(0x3f666666));
PS1f = R127f.z;
// 6
PV0f.x = R11f.x + -(0.0);
PV0f.y = R11f.y + -(0.0);
R124f.z = R8f.w + -(intBitsToFloat(0x3f666666));
R124f.w = R7f.w + -(intBitsToFloat(0x3f666666));
PS0f = R11f.z + -(0.0);
// 7
backupReg0f = R125f.x;
backupReg1f = R127f.w;
backupReg2f = R127f.y;
backupReg1f = R127f.w;
R125f.x = R10f.w + -(0.5);
R125f.x *= 2.0;
R125f.x = clamp(R125f.x, 0.0, 1.0);
R127f.y = R126f.z + R127f.w;
R126f.z = (R127f.w * PV0f.y + backupReg0f);
R127f.w = (backupReg1f * PV0f.x + backupReg2f);
R125f.y = (backupReg1f * PS0f + R126f.w);
PS1f = R125f.y;
// 8
backupReg0f = R127f.x;
backupReg1f = R126f.y;
backupReg2f = R127f.z;
R127f.x = (R125f.w * R125f.z + R15f.z);
R126f.y = (backupReg0f * R125f.z + R15f.y);
R127f.z = (backupReg1f * R125f.z + R15f.x);
R125f.w = backupReg2f * intBitsToFloat(0x41200000);
R125f.w = clamp(R125f.w, 0.0, 1.0);
R126f.x = -(R15f.x) + R6f.x;
PS0f = R126f.x;
// 9
R6f.x = R124f.w * intBitsToFloat(0x41200000);
R6f.x = clamp(R6f.x, 0.0, 1.0);
R124f.y = -(R15f.x) + R7f.x;
R125f.z = -(R15f.z) + R6f.z;
R124f.w = -(R15f.y) + R6f.y;
R124f.x = -(R15f.y) + R7f.y;
PS1f = R124f.x;
// 10
R7f.x = R124f.z * intBitsToFloat(0x41200000);
R7f.x = clamp(R7f.x, 0.0, 1.0);
R7f.y = R9f.w + -(intBitsToFloat(0x3f666666));
R124f.z = -(R15f.x) + R8f.x;
R126f.w = -(R15f.z) + R7f.z;
R7f.w = -(R15f.y) + R8f.y;
PS0f = R7f.w;
// 11
backupReg0f = R8f.z;
PV1f.x = R10f.y + -(0.0);
PV1f.y = R10f.z + -(0.0);
R8f.z = -(R15f.z) + backupReg0f;
PV1f.w = R10f.x + -(0.0);
R8f.y = R10f.w + -(intBitsToFloat(0x3f666666));
PS1f = R8f.y;
// 12
backupReg0f = R125f.x;
backupReg0f = R125f.x;
backupReg1f = R127f.y;
backupReg0f = R125f.x;
backupReg0f = R125f.x;
R125f.x = (backupReg0f * PV1f.w + R127f.w);
R127f.y = (backupReg0f * PV1f.x + R126f.z);
R126f.z = R12f.w + -(0.5);
R126f.z *= 2.0;
R126f.z = clamp(R126f.z, 0.0, 1.0);
R127f.w = backupReg1f + backupReg0f;
R7f.z = (backupReg0f * PV1f.y + R125f.y);
PS0f = R7f.z;
// 13
backupReg0f = R126f.x;
backupReg1f = R126f.y;
backupReg2f = R127f.z;
backupReg3f = R124f.w;
R126f.x = max(R15f.z, R127f.x);
R126f.y = (backupReg0f * R125f.w + R15f.x);
R127f.z = max(R15f.y, backupReg1f);
R124f.w = max(R15f.x, backupReg2f);
R127f.x = (backupReg3f * R125f.w + R15f.y);
PS1f = R127f.x;
// 14
backupReg0f = R6f.x;
backupReg0f = R6f.x;
backupReg1f = R124f.y;
backupReg0f = R6f.x;
backupReg2f = R125f.z;
R6f.x = (R126f.w * backupReg0f + R15f.z);
R124f.y = (R124f.x * backupReg0f + R15f.y);
R125f.z = (backupReg1f * backupReg0f + R15f.x);
R126f.w = (backupReg2f * R125f.w + R15f.z);
R8f.x = R7f.y * intBitsToFloat(0x41200000);
R8f.x = clamp(R8f.x, 0.0, 1.0);
PS0f = R8f.x;
// 15
backupReg0f = R9f.x;
R9f.x = (R124f.z * R7f.x + R15f.x);
R125f.y = -(R15f.z) + R9f.z;
R9f.z = -(R15f.y) + R9f.y;
R9f.w = -(R15f.x) + backupReg0f;
R124f.x = (R7f.w * R7f.x + R15f.y);
PS1f = R124f.x;
// 16
backupReg0f = R8f.y;
backupReg1f = R8f.z;
backupReg2f = R7f.x;
R7f.x = R11f.w + -(intBitsToFloat(0x3f666666));
R8f.y = backupReg0f * intBitsToFloat(0x41200000);
R8f.y = clamp(R8f.y, 0.0, 1.0);
R8f.z = -(R15f.x) + R10f.x;
R7f.w = (backupReg1f * backupReg2f + R15f.z);
R6f.z = -(R15f.y) + R10f.y;
PS0f = R6f.z;
// 17
PV1f.x = R12f.x + -(0.0);
R10f.y = -(R15f.z) + R10f.z;
R124f.z = R12f.y + -(0.0);
R125f.w = R12f.z + -(0.0);
R8f.w = R4f.w + -(0.5);
R8f.w *= 2.0;
R8f.w = clamp(R8f.w, 0.0, 1.0);
PS1f = R8f.w;
// 18
R10f.x = R127f.w + R126f.z;
R9f.y = R4f.w + -(intBitsToFloat(0x3f666666));
R10f.z = max(R124f.w, R126f.y);
R10f.w = max(R127f.z, R127f.x);
R5f.z = (R126f.z * PV1f.x + R125f.x);
PS0f = R5f.z;
// 19
backupReg0f = R7f.z;
backupReg1f = R7f.w;
backupReg2f = R6f.x;
R6f.x = max(R126f.x, R126f.w);
R7f.y = (R126f.z * R124f.z + R127f.y);
R7f.z = (R126f.z * R125f.w + backupReg0f);
R7f.w = max(R124f.x, R124f.y);
R6f.w = max(backupReg1f, backupReg2f);
PS1f = R6f.w;
// 20
backupReg0f = R8f.x;
backupReg0f = R8f.x;
backupReg1f = R9f.z;
backupReg0f = R8f.x;
R8f.x = (R9f.w * backupReg0f + R15f.x);
R6f.y = max(R9f.x, R125f.z);
R9f.z = (R125f.y * backupReg0f + R15f.z);
R9f.w = (backupReg1f * backupReg0f + R15f.y);
R5f.y = -(R15f.y) + R11f.y;
PS0f = R5f.y;
// 21
backupReg0f = R7f.x;
backupReg1f = R10f.y;
R7f.x = -(R15f.z) + R11f.z;
R10f.y = (R8f.z * R8f.y + R15f.x);
R11f.z = -(R15f.x) + R11f.x;
R11f.w = backupReg0f * intBitsToFloat(0x41200000);
R11f.w = clamp(R11f.w, 0.0, 1.0);
R8f.z = (backupReg1f * R8f.y + R15f.z);
PS1f = R8f.z;
// 0
R124f.x = R12f.w + -(intBitsToFloat(0x3f666666));
R125f.y = R4f.y + -(0.0);
R125f.z = R4f.x + -(0.0);
R126f.w = (R6f.z * R8f.y + R15f.y);
R126f.x = R4f.z + -(0.0);
PS0f = R126f.x;
// 1
R127f.x = -(R15f.z) + R4f.z;
R127f.y = -(R15f.y) + R4f.y;
R126f.z = -(R15f.x) + R4f.x;
R125f.w = R9f.y * intBitsToFloat(0x41200000);
R125f.w = clamp(R125f.w, 0.0, 1.0);
R124f.z = R10f.x + R8f.w;
PS1f = R124f.z;
// 2
R125f.x = max(R10f.z, R8f.x);
R124f.y = R13f.w + -(0.5);
R124f.y *= 2.0;
R124f.y = clamp(R124f.y, 0.0, 1.0);
R127f.z = max(R6f.x, R9f.z);
R127f.w = R14f.w + -(intBitsToFloat(0x3f666666));
R9f.z = (R8f.w * R125f.y + R7f.y);
PS0f = R9f.z;
// 3
backupReg0f = R6f.y;
backupReg1f = R125f.z;
backupReg2f = R126f.x;
R126f.x = max(R10f.w, R9f.w);
R6f.y = R124f.x * intBitsToFloat(0x41200000);
R6f.y = clamp(R6f.y, 0.0, 1.0);
R125f.z = max(R10f.y, backupReg0f);
R124f.w = (R8f.w * backupReg1f + R5f.z);
R126f.y = (R8f.w * backupReg2f + R7f.z);
PS1f = R126f.y;
// 4
backupReg0f = R12f.x;
backupReg1f = R12f.y;
R12f.x = max(R8f.z, R6f.w);
R12f.y = max(R126f.w, R7f.w);
R5f.z = -(R15f.x) + backupReg0f;
R6f.w = -(R15f.y) + backupReg1f;
R7f.w = -(R15f.z) + R12f.z;
PS0f = R7f.w;
// 5
backupReg0f = R127f.y;
R124f.x = (R126f.z * R125f.w + R15f.x);
R127f.y = (R7f.x * R11f.w + R15f.z);
R126f.z = (R5f.y * R11f.w + R15f.y);
R126f.w = (R11f.z * R11f.w + R15f.x);
R8f.z = (backupReg0f * R125f.w + R15f.y);
PS1f = R8f.z;
// 6
backupReg0f = R127f.x;
backupReg1f = R125f.w;
R127f.x = R13f.x + -(0.0);
R125f.y = R13f.y + -(0.0);
R11f.z = R13f.z + -(0.0);
R125f.w = (backupReg0f * backupReg1f + R15f.z);
R12f.z = R13f.w + -(intBitsToFloat(0x3f666666));
PS0f = R12f.z;
// 7
backupReg0f = R124f.z;
R6f.x = R127f.w * intBitsToFloat(0x41200000);
R6f.x = clamp(R6f.x, 0.0, 1.0);
R5f.y = -(R15f.x) + R14f.x;
R124f.z = R14f.w + -(0.5);
R124f.z *= 2.0;
R124f.z = clamp(R124f.z, 0.0, 1.0);
R127f.w = backupReg0f + R124f.y;
R7f.x = -(R15f.y) + R14f.y;
PS1f = R7f.x;
// 8
backupReg0f = R126f.z;
backupReg1f = R127f.x;
R127f.x = max(R125f.x, R126f.w);
R10f.y = R2f.w + -(intBitsToFloat(0x3f666666));
R126f.z = max(R126f.x, backupReg0f);
R126f.w = -(R15f.z) + R14f.z;
R7f.y = (R124f.y * backupReg1f + R124f.w);
PS0f = R7f.y;
// 9
backupReg0f = R127f.y;
backupReg1f = R125f.z;
R125f.x = (R124f.y * R125f.y + R9f.z);
R127f.y = max(R125f.w, R12f.x);
R125f.z = max(R127f.z, backupReg0f);
R11f.w = max(R124f.x, backupReg1f);
R125f.y = R14f.x + -(0.0);
PS1f = R125f.y;
// 10
backupReg0f = R8f.z;
backupReg1f = R12f.y;
R12f.x = -(R15f.x) + R13f.x;
R12f.y = R12f.z * intBitsToFloat(0x41200000);
R12f.y = clamp(R12f.y, 0.0, 1.0);
R8f.z = max(backupReg0f, backupReg1f);
R124f.w = (R124f.y * R11f.z + R126f.y);
R8f.x = R2f.w + -(0.5);
R8f.x *= 2.0;
R8f.x = clamp(R8f.x, 0.0, 1.0);
PS0f = R8f.x;
// 11
R124f.x = (R7f.w * R6f.y + R15f.z);
R126f.y = (R6f.w * R6f.y + R15f.y);
R127f.z = (R5f.z * R6f.y + R15f.x);
R6f.w = -(R15f.y) + R13f.y;
R5f.z = -(R15f.z) + R13f.z;
PS1f = R5f.z;
// 12
backupReg0f = R14f.z;
backupReg1f = R126f.w;
R126f.x = R14f.y + -(0.0);
R124f.y = (R7f.x * R6f.x + R15f.y);
R14f.z = (R5f.y * R6f.x + R15f.x);
R125f.w = backupReg0f + -(0.0);
R126f.w = (backupReg1f * R6f.x + R15f.z);
PS0f = R126f.w;
// 13
R6f.x = R10f.y * intBitsToFloat(0x41200000);
R6f.x = clamp(R6f.x, 0.0, 1.0);
R10f.y = -(R15f.y) + R2f.y;
R13f.z = R127f.w + R124f.z;
R127f.w = -(R15f.x) + R2f.x;
R5f.y = -(R15f.z) + R2f.z;
PS1f = R5f.y;
// 14
backupReg0f = R127f.x;
backupReg1f = R127f.z;
R127f.x = max(R126f.w, R127f.y);
R127f.y = max(R125f.z, R124f.x);
R127f.z = max(R126f.z, R126f.y);
R126f.w = max(backupReg0f, backupReg1f);
R14f.w = R2f.x + -(0.0);
PS0f = R14f.w;
// 15
backupReg0f = R126f.x;
backupReg1f = R124f.z;
backupReg2f = R125f.y;
R126f.x = (R124f.z * R125f.w + R124f.w);
R125f.y = (R124f.z * backupReg0f + R125f.x);
R124f.z = (backupReg1f * backupReg2f + R7f.y);
R124f.w = max(R14f.z, R11f.w);
R11f.w = max(R124f.y, R8f.z);
PS1f = R11f.w;
// 16
R123f.x = (R6f.w * R12f.y + R15f.y);
PV0f.x = R123f.x;
R123f.y = (R12f.x * R12f.y + R15f.x);
PV0f.y = R123f.y;
R126f.z = R2f.y + -(0.0);
R125f.w = (R5f.z * R12f.y + R15f.z);
R124f.y = R2f.z + -(0.0);
PS0f = R124f.y;
// 17
backupReg0f = R127f.z;
R125f.x = (R127f.w * R6f.x + R15f.x);
R126f.y = max(R126f.w, PV0f.y);
R127f.z = (R5f.y * R6f.x + R15f.z);
R127f.w = (R10f.y * R6f.x + R15f.y);
R5f.y = max(backupReg0f, PV0f.x);
PS1f = R5f.y;
// 18
backupReg0f = R126f.z;
backupReg1f = R126f.x;
R126f.x = max(R127f.y, R125f.w);
R127f.y = (R8f.x * R14f.w + R124f.z);
R126f.z = (R8f.x * backupReg0f + R125f.y);
PV0f.w = R13f.z + R8f.x;
R124f.z = (R8f.x * R124f.y + backupReg1f);
PS0f = R124f.z;
// 19
PV1f.x = max(R127f.w, R11f.w);
PV1f.y = max(R125f.x, R124f.w);
PV1f.w = max(R127f.z, R127f.x);
R127f.z = 1.0 / PV0f.w;
PS1f = R127f.z;
// 20
backupReg0f = R126f.x;
R126f.x = max(backupReg0f, PV1f.w);
PV0f.y = max(R5f.y, PV1f.x);
PV0f.z = max(R126f.y, PV1f.y);
R127f.w = R127f.y * PS1f;
PV0f.w = R127f.w;
R127f.x = R126f.z * PS1f;
PS0f = R127f.x;
// 21
PV1f.y = PV0f.y + -(PS0f);
PV1f.z = PV0f.z + -(PV0f.w);
R124f.w = R124f.z * R127f.z;
PV1f.w = R124f.w;
// 22
PV0f.x = R126f.x + -(PV1f.w);
R16f.y = (PV1f.y * intBitsToFloat(uf_remappedPS[6].x) + R127f.x);
R16f.x = (PV1f.z * intBitsToFloat(uf_remappedPS[6].x) + R127f.w);
PS0f = R16f.x;
// 23
R16f.z = (PV0f.x * intBitsToFloat(uf_remappedPS[6].x) + R124f.w);
// export
passPixelColor0 = vec4(R16f.x, R16f.y, R16f.z, R16f.w);
}

View File

@ -1,95 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable
// shader 4f557f00a56c6358
//test align edge alpha shadow
uniform ivec4 uf_remappedVS[4];
uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(location = 0) in uvec4 attrDataSem0;
layout(location = 1) in uvec4 attrDataSem1;
out gl_PerVertex
{
vec4 gl_Position;
float gl_PointSize;
};
layout(location = 0) out vec4 passParameterSem0;
layout(location = 1) out vec4 passParameterSem1;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R123f = vec4(0.0);
uvec4 attrDecoder;
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 = floatBitsToInt(ivec4(gl_VertexID, 0, 0, gl_InstanceID));
attrDecoder.xyz = attrDataSem0.xyz;
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
attrDecoder.w = 0;
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
attrDecoder.xy = attrDataSem1.xy;
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
attrDecoder.z = 0;
attrDecoder.w = 0;
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
// 0
PV0f.x = mul_nonIEEE(R1f.w, intBitsToFloat(uf_remappedVS[0].y));
PV0f.y = mul_nonIEEE(R1f.w, intBitsToFloat(uf_remappedVS[0].x));
PV0f.z = mul_nonIEEE(R1f.w, intBitsToFloat(uf_remappedVS[0].w));
PV0f.w = mul_nonIEEE(R1f.w, intBitsToFloat(uf_remappedVS[0].z));
R0f.x = R2f.x;
PS0f = R0f.x;
// 1
R123f.x = (mul_nonIEEE(R1f.z,intBitsToFloat(uf_remappedVS[1].y)) + PV0f.x);
PV1f.x = R123f.x;
R123f.y = (mul_nonIEEE(R1f.z,intBitsToFloat(uf_remappedVS[1].x)) + PV0f.y);
PV1f.y = R123f.y;
R123f.z = (mul_nonIEEE(R1f.z,intBitsToFloat(uf_remappedVS[1].w)) + PV0f.z);
PV1f.z = R123f.z;
R123f.w = (mul_nonIEEE(R1f.z,intBitsToFloat(uf_remappedVS[1].z)) + PV0f.w);
PV1f.w = R123f.w;
R1f.z = 0.0;
PS1f = R1f.z;
// 2
R123f.x = (mul_nonIEEE(R1f.y,intBitsToFloat(uf_remappedVS[2].y)) + PV1f.x);
PV0f.x = R123f.x;
R123f.y = (mul_nonIEEE(R1f.y,intBitsToFloat(uf_remappedVS[2].x)) + PV1f.y);
PV0f.y = R123f.y;
R123f.z = (mul_nonIEEE(R1f.y,intBitsToFloat(uf_remappedVS[2].w)) + PV1f.z);
PV0f.z = R123f.z;
R123f.w = (mul_nonIEEE(R1f.y,intBitsToFloat(uf_remappedVS[2].z)) + PV1f.w);
PV0f.w = R123f.w;
R0f.y = R2f.y;
PS0f = R0f.y;
// 3
R2f.x = (mul_nonIEEE(R1f.x,intBitsToFloat(uf_remappedVS[3].x)) + PV0f.y);
R2f.y = (mul_nonIEEE(R1f.x,intBitsToFloat(uf_remappedVS[3].y)) + PV0f.x);
R2f.z = (mul_nonIEEE(R1f.x,intBitsToFloat(uf_remappedVS[3].z)) + PV0f.w);
R2f.w = (mul_nonIEEE(R1f.x,intBitsToFloat(uf_remappedVS[3].w)) + PV0f.z);
// export
gl_Position = vec4(R1f.x*(1/1.001), R1f.y*(1 / 1.001), R1f.z, R1f.w);
// export
passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
// export
passParameterSem1 = vec4(R0f.x, R0f.y, R0f.z, R0f.z);
// 0
}

View File

@ -1,110 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 5098356af9ebfe85
//AO pass 3 vertical blur
const float resScale = ($height/$gameHeight);
uniform ivec4 uf_remappedPS[2];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5911000 res 640x360x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R125f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
// 0
PV0f.x = -(intBitsToFloat(uf_remappedPS[0].y)/ resScale);
PV0f.x /= 2.0;
R127f.y = intBitsToFloat(uf_remappedPS[0].y) / resScale;
R127f.y /= 2.0;
R127f.z = 0.0;
PV0f.z = R127f.z;
PV0f.w = intBitsToFloat(uf_remappedPS[0].y) / resScale * intBitsToFloat(0xbfc00000);
R126f.z = intBitsToFloat(uf_remappedPS[0].y) / resScale*1.5;// *1.5 or blur won't sample between pixels
PS0f = R126f.z;
// 1
R1f.x = PV0f.z + R0f.x;
R1f.y = PV0f.w + R0f.y;
R0f.z = PV0f.z + R0f.x;
R0f.w = PV0f.x + R0f.y;
R2f.x = PV0f.z + R0f.x;
PS1f = R2f.x;
// 2
backupReg0f = R0f.x;
R0f.x = intBitsToFloat(uf_remappedPS[1].z) * intBitsToFloat(0x40100000);
R2f.y = R127f.y + R0f.y;
R1f.z = intBitsToFloat(uf_remappedPS[1].z) * 0.25;
R3f.w = R127f.z + backupReg0f;
R3f.y = R126f.z + R0f.y;
PS0f = R3f.y;
R1f.x = (texture(textureUnitPS0, R1f.xy).x);
R3f.x = (texture(textureUnitPS0, R0f.zw).x);
R2f.x = (texture(textureUnitPS0, R2f.xy).x);
R4f.x = (texture(textureUnitPS0, R3f.wy).x);
// 0
R127f.x = -(R1f.x) + 1.0;
R127f.y = -(R1f.z) * intBitsToFloat(0x3fb8aa3b);
PV0f.z = -(R0f.x) * intBitsToFloat(0x3fb8aa3b);
R127f.w = -(R3f.x) + 1.0;
R0f.w = 1.0;
PS0f = R0f.w;
// 1
R126f.x = -(R2f.x) + 1.0;
R126f.y = -(R4f.x) + 1.0;
R125f.w = exp2(PV0f.z);
PS1f = R125f.w;
// 2
PV0f.y = PS1f + 0.0;
R123f.z = (R127f.x * PS1f + 0.0);
PV0f.z = R123f.z;
R126f.w = exp2(R127f.y);
PS0f = R126f.w;
// 3
R123f.y = (R127f.w * PS0f + PV0f.z);
PV1f.y = R123f.y;
PV1f.z = PV0f.y + PS0f;
// 4
PV0f.z = R126f.w + PV1f.z;
R123f.w = (R126f.w * R126f.x + PV1f.y);
PV0f.w = R123f.w;
// 5
backupReg0f = R125f.w;
PV1f.x = R125f.w + PV0f.z;
R125f.w = (backupReg0f * R126f.y + PV0f.w);
// 6
PS0f = 1.0 / PV1f.x;
// 7
PV1f.y = R125f.w * PS0f;
// 8
R0f.x = (-(PV1f.y) * intBitsToFloat(uf_remappedPS[1].y) + 1.0);
R0f.x = clamp(R0f.x, 0.0, 1.0);
// export
passPixelColor0 = vec4(R0f.x, R0f.x, R0f.x, R0f.w);
}

View File

@ -1,255 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
const float sharpen_strength = 0.2; //0 off, 1 full (edge haloing) note, off = use only blur aa
// shader 59df1c7e1806366c
// aa-restore + sharpen pass. AA removal will override any setting here
const float resScale = ($height/$gameHeight); // = 3.0;
uniform ivec4 uf_remappedPS[2];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 1280x720x1 dim 1 tm: 4 format 0001 compSel: 0 4 4 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 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
layout(location = 0) out vec4 passPixelColor0;
vec3 blurSample(in vec2 uv, in vec2 xoff, in vec2 yoff)
{
vec3 v11 = texture(textureUnitPS1, uv + xoff).rgb;
vec3 v12 = texture(textureUnitPS1, uv + yoff).rgb;
vec3 v21 = texture(textureUnitPS1, uv - xoff).rgb;
vec3 v22 = texture(textureUnitPS1, uv - yoff).rgb;
return (v11 + v12 + v21 + v22 + 2.0 * texture(textureUnitPS1, uv).rgb) * 0.166667;
}
vec3 edgeStrength(in vec2 uv)
{
const float spread = 0.5;
vec2 offset = vec2(1.0) / textureSize(textureUnitPS0, 0);
vec2 up = vec2(0.0, offset.y) * spread;
vec2 right = vec2(offset.x, 0.0) * spread;
const float frad = 3.0;
vec3 v11 = blurSample(uv + up - right, right, up);
vec3 v12 = blurSample(uv + up, right, up);
vec3 v13 = blurSample(uv + up + right, right, up);
vec3 v21 = blurSample(uv - right, right, up);
vec3 v22 = blurSample(uv, right, up);
vec3 v23 = blurSample(uv + right, right, up);
vec3 v31 = blurSample(uv - up - right, right, up);
vec3 v32 = blurSample(uv - up, right, up);
vec3 v33 = blurSample(uv - up + right, right, up);
vec3 laplacian_of_g = v11 * 0.0 + v12 * 1.0 + v13 * 0.0
+ v21 * 1.0 + v22 * -4.0 + v23 * 1.0
+ v31 * 0.0 + v32 * 1.0 + v33 * 0.0;
laplacian_of_g = laplacian_of_g * 1.0;
return laplacian_of_g.xyz;
}
uniform vec2 uf_fragCoordScale;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R4i = ivec4(0);
ivec4 R123i = ivec4(0);
ivec4 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;
bool activeMaskStack[2];
bool activeMaskStackC[3];
activeMaskStack[0] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem0);
R1i = floatBitsToInt(passParameterSem1);
if( activeMaskStackC[1] == true ) {
//R2i.xyzw = floatBitsToInt(textureGather(textureUnitPS0, intBitsToFloat(R0i.zw)).xyzw); // cemu bug? Review later
//R0i.x = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).x); // edge blur/chromatic
}
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
backupReg0i = R2i.x;
R2i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(0x3aaaaaab)); //0.0026041667 / 2 0x3aaaaaab
PV0i.x = R2i.x;
R127i.y = floatBitsToInt(max(intBitsToFloat(R2i.y), intBitsToFloat(R2i.w)));
R127i.z = floatBitsToInt(min(intBitsToFloat(R2i.y), intBitsToFloat(R2i.w)));
// 1
PV1i.y = floatBitsToInt(min(intBitsToFloat(R2i.z), intBitsToFloat(PV0i.x)));
PV1i.w = floatBitsToInt(max(intBitsToFloat(R2i.z), intBitsToFloat(PV0i.x)));
// 2
R4i.y = floatBitsToInt(max(intBitsToFloat(R127i.y), intBitsToFloat(PV1i.w)));
PV0i.y = R4i.y;
R4i.z = floatBitsToInt(min(intBitsToFloat(R127i.z), intBitsToFloat(PV1i.y)));
PV0i.z = R4i.z;
// 3
backupReg0i = R0i.x;
backupReg0i = R0i.x;
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(uf_remappedPS[0].x)/resScale);
PV1i.y = floatBitsToInt(max(intBitsToFloat(backupReg0i), intBitsToFloat(PV0i.y)));
PV1i.z = floatBitsToInt(min(intBitsToFloat(backupReg0i), intBitsToFloat(PV0i.z)));
// 4
R0i.x = floatBitsToInt(-(intBitsToFloat(PV1i.z)) + intBitsToFloat(PV1i.y));
R0i.w = floatBitsToInt(max(intBitsToFloat(PV1i.x), intBitsToFloat(uf_remappedPS[0].y)));
// 5
backupReg0i = R0i.x;
predResult = (intBitsToFloat(R0i.w) > intBitsToFloat(backupReg0i));
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
if( (0 == 0)) discard;
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
if( activeMaskStackC[1] == true ) {
// 0
R127i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.y),intBitsToFloat(R2i.z),intBitsToFloat(R2i.w)),vec4(-(1.0),1.0,1.0,-(1.0))));
PV0i.x = R127i.x;
PV0i.y = R127i.x;
PV0i.z = R127i.x;
PV0i.w = R127i.x;
R127i.z = 0;
PS0i = R127i.z;
// 1
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.y),intBitsToFloat(R2i.z),intBitsToFloat(R2i.w)),vec4(-(1.0),1.0,-(1.0),1.0)));
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
R127i.y = tempi.x;
R4i.w = 0x3f800000;
PS1i = R4i.w;
// 2
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R127i.x),intBitsToFloat(PV1i.x),intBitsToFloat(R127i.z),-0.0),vec4(intBitsToFloat(R127i.x),intBitsToFloat(PV1i.x),intBitsToFloat(R127i.z),0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
// 3
tempResultf = 1.0 / sqrt(intBitsToFloat(PV0i.x));
PS1i = floatBitsToInt(tempResultf);
// 4
backupReg0i = R127i.x;
R127i.x = floatBitsToInt(intBitsToFloat(backupReg0i) * intBitsToFloat(PS1i));
PV0i.x = R127i.x;
R127i.w = floatBitsToInt(intBitsToFloat(R127i.y) * intBitsToFloat(PS1i));
PV0i.w = R127i.w;
// 5
PV1i.x = floatBitsToInt(max(intBitsToFloat(PV0i.x), -(intBitsToFloat(PV0i.x))));
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.w) * intBitsToFloat(uf_remappedPS[1].y)/ resScale);
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(uf_remappedPS[1].x)/ resScale);
PV1i.w = floatBitsToInt(max(intBitsToFloat(PV0i.w), -(intBitsToFloat(PV0i.w))));
// 6
R0i.x = floatBitsToInt(intBitsToFloat(R1i.x) + -(intBitsToFloat(PV1i.z)));
R0i.y = floatBitsToInt(intBitsToFloat(R1i.y) + -(intBitsToFloat(PV1i.y)));
PV0i.z = floatBitsToInt(min(intBitsToFloat(PV1i.x), intBitsToFloat(PV1i.w)));
R2i.w = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(PV1i.z));
R2i.y = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(PV1i.y));
PS0i = R2i.y;
// 7
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(uf_remappedPS[0].z)/ resScale);
// 8
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.y));
// 9
PV1i.z = floatBitsToInt(intBitsToFloat(R127i.w) * intBitsToFloat(PS0i));
PV1i.w = floatBitsToInt(intBitsToFloat(R127i.x) * intBitsToFloat(PS0i));
// 10
PV0i.x = floatBitsToInt(max(intBitsToFloat(PV1i.z), intBitsToFloat(0xc0000000)));
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.w), intBitsToFloat(0xc0000000)));
// 11
PV1i.z = floatBitsToInt(min(intBitsToFloat(PV0i.x), 2.0));
PV1i.w = floatBitsToInt(min(intBitsToFloat(PV0i.y), 2.0));
// 12
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.z) * intBitsToFloat(uf_remappedPS[1].w)/ resScale);
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.w) * intBitsToFloat(uf_remappedPS[1].z)/ resScale);
// 13
backupReg0i = R1i.x;
backupReg1i = R1i.y;
backupReg0i = R1i.x;
backupReg1i = R1i.y;
R1i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + -(intBitsToFloat(PV0i.w)));
R1i.y = floatBitsToInt(intBitsToFloat(backupReg1i) + -(intBitsToFloat(PV0i.x)));
R0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV0i.w));
R0i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(PV0i.x));
}
if( activeMaskStackC[1] == true ) {
R1i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xy)).xyz);
R3i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R0i.zw)).xyz);
R0i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R0i.xy)).xyz);
R2i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R2i.wy)).xyz);
}
if( activeMaskStackC[1] == true ) {
// 0
R127i.x = floatBitsToInt(intBitsToFloat(R1i.z) + intBitsToFloat(R3i.z));
PV0i.y = floatBitsToInt(intBitsToFloat(R1i.y) + intBitsToFloat(R3i.y));
PV0i.z = floatBitsToInt(intBitsToFloat(R1i.x) + intBitsToFloat(R3i.x));
// 1
backupReg0i = R0i.x;
PV1i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(R2i.x));
R127i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(R2i.z));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) * 0.25);
PV1i.w = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(R2i.y));
PS1i = floatBitsToInt(intBitsToFloat(PV0i.z) * 0.25);
// 2
backupReg0i = R127i.x;
R127i.x = floatBitsToInt((intBitsToFloat(PV1i.x) * 0.25 + intBitsToFloat(PS1i)));
PV0i.y = floatBitsToInt(intBitsToFloat(backupReg0i) * 0.25);
R127i.z = PV1i.x;
R127i.z = floatBitsToInt(intBitsToFloat(R127i.z) / 2.0);
R127i.w = floatBitsToInt((intBitsToFloat(PV1i.w) * 0.25 + intBitsToFloat(PV1i.z)));
PV0i.w = R127i.w;
R126i.y = PV1i.w;
R126i.y = floatBitsToInt(intBitsToFloat(R126i.y) / 2.0);
PS0i = R126i.y;
// 3
PV1i.x = ((intBitsToFloat(PV0i.w) > intBitsToFloat(R4i.y))?int(0xFFFFFFFF):int(0x0));
PV1i.y = ((intBitsToFloat(R4i.z) > intBitsToFloat(PV0i.w))?int(0xFFFFFFFF):int(0x0));
R126i.z = floatBitsToInt((intBitsToFloat(R127i.y) * 0.25 + intBitsToFloat(PV0i.y)));
R126i.w = R127i.y;
R126i.w = floatBitsToInt(intBitsToFloat(R126i.w) / 2.0);
// 4
R123i.w = ((PV1i.y == 0)?(PV1i.x):(int(-1)));
PV0i.w = R123i.w;
// 5
R4i.x = ((PV0i.w == 0)?(R127i.x):(R127i.z));
R4i.y = ((PV0i.w == 0)?(R127i.w):(R126i.y));
R4i.z = ((PV0i.w == 0)?(R126i.z):(R126i.w));
}
vec2 uv = gl_FragCoord.xy / textureSize(textureUnitPS1, 0);
vec4 sharpColour = vec4(texture(textureUnitPS1, uv).xyz - edgeStrength(uv) * sharpen_strength, 1.0);
// export
//passPixelColor0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
passPixelColor0 = mix(sharpColour, vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w)), 0.5);
}

View File

@ -1,114 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 5b5c7c2a52ed1459
// AO step 2 horizontal blur
const float resScale = ($height/$gameHeight);
uniform ivec4 uf_remappedPS[2];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf589e000 res 640x360x1 dim 1 tm: 4 format 0007 compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0);
vec4 R5f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R125f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
// 0
PV0f.x = -(intBitsToFloat(uf_remappedPS[0].x) / resScale);
PV0f.x /= 2.0 ;
PV0f.y = 0.0;
R126f.z = 0.0;
PV0f.z = R126f.z;
PV0f.w = intBitsToFloat(uf_remappedPS[0].x) / resScale * intBitsToFloat(0xbfc00000) ; //-1.5
R127f.z = intBitsToFloat(uf_remappedPS[0].x) / resScale;
R127f.z /= 2.0 ;
PS0f = R127f.z ;
// 1
R1f.x = R0f.x + PV0f.w ;
R1f.y = R0f.y + PV0f.z ;
R0f.z = R0f.x + PV0f.x ;
R0f.w = R0f.y + PV0f.y ;
PS1f = 0.0;
// 2
backupReg0f = R0f.x;
backupReg1f = R0f.y;
PV0f.x = intBitsToFloat(uf_remappedPS[1].z) * 0.25;
PV0f.y = intBitsToFloat(uf_remappedPS[1].z) * intBitsToFloat(0x40100000); //2.25
R1f.z = backupReg0f + R127f.z;
R1f.w = backupReg1f + PS1f;
PS0f = intBitsToFloat(uf_remappedPS[0].x) / resScale*1.5;// *1.5;
// 3
R3f.x = -(PV0f.x) * intBitsToFloat(0x3fb8aa3b); //1.442695
R2f.y = R0f.y + R126f.z;
R2f.z = R0f.x + PS0f;
R2f.w = -(PV0f.y) * intBitsToFloat(0x3fb8aa3b); //1.442695
R5f.y = 0.0;
PS1f = R5f.y;
R1f.x = (texture(textureUnitPS0, R1f.xy).x);
R0f.x = (texture(textureUnitPS0, R0f.zw).x);
R2f.x = (texture(textureUnitPS0, R1f.zw).x);
R4f.x = (texture(textureUnitPS0, R2f.zy).x);
// 0
R127f.x = -(R2f.x) + 1.0;
PV0f.z = -(R1f.x) + 1.0;
R127f.w = -(R0f.x) + 1.0;
R126f.x = exp2(R2f.w);
PS0f = R126f.x;
// 1
R125f.x = -(R4f.x) + 1.0;
R123f.y = (PV0f.z * PS0f + 0.0);
PV1f.y = R123f.y;
PV1f.z = PS0f + 0.0;
R5f.w = 1.0;
R126f.z = exp2(R3f.x);
PS1f = R126f.z;
// 2
R123f.y = (R127f.w * PS1f + PV1f.y);
PV0f.y = R123f.y;
PV0f.w = PV1f.z + PS1f;
// 3
R123f.y = (R126f.z * R127f.x + PV0f.y);
PV1f.y = R123f.y;
PV1f.z = R126f.z + PV0f.w;
// 4
PV0f.y = R126f.x + PV1f.z;
R127f.w = (R126f.x * R125f.x + PV1f.y);
// 5
PS1f = 1.0 / PV0f.y;
// 6
PV0f.z = R127f.w * PS1f;
// 7
R5f.x = -(PV0f.z) + 1.0;
// export
passPixelColor0 = vec4(R5f.x, R5f.y, R5f.y, R5f.w);
}

View File

@ -1,12 +1,10 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
// shader 5eb82314ffb8484e // bg scale, probably overkill to scale #extension GL_ARB_separate_shader_objects : enable
// Last step vertical blend // shader 5eb82314ffb8484e
//cross fade blur prel
const float resScale = ($height/$gameHeight); // = 1.5;
uniform ivec4 uf_remappedPS[7]; uniform ivec4 uf_remappedPS[7];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 res 640x360x1 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(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 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 passParameterSem0; layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
layout(location = 1) out vec4 passPixelColor1; layout(location = 1) out vec4 passPixelColor1;
@ -58,29 +56,29 @@ int cubeMapFaceId;
R0f = passParameterSem0; R0f = passParameterSem0;
R14f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw); R14f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
// 0 // 0
R1f.x = R0f.x + (intBitsToFloat(uf_remappedPS[0].x) / resScale); R1f.x = R0f.x + intBitsToFloat(uf_remappedPS[0].x);
R1f.y = R0f.y + (intBitsToFloat(uf_remappedPS[0].y) / resScale); R1f.y = R0f.y + intBitsToFloat(uf_remappedPS[0].y);
R0f.z = R0f.x + (intBitsToFloat(uf_remappedPS[0].z) / resScale); R0f.z = R0f.x + intBitsToFloat(uf_remappedPS[0].z);
R0f.w = R0f.y + (intBitsToFloat(uf_remappedPS[0].w) / resScale); R0f.w = R0f.y + intBitsToFloat(uf_remappedPS[0].w);
R17f.w = R14f.w; R17f.w = R14f.w;
PS0f = R17f.w; PS0f = R17f.w;
// 1 // 1
R2f.x = R0f.x + (intBitsToFloat(uf_remappedPS[1].x) / resScale); R2f.x = R0f.x + intBitsToFloat(uf_remappedPS[1].x);
R2f.y = R0f.y + (intBitsToFloat(uf_remappedPS[1].y) / resScale); R2f.y = R0f.y + intBitsToFloat(uf_remappedPS[1].y);
R1f.z = R0f.x + (intBitsToFloat(uf_remappedPS[1].z) / resScale); R1f.z = R0f.x + intBitsToFloat(uf_remappedPS[1].z);
R1f.w = R0f.y + (intBitsToFloat(uf_remappedPS[1].w) / resScale); R1f.w = R0f.y + intBitsToFloat(uf_remappedPS[1].w);
R16f.w = R14f.w; R16f.w = R14f.w;
PS1f = R16f.w; PS1f = R16f.w;
// 2 // 2
R3f.x = R0f.x + (intBitsToFloat(uf_remappedPS[2].x) / resScale); R3f.x = R0f.x + intBitsToFloat(uf_remappedPS[2].x);
R3f.y = R0f.y + (intBitsToFloat(uf_remappedPS[2].y) / resScale); R3f.y = R0f.y + intBitsToFloat(uf_remappedPS[2].y);
R2f.z = R0f.x + (intBitsToFloat(uf_remappedPS[2].z) / resScale); R2f.z = R0f.x + intBitsToFloat(uf_remappedPS[2].z);
R2f.w = R0f.y + (intBitsToFloat(uf_remappedPS[2].w) / resScale); R2f.w = R0f.y + intBitsToFloat(uf_remappedPS[2].w);
// 3 // 3
R4f.x = R0f.x + (intBitsToFloat(uf_remappedPS[3].x) / resScale); R4f.x = R0f.x + intBitsToFloat(uf_remappedPS[3].x);
R4f.y = R0f.y + (intBitsToFloat(uf_remappedPS[3].y) / resScale); R4f.y = R0f.y + intBitsToFloat(uf_remappedPS[3].y);
R3f.z = R0f.x + (intBitsToFloat(uf_remappedPS[3].z) / resScale); R3f.z = R0f.x + intBitsToFloat(uf_remappedPS[3].z);
R3f.w = R0f.y + (intBitsToFloat(uf_remappedPS[3].w) / resScale); R3f.w = R0f.y + intBitsToFloat(uf_remappedPS[3].w);
R5f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw); R5f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
R6f.xyzw = (texture(textureUnitPS0, R0f.zw).xyzw); R6f.xyzw = (texture(textureUnitPS0, R0f.zw).xyzw);
R7f.xyzw = (texture(textureUnitPS0, R2f.xy).xyzw); R7f.xyzw = (texture(textureUnitPS0, R2f.xy).xyzw);
@ -90,10 +88,10 @@ R10f.xyzw = (texture(textureUnitPS0, R2f.zw).xyzw);
R11f.xyzw = (texture(textureUnitPS0, R4f.xy).xyzw); R11f.xyzw = (texture(textureUnitPS0, R4f.xy).xyzw);
R12f.xyzw = (texture(textureUnitPS0, R3f.zw).xyzw); R12f.xyzw = (texture(textureUnitPS0, R3f.zw).xyzw);
// 0 // 0
R4f.x = R0f.x + (intBitsToFloat(uf_remappedPS[4].x) / resScale); R4f.x = R0f.x + intBitsToFloat(uf_remappedPS[4].x);
R4f.y = R0f.y + (intBitsToFloat(uf_remappedPS[4].y) / resScale); R4f.y = R0f.y + intBitsToFloat(uf_remappedPS[4].y);
R3f.z = R0f.x + (intBitsToFloat(uf_remappedPS[4].z) / resScale); R3f.z = R0f.x + intBitsToFloat(uf_remappedPS[4].z);
R3f.w = R0f.y + (intBitsToFloat(uf_remappedPS[4].w) / resScale); R3f.w = R0f.y + intBitsToFloat(uf_remappedPS[4].w);
R127f.x = R5f.w + -(0.5); R127f.x = R5f.w + -(0.5);
R127f.x *= 2.0; R127f.x *= 2.0;
R127f.x = clamp(R127f.x, 0.0, 1.0); R127f.x = clamp(R127f.x, 0.0, 1.0);
@ -103,10 +101,10 @@ backupReg0f = R0f.x;
backupReg1f = R0f.y; backupReg1f = R0f.y;
backupReg0f = R0f.x; backupReg0f = R0f.x;
backupReg1f = R0f.y; backupReg1f = R0f.y;
R0f.x = backupReg0f + (intBitsToFloat(uf_remappedPS[5].z) / resScale); R0f.x = backupReg0f + intBitsToFloat(uf_remappedPS[5].z);
R0f.y = backupReg1f + (intBitsToFloat(uf_remappedPS[5].w) / resScale); R0f.y = backupReg1f + intBitsToFloat(uf_remappedPS[5].w);
R2f.z = backupReg0f + (intBitsToFloat(uf_remappedPS[5].x) / resScale); R2f.z = backupReg0f + intBitsToFloat(uf_remappedPS[5].x);
R2f.w = backupReg1f + (intBitsToFloat(uf_remappedPS[5].y) / resScale); R2f.w = backupReg1f + intBitsToFloat(uf_remappedPS[5].y);
PS1f = R5f.x + -(0.0); PS1f = R5f.x + -(0.0);
// 2 // 2
R126f.x = R127f.x + 1.0; R126f.x = R127f.x + 1.0;

View File

@ -1,7 +1,9 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
// shader 810cde937ebbdf9f // Tiny rand dithering fixing sky banding #extension GL_ARB_separate_shader_objects : enable
// To-do incremental seed would be lovely... except from using previous pass as input I have no idea.. // shader 810cde937ebbdf9f
//de-band sky
const float dither = $dither ;
uniform ivec4 uf_remappedPS[5]; uniform ivec4 uf_remappedPS[5];
layout(location = 0) in vec4 passParameterSem0; layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
@ -17,6 +19,7 @@ highp float lineRand(vec2 co)
return fract(sin(sn) * c); return fract(sin(sn) * c);
} }
int clampFI32(int v) int clampFI32(int v)
{ {
if( v == 0x7FFFFFFF ) if( v == 0x7FFFFFFF )
@ -44,7 +47,8 @@ bool predResult = true;
vec3 cubeMapSTM; vec3 cubeMapSTM;
int cubeMapFaceId; int cubeMapFaceId;
R0f = passParameterSem0; R0f = passParameterSem0;
R0f.xy = R0f.xy - (lineRand(gl_FragCoord.xy)*0.015); R0f.xy = R0f.xy - (lineRand(gl_FragCoord.xy)*0.042 *dither);
R0f.xy = R0f.xy + (lineRand(gl_FragCoord.xy*vec2(0.1, 0.09))*0.041 *dither);
// 0 // 0
backupReg0f = R0f.x; backupReg0f = R0f.x;
backupReg0f = R0f.x; backupReg0f = R0f.x;

View File

@ -1,10 +1,26 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
// shader 840947e29015aa9a // Looking at LA cut-scene base blur #extension GL_ARB_separate_shader_objects : enable
// // shader 840947e29015aa9a
//const float resScale = ($height/$gameHeight); //BB cliff
const float resScale = ($height/$gameHeight);
const float dither = $dither ;
const float scaleShader = $scaleShader;
const float scaleBlur = $scaleBlur;
const int sampleScale = 4;
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);
}
uniform ivec4 uf_remappedPS[3]; uniform ivec4 uf_remappedPS[3];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf470a000 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 = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf470a000 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 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0 layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
@ -12,6 +28,29 @@ layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1; layout(location = 1) in vec4 passParameterSem1;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale; 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) int clampFI32(int v)
{ {
if( v == 0x7FFFFFFF ) if( v == 0x7FFFFFFF )
@ -46,26 +85,38 @@ vec3 cubeMapSTM;
int cubeMapFaceId; int cubeMapFaceId;
R0f = passParameterSem0; R0f = passParameterSem0;
R1f = passParameterSem1; R1f = passParameterSem1;
R0f.xy = R0f.xy - (lineRand(gl_FragCoord.xy)*0.0012 *dither);
R0f.xy = R0f.xy + (lineRand(gl_FragCoord.xy*vec2(0.1, 0.09))*0.0011 *dither);
// 0 // 0
R2f.x = R1f.x + (intBitsToFloat(uf_remappedPS[0].x) / resScale); R2f.x = R1f.x + intBitsToFloat(uf_remappedPS[0].x);
R2f.y = R1f.y + (intBitsToFloat(uf_remappedPS[0].y) / resScale); R2f.y = R1f.y + intBitsToFloat(uf_remappedPS[0].y);
R0f.z = R1f.x + (intBitsToFloat(uf_remappedPS[0].z) / resScale); R0f.z = R1f.x + intBitsToFloat(uf_remappedPS[0].z);
R0f.w = R1f.y + (intBitsToFloat(uf_remappedPS[0].w) / resScale); R0f.w = R1f.y + intBitsToFloat(uf_remappedPS[0].w);
// 1 // 1
backupReg0f = R1f.x; backupReg0f = R1f.x;
backupReg1f = R1f.y; backupReg1f = R1f.y;
backupReg0f = R1f.x; backupReg0f = R1f.x;
backupReg1f = R1f.y; backupReg1f = R1f.y;
R1f.xyz = vec3(backupReg0f,backupReg1f,backupReg0f) + vec3(intBitsToFloat(uf_remappedPS[1].x) / resScale,intBitsToFloat(uf_remappedPS[1].y) / resScale,intBitsToFloat(uf_remappedPS[1].z) / resScale); R1f.xyz = vec3(backupReg0f,backupReg1f,backupReg0f) + vec3(intBitsToFloat(uf_remappedPS[1].x),intBitsToFloat(uf_remappedPS[1].y),intBitsToFloat(uf_remappedPS[1].z));
R1f.w = backupReg1f + intBitsToFloat(uf_remappedPS[1].w) / resScale; R1f.w = backupReg1f + intBitsToFloat(uf_remappedPS[1].w);
vec2 coord = passParameterSem0.xy*textureSize(textureUnitPS0, 0);
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0);
vec2 uv = coord * ps;
R3f.xyz = (texture(textureUnitPS1, R2f.xy).xyz); R3f.xyz = (texture(textureUnitPS1, R2f.xy).xyz);
R4f.xyz = (texture(textureUnitPS1, R0f.zw).xyz); R4f.xyz = (texture(textureUnitPS1, R0f.zw).xyz);
R5f.xyz = (texture(textureUnitPS1, R1f.xy).xyz); R5f.xyz = (texture(textureUnitPS1, R1f.xy).xyz);
R6f.xyz = (texture(textureUnitPS1, R1f.zw).xyz); R6f.xyz = (texture(textureUnitPS1, R1f.zw).xyz);
R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz); R2f.xyz = blur(textureUnitPS0, R2f.xy, ps*scaleBlur).xyz;
R7f.xyz = (texture(textureUnitPS0, R0f.zw).xyz); R7f.xyz = R2f.xyz;
R8f.xyz = (texture(textureUnitPS0, R1f.xy).xyz); R8f.xyz = R2f.xyz;
R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz); R1f.xyz = R2f.xyz;
//R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);
//R7f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
//R8f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
//R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz);
// 0 // 0
tempf.x = dot(vec4(R3f.x,R3f.y,R3f.z,-0.0),vec4(intBitsToFloat(0x3e000000),intBitsToFloat(0x41ff0000),intBitsToFloat(0x45fe0100),0.0)); tempf.x = dot(vec4(R3f.x,R3f.y,R3f.z,-0.0),vec4(intBitsToFloat(0x3e000000),intBitsToFloat(0x41ff0000),intBitsToFloat(0x45fe0100),0.0));
PV0f.x = tempf.x; PV0f.x = tempf.x;

View File

@ -1,140 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 8b8ade20f1ae78e7
//light bleed, waterfall fog
uniform ivec4 uf_remappedPS[5];
const float resScale = ($height/$gameHeight);
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5196000 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: 0
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R124f = vec4(0.0);
vec4 R125f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
// 0
R1f.x = R0f.x + intBitsToFloat(uf_remappedPS[0].x)/ resScale;
R1f.y = R0f.y + intBitsToFloat(uf_remappedPS[0].y)/ resScale;
R0f.z = R0f.x + intBitsToFloat(uf_remappedPS[1].x)/ resScale;
R0f.w = R0f.y + intBitsToFloat(uf_remappedPS[1].y)/ resScale;
// 1
R2f.x = R0f.x + intBitsToFloat(uf_remappedPS[2].x)/ resScale;
R2f.y = R0f.y + intBitsToFloat(uf_remappedPS[2].y)/ resScale;
R1f.z = R0f.x + intBitsToFloat(uf_remappedPS[3].x)/ resScale;
R1f.w = R0f.y + intBitsToFloat(uf_remappedPS[3].y)/ resScale;
// 2
backupReg0f = R0f.x;
backupReg1f = R0f.y;
R0f.x = backupReg0f + intBitsToFloat(uf_remappedPS[4].x)/ resScale;
R0f.y = backupReg1f + intBitsToFloat(uf_remappedPS[4].y)/ resScale;
R4f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
R3f.xyzw = (texture(textureUnitPS0, R0f.zw).xyzw);
R2f.xyzw = (texture(textureUnitPS0, R2f.xy).xyzw);
R1f.xyzw = (texture(textureUnitPS0, R1f.zw).xyzw);
R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
// 0
PV0f.x = R4f.w * intBitsToFloat(uf_remappedPS[0].z);
PV0f.y = R4f.z * intBitsToFloat(uf_remappedPS[0].z);
PV0f.z = R4f.y * intBitsToFloat(uf_remappedPS[0].z);
PV0f.w = R4f.x * intBitsToFloat(uf_remappedPS[0].z);
R127f.w = max(R3f.x, R4f.x);
PS0f = R127f.w;
// 1
R123f.x = (R3f.z * intBitsToFloat(uf_remappedPS[1].z) + PV0f.y);
PV1f.x = R123f.x;
R127f.y = (R3f.w * intBitsToFloat(uf_remappedPS[1].z) + PV0f.x);
R123f.z = (R3f.y * intBitsToFloat(uf_remappedPS[1].z) + PV0f.z);
PV1f.z = R123f.z;
R123f.w = (R3f.x * intBitsToFloat(uf_remappedPS[1].z) + PV0f.w);
PV1f.w = R123f.w;
R127f.z = max(R3f.y, R4f.y);
PS1f = R127f.z;
// 2
PV0f.x = max(R3f.w, R4f.w);
PV0f.y = max(R3f.z, R4f.z);
R126f.z = (R2f.x * intBitsToFloat(uf_remappedPS[2].z) + PV1f.w);
R126f.w = (R2f.y * intBitsToFloat(uf_remappedPS[2].z) + PV1f.z);
R125f.w = (R2f.z * intBitsToFloat(uf_remappedPS[2].z) + PV1f.x);
PS0f = R125f.w;
// 3
backupReg0f = R127f.y;
R127f.x = max(R127f.z, R2f.y);
R127f.y = max(R127f.w, R2f.x);
R123f.z = (R2f.w * intBitsToFloat(uf_remappedPS[2].z) + backupReg0f);
PV1f.z = R123f.z;
R127f.w = max(PV0f.y, R2f.z);
R127f.z = max(PV0f.x, R2f.w);
PS1f = R127f.z;
// 4
backupReg0f = R0f.x;
R126f.x = (R1f.y * intBitsToFloat(uf_remappedPS[3].z) + R126f.w);
R123f.y = (R1f.x * intBitsToFloat(uf_remappedPS[3].z) + R126f.z);
PV0f.y = R123f.y;
R126f.z = (R1f.w * intBitsToFloat(uf_remappedPS[3].z) + PV1f.z);
R126f.w = (R1f.z * intBitsToFloat(uf_remappedPS[3].z) + R125f.w);
PS0f = max(backupReg0f, R1f.x);
// 5
backupReg0f = R0f.y;
backupReg1f = R0f.x;
PV1f.x = max(R0f.w, R1f.w);
PV1f.y = max(R0f.z, R1f.z);
PV1f.z = max(backupReg0f, R1f.y);
R125f.w = max(R127f.y, PS0f);
R124f.w = (backupReg1f * intBitsToFloat(uf_remappedPS[4].z) + PV0f.y);
PS1f = R124f.w;
// 6
backupReg0f = R127f.x;
backupReg1f = R0f.y;
backupReg2f = R0f.z;
R127f.x = max(R127f.z, PV1f.x);
PV0f.y = max(R127f.w, PV1f.y);
PV0f.z = max(backupReg0f, PV1f.z);
R127f.w = (backupReg1f * intBitsToFloat(uf_remappedPS[4].z) + R126f.x);
PV0f.w = R127f.w;
R127f.y = (backupReg2f * intBitsToFloat(uf_remappedPS[4].z) + R126f.w);
PS0f = R127f.y;
// 7
R126f.x = (R0f.w * intBitsToFloat(uf_remappedPS[4].z) + R126f.z);
PV1f.x = R126f.x;
PV1f.y = PV0f.y + -(PS0f);
PV1f.z = PV0f.z + -(PV0f.w);
PV1f.w = R125f.w + -(R124f.w);
// 8
PV0f.x = R127f.x + -(PV1f.x);
R0f.y = (PV1f.z * 0.25 + R127f.w);
R0f.z = (PV1f.y * 0.25 + R127f.y);
R0f.x = (PV1f.w * 0.25 + R124f.w);
PS0f = R0f.x;
// 9
R0f.w = (PV0f.x * 0.25 + R126f.x);
// export
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
}

View File

@ -1,183 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 8c1e55fd967b0496
// 1/4 -> 1/16 bloom pyramid . Pixelated unless scaled but still needs blur for light bleed..
// To-do. Check if screen res is * samples stable
const float resScale = ($height/$gameHeight); // = 3.0;
const int sampleScale = 3;
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);
}
uniform ivec4 uf_remappedPS[5];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e76000 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 6 6 6 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
// FabriceNeyret2, single pass gaussian by intermediate MIPmap level. https://www.shadertoy.com/view/ltScRG
// I hereby pledge my loyalty to the FabriceNeyret2 fanclub, this is bloody beautiful!
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 min(a*b, min(abs(a)*3.40282347E+38F, abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0);
vec4 R5f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
//R0f.xy = R0f.xy - (lineRand(gl_FragCoord.xy)*0.015);
//R0f.xy = vec2((passParameterSem0.x + passParameterSem0.z), (passParameterSem0.y + passParameterSem0.w));
// 0
R1f.x = R0f.x + (intBitsToFloat(uf_remappedPS[0].x) / resScale);
R1f.y = R0f.y + (intBitsToFloat(uf_remappedPS[0].y) / resScale);
R0f.z = R0f.x + (intBitsToFloat(uf_remappedPS[1].x) / resScale);
R0f.w = R0f.y + (intBitsToFloat(uf_remappedPS[1].y) / resScale);
R5f.w = 1.0;
PS0f = R5f.w;
// 1
R2f.x = R0f.x + (intBitsToFloat(uf_remappedPS[2].x) / resScale);
R2f.y = R0f.y + (intBitsToFloat(uf_remappedPS[2].y) / resScale);
R1f.z = R0f.x + (intBitsToFloat(uf_remappedPS[3].x) / resScale);
R1f.w = R0f.y + (intBitsToFloat(uf_remappedPS[3].y) / resScale);
// 2
backupReg0f = R0f.x;
backupReg1f = R0f.y;
R0f.x = backupReg0f + (intBitsToFloat(uf_remappedPS[4].x) / resScale);
R0f.y = backupReg1f + (intBitsToFloat(uf_remappedPS[4].y) / resScale);
vec2 coord = passParameterSem0.xy*textureSize(textureUnitPS0, 0); // R0f.xy;// vec2(0.5, 0.5);
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0);
vec2 uv = coord * ps;
R4f.xyz = blur(textureUnitPS0, uv, ps*0.25).xyz;
R4f.xyz += (texture(textureUnitPS0, R1f.xy).xyz)/2;
R3f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);// prob?
R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz);
R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
/* //org
R4f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R3f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);// prob?
R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz);
R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
*/
// 0
PV0f.x = R4f.y * intBitsToFloat(uf_remappedPS[0].z);
PV0f.y = R4f.x * intBitsToFloat(uf_remappedPS[0].z);
PV0f.z = R4f.z * intBitsToFloat(uf_remappedPS[0].z);
PV0f.w = max(R3f.x, R4f.x);
R127f.z = max(R3f.y, R4f.y);
PS0f = R127f.z;
// 1
R123f.x = (R3f.z * intBitsToFloat(uf_remappedPS[1].z) + PV0f.z);
PV1f.x = R123f.x;
PV1f.y = max(R3f.z, R4f.z);
R123f.z = (R3f.y * intBitsToFloat(uf_remappedPS[1].z) + PV0f.x);
PV1f.z = R123f.z;
R123f.w = (R3f.x * intBitsToFloat(uf_remappedPS[1].z) + PV0f.y);
PV1f.w = R123f.w;
R127f.y = max(PV0f.w, R2f.x);
PS1f = R127f.y;
// 2
R127f.x = max(R127f.z, R2f.y);
R123f.y = (R2f.y * intBitsToFloat(uf_remappedPS[2].z) + PV1f.z);
PV0f.y = R123f.y;
R123f.z = (R2f.x * intBitsToFloat(uf_remappedPS[2].z) + PV1f.w);
PV0f.z = R123f.z;
R123f.w = (R2f.z * intBitsToFloat(uf_remappedPS[2].z) + PV1f.x);
PV0f.w = R123f.w;
R127f.w = max(PV1f.y, R2f.z);
PS0f = R127f.w;
// 3
backupReg0f = R0f.y;
R123f.x = (R1f.x * intBitsToFloat(uf_remappedPS[3].z) + PV0f.z);
PV1f.x = R123f.x;
PV1f.y = max(R0f.x, R1f.x);
R123f.z = (R1f.y * intBitsToFloat(uf_remappedPS[3].z) + PV0f.y);
PV1f.z = R123f.z;
R126f.w = (R1f.z * intBitsToFloat(uf_remappedPS[3].z) + PV0f.w);
PS1f = max(backupReg0f, R1f.y);
// 4
backupReg0f = R0f.x;
backupReg1f = R0f.y;
PV0f.x = max(R127f.y, PV1f.y);
PV0f.y = max(R0f.z, R1f.z);
R127f.z = (backupReg0f * intBitsToFloat(uf_remappedPS[4].z) + PV1f.x);
PV0f.z = R127f.z;
PV0f.w = max(R127f.x, PS1f);
R127f.x = (backupReg1f * intBitsToFloat(uf_remappedPS[4].z) + PV1f.z);
PS0f = R127f.x;
// 5
backupReg0f = R0f.z;
PV1f.x = PV0f.x + -(PV0f.z);
PV1f.y = PV0f.w + -(PS0f);
PV1f.z = max(R127f.w, PV0f.y);
R127f.w = (backupReg0f * intBitsToFloat(uf_remappedPS[4].z) + R126f.w);
PV1f.w = R127f.w;
// 6
PV0f.x = PV1f.z + -(PV1f.w);
R5f.y = (PV1f.y * 0.275 + R127f.x)*lightBloom;//degree of bloom
R5f.x = (PV1f.x * 0.275 + R127f.z)*lightBloom;
PS0f = R5f.x;
// 7
R5f.z = (PV0f.x * 0.275 + R127f.w)*lightBloom;
// export
passPixelColor0 = vec4(R5f.x, R5f.y, R5f.z, R5f.w);
}

View File

@ -1,448 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 986b29629873321d
/// AO 1st pass detection
//2 = 8, 3 = 16
const float AOScale = 1.5; // AO detail vs volume 1.5 as a compromise 1.0 default. Scale to res = 100% detail but sharp and tiny. lines 357, 360 for comments: Needs blur++
const float noiseScale = 4.5; // 8 banding for vertical objects, 4 is more random,less details
//const float noiseScale = 4.0; //multiple of noise texture samples ie banding vs details
uniform ivec4 uf_remappedPS[4];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5f0a000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 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 0xf5984000 res 4x4x1 dim 1 tm: 2 format 081e compSel: 0 1 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 0 0 0 border: 0
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
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 R9i = ivec4(0);
ivec4 R10i = ivec4(0);
ivec4 R11i = ivec4(0);
ivec4 R12i = ivec4(0);
ivec4 R13i = ivec4(0);
ivec4 R14i = ivec4(0);
ivec4 R15i = ivec4(0);
ivec4 R16i = ivec4(0);
ivec4 R17i = ivec4(0);
ivec4 R18i = ivec4(0);
ivec4 R19i = ivec4(0);
ivec4 R20i = ivec4(0);
ivec4 R21i = ivec4(0);
ivec4 R22i = ivec4(0);
ivec4 R23i = ivec4(0);
ivec4 R24i = ivec4(0);
ivec4 R25i = ivec4(0);
ivec4 R26i = ivec4(0);
ivec4 R27i = ivec4(0);
ivec4 R28i = ivec4(0);
ivec4 R29i = ivec4(0);
ivec4 R30i = ivec4(0);
ivec4 R31i = ivec4(0);
ivec4 R32i = ivec4(0);
ivec4 R33i = ivec4(0);
ivec4 R34i = ivec4(0);
ivec4 R35i = ivec4(0);
ivec4 R36i = ivec4(0);
ivec4 R37i = ivec4(0);
ivec4 R38i = ivec4(0);
ivec4 R39i = ivec4(0);
ivec4 R40i = ivec4(0);
ivec4 R41i = ivec4(0);
ivec4 R42i = ivec4(0);
ivec4 R43i = ivec4(0);
ivec4 R44i = ivec4(0);
ivec4 R45i = ivec4(0);
ivec4 R46i = ivec4(0);
ivec4 R47i = ivec4(0);
ivec4 R48i = ivec4(0);
ivec4 R49i = ivec4(0);
ivec4 R50i = ivec4(0);
ivec4 R51i = ivec4(0);
ivec4 R52i = ivec4(0);
ivec4 R53i = ivec4(0);
ivec4 R54i = ivec4(0);
ivec4 R55i = ivec4(0);
ivec4 R56i = ivec4(0);
ivec4 R57i = ivec4(0);
ivec4 R58i = ivec4(0);
ivec4 R59i = ivec4(0);
ivec4 R60i = ivec4(0);
ivec4 R61i = ivec4(0);
ivec4 R62i = ivec4(0);
ivec4 R63i = ivec4(0);
ivec4 R64i = ivec4(0);
ivec4 R65i = ivec4(0);
ivec4 R66i = ivec4(0);
ivec4 R67i = ivec4(0);
ivec4 R68i = ivec4(0);
ivec4 R69i = ivec4(0);
ivec4 R70i = ivec4(0);
ivec4 R71i = ivec4(0);
ivec4 R72i = ivec4(0);
ivec4 R73i = ivec4(0);
ivec4 R74i = ivec4(0);
ivec4 R75i = ivec4(0);
ivec4 R76i = ivec4(0);
ivec4 R77i = ivec4(0);
ivec4 R78i = ivec4(0);
ivec4 R79i = ivec4(0);
ivec4 R80i = ivec4(0);
ivec4 R81i = ivec4(0);
ivec4 R82i = ivec4(0);
ivec4 R83i = ivec4(0);
ivec4 R84i = ivec4(0);
ivec4 R85i = ivec4(0);
ivec4 R86i = ivec4(0);
ivec4 R87i = ivec4(0);
ivec4 R88i = ivec4(0);
ivec4 R89i = ivec4(0);
ivec4 R90i = ivec4(0);
ivec4 R91i = ivec4(0);
ivec4 R92i = ivec4(0);
ivec4 R93i = ivec4(0);
ivec4 R94i = ivec4(0);
ivec4 R95i = ivec4(0);
ivec4 R96i = ivec4(0);
ivec4 R97i = ivec4(0);
ivec4 R98i = ivec4(0);
ivec4 R99i = ivec4(0);
ivec4 R100i = ivec4(0);
ivec4 R101i = ivec4(0);
ivec4 R102i = ivec4(0);
ivec4 R103i = ivec4(0);
ivec4 R104i = ivec4(0);
ivec4 R105i = ivec4(0);
ivec4 R106i = ivec4(0);
ivec4 R107i = ivec4(0);
ivec4 R108i = ivec4(0);
ivec4 R109i = ivec4(0);
ivec4 R110i = ivec4(0);
ivec4 R111i = ivec4(0);
ivec4 R112i = ivec4(0);
ivec4 R113i = ivec4(0);
ivec4 R114i = ivec4(0);
ivec4 R115i = ivec4(0);
ivec4 R116i = ivec4(0);
ivec4 R117i = ivec4(0);
ivec4 R118i = ivec4(0);
ivec4 R119i = ivec4(0);
ivec4 R120i = ivec4(0);
ivec4 R121i = 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;
bool activeMaskStack[2];
bool activeMaskStackC[3];
activeMaskStack[0] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem0 );
if( activeMaskStackC[1] == true ) {
R9i.xy = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy) ).xx);
}
if( activeMaskStackC[1] == true ) {
R1i.x = 0xbe000000;
R1i.y = 0x3e5db3c0 ; // to be tweaked later, cut off points
R0i.z = floatBitsToInt(intBitsToFloat(uf_remappedPS[0].z) * intBitsToFloat(0x3c75c28f)); //n
PV0i.z = R0i.z;
R2i.x = 0xbe800000;
PS0i = R2i.x;
// 1
R3i.x = 0x3f400000;
R2i.y = 0xbeddb3e1; // NNN
R0i.w = floatBitsToInt((intBitsToFloat(uf_remappedPS[1].w) * intBitsToFloat(0x3c75c28f) + intBitsToFloat(PV0i.z))); //n
R3i.y = 0x3f000000;
PS1i = R3i.y;
R4i.x = 0x3dff4eb9 ; // to be tweaked later, cut off points 0x3e304eb9
R5i.x = 0x3e474d45;
PS0i = R5i.x;
// 3
R6i.x = 0x3e157895; //NN
PS1i = floatBitsToInt(1.0 / intBitsToFloat(uf_remappedPS[0].x));//n
PS1i = floatBitsToInt(intBitsToFloat(PS1i) / 2.0);
// 4
R10i.x = 0x3ff7d5aa;
R123i.w = floatBitsToInt((intBitsToFloat(R0i.x) * intBitsToFloat(uf_remappedPS[0].x) + -(intBitsToFloat(PS1i))));//N
PV0i.w = R123i.w;
PS0i = floatBitsToInt(1.0 / intBitsToFloat(uf_remappedPS[0].y));
PS0i = floatBitsToInt(intBitsToFloat(PS0i) / 2.0);
// 5
R7i.x = 0x3fdda0c7;
R1i.z = floatBitsToInt((intBitsToFloat(R0i.y) * intBitsToFloat(uf_remappedPS[0].y) + -(intBitsToFloat(PS0i))));//N
R4i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 0.25*noiseScale); //NNN
R8i.x = 0x3fa95400; /// to be tweaked later, cut off points
PS1i = R8i.x;
// 6
R13i.x = R1i.x;
R13i.y = R1i.y;
// 7
R14i.x = R2i.x;
R14i.y = R2i.y;
// 8
R15i.x = R3i.x;
R15i.y = R3i.y;
// 9
R16i.x = R4i.x;
// 10
R17i.x = R5i.x;
// 11
R18i.x = R6i.x;
// 12
R19i.x = R10i.x;
// 13
R20i.x = R7i.x;
// 14
R4i.y = floatBitsToInt(intBitsToFloat(R1i.z) * 0.25*noiseScale);
}
if( activeMaskStackC[1] == true ) {
R3i.xy = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R4i.wy)).xy);// insert better noise here.. some day
}
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
R21i.x = R8i.x;
// 1
R4i.x = floatBitsToInt(-(intBitsToFloat(R3i.x))); //pos
R1i.y = R3i.y ; //Don't scale here
// 2
predResult = (intBitsToFloat(R9i.x) >= intBitsToFloat(R0i.w));
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
R0i.x = 0x3f800000;
R0i.y = 0;
}
activeMaskStack[1] = activeMaskStack[1] == false;
activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
if( activeMaskStackC[2] == true ) {
// 0
R127i.x = floatBitsToInt(intBitsToFloat(R9i.y) + 1.0);
PV0i.y = floatBitsToInt(intBitsToFloat(R9i.y) * intBitsToFloat(uf_remappedPS[2].z));//n
PV0i.z = uf_remappedPS[2].y;//n
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
R5i.x = 0;
PS0i = R5i.x;
// 1
R6i.x = PV0i.z;
PV1i.y = floatBitsToInt(max(intBitsToFloat(PV0i.y), intBitsToFloat(uf_remappedPS[2].z)));//n
R6i.y = PV0i.z;
PS1i = R6i.y;
// 2
R0i.w = floatBitsToInt(min(intBitsToFloat(PV1i.y), intBitsToFloat(0x42c80000)));
PS0i = floatBitsToInt(1.0 / intBitsToFloat(R127i.x));
// 3
PV1i.y = floatBitsToInt(intBitsToFloat(PS0i) * intBitsToFloat(uf_remappedPS[1].x));//prob
R3i.w = floatBitsToInt(intBitsToFloat(PS0i) * intBitsToFloat(uf_remappedPS[1].z)); //*4 prob
R3i.w = clampFI32(R3i.w);
// 4
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.y), intBitsToFloat(0x3cf5c28f)));
// 5
R3i.z = floatBitsToInt(min(intBitsToFloat(PV0i.z), intBitsToFloat(0x3e19999a)));
}
while( activeMaskStackC[2] == true )
{
if( activeMaskStackC[2] == true ) {
// 0
R1i.z = (0x00000003 > R5i.x)?int(0xFFFFFFFF):int(0x0);
// 1
predResult = (R1i.z != 0);
if( predResult == false ) break;
}
if( activeMaskStackC[2] == true ) {
// 0
R2i.x = R5i.x;
R1i.x = R5i.x + 0x00000006; //5?
PS0i = R1i.x;
// 1
tempResulti = R2i.x;
tempResulti = clamp(tempResulti, -256, 255);
ARi.x = tempResulti;
PV1i.x = tempResulti;
// 2
R2i.x = ((ARi.x==0)?R13i.x:(ARi.x==1)?R14i.x:(ARi.x==2)?R15i.x:(ARi.x==3)?R16i.x:(ARi.x==4)?R17i.x:(ARi.x==5)?R18i.x:(ARi.x==6)?R19i.x:(ARi.x==7)?R20i.x:(ARi.x==8)?R21i.x:(ARi.x==110)?R123i.x:(ARi.x==113)?R126i.x:(ARi.x==114)?R127i.x:0);
R2i.y = ((ARi.x==0)?R13i.y:(ARi.x==1)?R14i.y:(ARi.x==2)?R15i.y:(ARi.x==3)?R16i.y:(ARi.x==4)?R17i.y:(ARi.x==5)?R18i.y:(ARi.x==6)?R19i.y:(ARi.x==7)?R20i.y:(ARi.x==8)?R21i.y:(ARi.x==110)?R123i.y:(ARi.x==113)?R126i.y:(ARi.x==114)?R127i.y:0);
// 3
tempResulti = R1i.x;
tempResulti = clamp(tempResulti, -256, 255);
ARi.x = tempResulti;
PV1i.x = tempResulti;
// 4
R1i.x = ((ARi.x==0)?R13i.x:(ARi.x==1)?R14i.x:(ARi.x==2)?R15i.x:(ARi.x==3)?R16i.x:(ARi.x==4)?R17i.x:(ARi.x==5)?R18i.x:(ARi.x==6)?R19i.x:(ARi.x==7)?R20i.x:(ARi.x==8)?R21i.x:(ARi.x==110)?R123i.x:(ARi.x==113)?R126i.x:(ARi.x==114)?R127i.x:0);
// 5
backupReg0i = R0i.w;
PV1i.x = floatBitsToInt(intBitsToFloat(R4i.x) * intBitsToFloat(R2i.y));
PV1i.y = R1i.x;
PV1i.w = floatBitsToInt(intBitsToFloat(R1i.y) * intBitsToFloat(R2i.y));
R2i.w = floatBitsToInt(1.0 / intBitsToFloat(backupReg0i));
PS1i = R2i.w;
// 6
backupReg0i = R5i.x;
R1i.x = R5i.x + 0x00000003; // //3
R123i.y = floatBitsToInt((intBitsToFloat(R2i.x) * intBitsToFloat(R3i.x) + intBitsToFloat(PV1i.w)));
PV0i.y = R123i.y;
R123i.z = floatBitsToInt((intBitsToFloat(R2i.x) * intBitsToFloat(R3i.y) + intBitsToFloat(PV1i.x)));
PV0i.z = R123i.z;
PV0i.w = floatBitsToInt(intBitsToFloat(R3i.z) * intBitsToFloat(PV1i.y));
R5i.x = backupReg0i + int(1);
PS0i = R5i.x;
// 7
PV1i.z = PV0i.y;
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(uf_remappedPS[1].y)/AOScale);
PS1i = floatBitsToInt(1.0 / intBitsToFloat(PV0i.w));
// 8
//scale here
PV0i.x = floatBitsToInt(intBitsToFloat(R3i.z) * intBitsToFloat(PV1i.w) / AOScale);
PV0i.z = floatBitsToInt(intBitsToFloat(PS1i) * intBitsToFloat(0x40400000) * AOScale);//intensity
PV0i.w = floatBitsToInt(intBitsToFloat(R3i.z) * intBitsToFloat(PV1i.z) / AOScale); //
// 9
R2i.x = floatBitsToInt(intBitsToFloat(R0i.x) + intBitsToFloat(PV0i.x) / AOScale);
R2i.y = floatBitsToInt(intBitsToFloat(R0i.y) + intBitsToFloat(PV0i.w) / AOScale); //
R1i.z = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(PV0i.x) / AOScale));
R1i.w = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(PV0i.w) / AOScale));
R2i.z = floatBitsToInt(intBitsToFloat(R3i.w) * intBitsToFloat(PV0i.z)* AOScale);
PS1i = R2i.z;
}
if( activeMaskStackC[2] == true ) {
R2i.x = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.xy)).x);
R2i.y = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.zw)).x);
}
if( activeMaskStackC[2] == true ) {
// 0
tempResulti = R1i.x;
tempResulti = clamp(tempResulti, -256, 255);
ARi.x = tempResulti;
PV0i.x = tempResulti;
// 1
R1i.x = ((ARi.x==0)?R13i.x:(ARi.x==1)?R14i.x:(ARi.x==2)?R15i.x:(ARi.x==3)?R16i.x:(ARi.x==4)?R17i.x:(ARi.x==5)?R18i.x:(ARi.x==6)?R19i.x:(ARi.x==7)?R20i.x:(ARi.x==8)?R21i.x:(ARi.x==110)?R123i.x:(ARi.x==113)?R126i.x:(ARi.x==114)?R127i.x:0);
// 2
PV0i.y = floatBitsToInt(-(intBitsToFloat(R9i.y)) + intBitsToFloat(R2i.x));
PV0i.w = floatBitsToInt(-(intBitsToFloat(R9i.y)) + intBitsToFloat(R2i.y));
// 3
R127i.x = floatBitsToInt((intBitsToFloat(R2i.z) * intBitsToFloat(PV0i.y) + 0.5));
R127i.x = clampFI32(R127i.x);
PV1i.x = R127i.x;
R127i.y = floatBitsToInt((intBitsToFloat(R2i.z) * intBitsToFloat(PV0i.w) + 0.5));
R127i.y = clampFI32(R127i.y);
PV1i.y = R127i.y;
PV1i.z = floatBitsToInt(max(intBitsToFloat(PV0i.w), -(intBitsToFloat(PV0i.w))));
PV1i.w = floatBitsToInt(max(intBitsToFloat(PV0i.y), -(intBitsToFloat(PV0i.y))));
// 4
PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + -(intBitsToFloat(PV1i.w)));
PV0i.y = floatBitsToInt(intBitsToFloat(R0i.w) + -(intBitsToFloat(PV1i.z)));
PV0i.z = floatBitsToInt(-(intBitsToFloat(PV1i.y)) + 1.0);
PV0i.w = floatBitsToInt(-(intBitsToFloat(PV1i.x)) + 1.0);
// 5
R126i.x = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(R2i.w));
R126i.x = clampFI32(R126i.x);
PV1i.x = R126i.x;
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + -(0.5));
R127i.z = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(R2i.w));
R127i.z = clampFI32(R127i.z);
PV1i.z = R127i.z;
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.w) + -(0.5));
// 6
R126i.y = floatBitsToInt((intBitsToFloat(PV1i.y) * intBitsToFloat(PV1i.x) + 0.5));
PV0i.y = R126i.y;
R127i.w = floatBitsToInt((intBitsToFloat(PV1i.w) * intBitsToFloat(PV1i.z) + 0.5));
PV0i.w = R127i.w;
// 7
PV1i.y = floatBitsToInt(intBitsToFloat(R127i.y) + -(intBitsToFloat(PV0i.w)));
PV1i.z = floatBitsToInt(intBitsToFloat(R127i.x) + -(intBitsToFloat(PV0i.y)));
// 8
R123i.z = floatBitsToInt((intBitsToFloat(PV1i.y) * intBitsToFloat(R126i.x) + intBitsToFloat(R127i.w)));
PV0i.z = R123i.z;
R123i.w = floatBitsToInt((intBitsToFloat(PV1i.z) * intBitsToFloat(R127i.z) + intBitsToFloat(R126i.y)));
PV0i.w = R123i.w;
// 9
backupReg0i = R6i.x;
backupReg1i = R6i.y;
R6i.x = floatBitsToInt((intBitsToFloat(PV0i.w) * intBitsToFloat(R1i.x) + intBitsToFloat(backupReg0i)));
R6i.y = floatBitsToInt((intBitsToFloat(PV0i.z) * intBitsToFloat(R1i.x) + intBitsToFloat(backupReg1i)));
}
}
if( activeMaskStackC[2] == true ) {
// 0
backupReg0i = R0i.z;
PV0i.x = floatBitsToInt(intBitsToFloat(R6i.y) + -(0.5));
PV0i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * 2.0);
PV0i.x = clampFI32(PV0i.x);
PV0i.y = floatBitsToInt(intBitsToFloat(R6i.x) + -(0.5));
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) * 2.0);
PV0i.y = clampFI32(PV0i.y);
PV0i.z = floatBitsToInt(-(intBitsToFloat(backupReg0i)) + intBitsToFloat(R9i.y));
// 1
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(uf_remappedPS[3].x) ); //nope
PV1i.y = clampFI32(PV1i.y);
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(PV0i.x));
PV1i.w = clampFI32(PV1i.w);
// 2
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(PV1i.y));
PV0i.x = clampFI32(PV0i.x);
// 3
tempResultf = log2(intBitsToFloat(PV0i.x));
if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F;
PS1i = floatBitsToInt(tempResultf);
// 4
PV0i.z = floatBitsToInt(intBitsToFloat(PS1i) * intBitsToFloat(uf_remappedPS[2].w)); //nope
// 5
R0i.y = 0;
R0i.x = floatBitsToInt(exp2(intBitsToFloat(PV0i.z)));
PS1i = R0i.x;
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
// export
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.y), intBitsToFloat(R0i.y));
//passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.y), intBitsToFloat(R0i.y));
}

View File

@ -1,60 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader 9ae7833e513d2c25 // bloom sampling scale
const float resScale = ($height/$gameHeight);
uniform ivec4 uf_remappedPS[1];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4f4c800 res 80x46x1 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(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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
// 0
backupReg0f = R0f.y;
backupReg1f = R0f.z;
PV0f.y = backupReg0f + -(intBitsToFloat(uf_remappedPS[0].x)/ resScale);
PV0f.z = R0f.x + -(intBitsToFloat(uf_remappedPS[0].x)/ resScale);
PV0f.w = backupReg1f + -(intBitsToFloat(uf_remappedPS[0].x)/ resScale);
R1f.w = 1.0;
PS0f = R1f.w;
// 1
PV1f.x = max(PV0f.z, 0.0);
PV1f.y = max(PV0f.y, 0.0);
PV1f.z = max(PV0f.w, 0.0);
// 2
tempf.x = dot(vec4(intBitsToFloat(uf_remappedPS[0].y)/resScale,intBitsToFloat(uf_remappedPS[0].y) / resScale,intBitsToFloat(uf_remappedPS[0].y) / resScale,-0.0),vec4(PV1f.x,PV1f.y,PV1f.z,0.0));
PV0f.x = tempf.x;
PV0f.y = tempf.x;
PV0f.z = tempf.x;
PV0f.w = tempf.x;
// 3
R1f.x = R0f.x * PV0f.x;
R1f.y = R0f.y * PV0f.x;
R1f.z = R0f.z * PV0f.x;
// export
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
}

View File

@ -2,8 +2,9 @@
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable #extension GL_ARB_shading_language_packing : enable
const float resXScale = ($width/$gameWidth);
const float resYScale = ($height/$gameHeight);
// shader 9dc2d340255dee89 // shader 9dc2d340255dee89
//align bloom 1
uniform ivec4 uf_remappedVS[1]; uniform ivec4 uf_remappedVS[1];
uniform vec2 uf_windowSpaceToClipSpaceTransform; uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(location = 0) in uvec4 attrDataSem0; layout(location = 0) in uvec4 attrDataSem0;
@ -22,7 +23,7 @@ else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0); return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.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; } float mul_nonIEEE(float a, float b){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main() void main()
{ {
vec4 R1f = vec4(0.0); vec4 R1f = vec4(0.0);
@ -50,10 +51,10 @@ R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)
// 0 // 0
backupReg0f = R2f.x; backupReg0f = R2f.x;
backupReg1f = R2f.y; backupReg1f = R2f.y;
R2f.x = (mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedVS[0].x)));// +intBitsToFloat(uf_remappedVS[0].z) / 8); R2f.x = (backupReg0f * intBitsToFloat(uf_remappedVS[0].x) + intBitsToFloat(uf_remappedVS[0].z) /resXScale);
R2f.y = (mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedVS[0].y)));// +intBitsToFloat(uf_remappedVS[0].w) / 8); R2f.y = (backupReg1f * intBitsToFloat(uf_remappedVS[0].y) + intBitsToFloat(uf_remappedVS[0].w) /resXScale);
// export // export
gl_Position = vec4(R1f.x*(1.0/1.006), R1f.y*(1.0/1.006), R1f.z, R1f.w); gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
// export // export
passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.z); passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.z);
// 0 // 0

View File

@ -0,0 +1,133 @@
#version 420
#extension GL_ARB_texture_gather : enable
// shader b253dca415790207
// motion blur alpha
const float resScale = 2.0;
//const float resScale = 3;
uniform ivec4 uf_remappedPS[5];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4e12000 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: 0
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){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main()
{
vec4 R0f = vec4(0.0);
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
vec4 R3f = vec4(0.0);
vec4 R4f = vec4(0.0);
vec4 R5f = vec4(0.0);
vec4 R123f = vec4(0.0);
vec4 R126f = vec4(0.0);
vec4 R127f = vec4(0.0);
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
float PS0f = 0.0, PS1f = 0.0;
vec4 tempf = vec4(0.0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameterSem0;
// 0
R1f.x = R0f.x + intBitsToFloat(uf_remappedPS[0].x)/ resScale;
R1f.y = R0f.y + intBitsToFloat(uf_remappedPS[0].y)/ resScale;
R0f.z = R0f.x + intBitsToFloat(uf_remappedPS[1].x)/ resScale;
R0f.w = R0f.y + intBitsToFloat(uf_remappedPS[1].y)/ resScale;
R5f.w = 1.0;
PS0f = R5f.w;
// 1
R2f.x = R0f.x + intBitsToFloat(uf_remappedPS[2].x)/ resScale;
R2f.y = R0f.y + intBitsToFloat(uf_remappedPS[2].y)/ resScale;
R1f.z = R0f.x + intBitsToFloat(uf_remappedPS[3].x)/ resScale;
R1f.w = R0f.y + intBitsToFloat(uf_remappedPS[3].y)/ resScale;
// 2
backupReg0f = R0f.x;
backupReg1f = R0f.y;
R0f.x = backupReg0f + intBitsToFloat(uf_remappedPS[4].x)/ resScale;
R0f.y = backupReg1f + intBitsToFloat(uf_remappedPS[4].y)/resScale;
R3f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R4f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);
R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz);
R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
// 0
PV0f.x = R3f.y + -(0.5);
PV0f.x *= 2.0;
PV0f.y = R3f.x + -(0.5);
PV0f.y *= 2.0;
R127f.z = R4f.x + -(0.5);
R127f.z *= 2.0;
R127f.w = R4f.y + -(0.5);
R127f.w *= 2.0;
PS0f = R3f.z * intBitsToFloat(uf_remappedPS[0].z);
// 1
R123f.x = (R4f.z * intBitsToFloat(uf_remappedPS[1].z) + PS0f);
PV1f.x = R123f.x;
R127f.y = R2f.x + -(0.5);
R127f.y *= 2.0;
PV1f.z = PV0f.y * intBitsToFloat(uf_remappedPS[0].z);
PV1f.w = PV0f.x * intBitsToFloat(uf_remappedPS[0].z);
R126f.z = R2f.y + -(0.5);
R126f.z *= 2.0;
PS1f = R126f.z;
// 2
R123f.x = (R127f.z * intBitsToFloat(uf_remappedPS[1].z) + PV1f.z);
PV0f.x = R123f.x;
R126f.y = R1f.x + -(0.5);
R126f.y *= 2.0;
R123f.z = (R127f.w * intBitsToFloat(uf_remappedPS[1].z) + PV1f.w);
PV0f.z = R123f.z;
R123f.w = (R2f.z * intBitsToFloat(uf_remappedPS[2].z) + PV1f.x);
PV0f.w = R123f.w;
R127f.w = R1f.y + -(0.5);
R127f.w *= 2.0;
PS0f = R127f.w;
// 3
R123f.x = (R126f.z * intBitsToFloat(uf_remappedPS[2].z) + PV0f.z);
PV1f.x = R123f.x;
R123f.y = (R127f.y * intBitsToFloat(uf_remappedPS[2].z) + PV0f.x);
PV1f.y = R123f.y;
R126f.z = R0f.x + -(0.5);
R126f.z *= 2.0;
R123f.w = (R1f.z * intBitsToFloat(uf_remappedPS[3].z) + PV0f.w);
PV1f.w = R123f.w;
R126f.w = R0f.y + -(0.5);
R126f.w *= 2.0;
PS1f = R126f.w;
// 4
R123f.x = (R0f.z * intBitsToFloat(uf_remappedPS[4].z) + PV1f.w);
PV0f.x = R123f.x;
R123f.y = (R126f.y * intBitsToFloat(uf_remappedPS[3].z) + PV1f.y);
PV0f.y = R123f.y;
R123f.z = (R127f.w * intBitsToFloat(uf_remappedPS[3].z) + PV1f.x);
PV0f.z = R123f.z;
// 5
R123f.y = (R126f.w * intBitsToFloat(uf_remappedPS[4].z) + PV0f.z);
PV1f.y = R123f.y;
R123f.z = (R126f.z * intBitsToFloat(uf_remappedPS[4].z) + PV0f.y);
PV1f.z = R123f.z;
R5f.z = PV0f.x;
PS1f = R5f.z;
// 6
R5f.x = PV1f.z + 1.0;
R5f.x /= 2.0;
R5f.y = PV1f.y + 1.0;
R5f.y /= 2.0;
// export
passPixelColor0 = vec4(R5f.x, R5f.y, R5f.z, R5f.w);
}

View File

@ -0,0 +1,276 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader ed70de7fe7542f87
//motion blur sample spread scaling
const float resScale = 2.0;
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf470a000 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 0xf4e12000 res 320x180x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
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 R9i = ivec4(0);
ivec4 R10i = ivec4(0);
ivec4 R11i = ivec4(0);
ivec4 R12i = ivec4(0);
ivec4 R13i = ivec4(0);
ivec4 R14i = ivec4(0);
ivec4 R15i = ivec4(0);
int backupReg0i, backupReg1i, backupReg2i, backupReg3i, backupReg4i;
ivec4 PV0i = ivec4(0), PV1i = ivec4(0);
int PS0i = 0, PS1i = 0;
ivec4 tempi = ivec4(0);
float tempResultf;
int tempResulti;
ivec4 ARi = ivec4(0);
bool predResult = true;
bool activeMaskStack[2];
bool activeMaskStackC[3];
activeMaskStack[0] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem0);
R1i = floatBitsToInt(passParameterSem1);
if( activeMaskStackC[1] == true ) {
R12i.xyzw = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xy)).xyzw);
}
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
PV0i.x = floatBitsToInt(intBitsToFloat(R12i.y) + -(0.5));
PV0i.x = floatBitsToInt(intBitsToFloat(PV0i.x) * 2.0);
PV0i.y = floatBitsToInt(intBitsToFloat(R12i.x) + -(0.5));
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) * 2.0);
R0i.z = ((0.0 >= intBitsToFloat(R12i.z))?int(0xFFFFFFFF):int(0x0));
// 1
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(0xbd4ccccd)/resScale);
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.y) * intBitsToFloat(0x3d4ccccd)/resScale);
// 2
R12i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R12i.w), intBitsToFloat(PV1i.w)));
R12i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R12i.w), intBitsToFloat(PV1i.z)));
// 3
predResult = (R0i.z == 0);
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
R1i.x = floatBitsToInt(intBitsToFloat(R0i.x) + -(intBitsToFloat(R12i.x)));
PV0i.x = R1i.x;
R1i.y = floatBitsToInt(intBitsToFloat(R0i.y) + -(intBitsToFloat(R12i.y)));
PV0i.y = R1i.y;
// 1
R2i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV0i.x));
PV1i.x = R2i.x;
R2i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV0i.y));
PV1i.y = R2i.y;
// 2
R3i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV1i.x));
PV0i.x = R3i.x;
R3i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV1i.y));
PV0i.y = R3i.y;
// 3
R4i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV0i.x));
PV1i.x = R4i.x;
R4i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV0i.y));
PV1i.y = R4i.y;
// 4
R5i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV1i.x));
PV0i.x = R5i.x;
R5i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV1i.y));
PV0i.y = R5i.y;
// 5
R6i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV0i.x));
PV1i.x = R6i.x;
R6i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV0i.y));
PV1i.y = R6i.y;
// 6
R7i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV1i.x));
PV0i.x = R7i.x;
R7i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV1i.y));
PV0i.y = R7i.y;
// 7
R15i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV0i.x));
PV1i.x = R15i.x;
R15i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV0i.y));
PV1i.y = R15i.y;
// 8
R11i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV1i.x));
PV0i.x = R11i.x;
R11i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV1i.y));
PV0i.y = R11i.y;
// 9
R10i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV0i.x));
PV1i.x = R10i.x;
R10i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV0i.y));
PV1i.y = R10i.y;
// 10
R9i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV1i.x));
PV0i.x = R9i.x;
R9i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV1i.y));
PV0i.y = R9i.y;
// 11
R8i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV0i.x));
PV1i.x = R8i.x;
R8i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV0i.y));
PV1i.y = R8i.y;
// 12
R14i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV1i.x));
PV0i.x = R14i.x;
R14i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV1i.y));
PV0i.y = R14i.y;
// 13
R13i.x = floatBitsToInt(-(intBitsToFloat(R12i.x)) + intBitsToFloat(PV0i.x));
PV1i.x = R13i.x;
R13i.y = floatBitsToInt(-(intBitsToFloat(R12i.y)) + intBitsToFloat(PV0i.y));
PV1i.y = R13i.y;
// 14
backupReg0i = R12i.x;
backupReg1i = R12i.y;
R12i.x = floatBitsToInt(-(intBitsToFloat(backupReg0i)) + intBitsToFloat(PV1i.x));
R12i.y = floatBitsToInt(-(intBitsToFloat(backupReg1i)) + intBitsToFloat(PV1i.y));
}
if( activeMaskStackC[2] == true ) {
R1i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R1i.xy)).xyz);
R0i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).xyz);
R2i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R2i.xy)).xyz);
R3i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R3i.xy)).xyz);
R4i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R4i.xy)).xyz);
R5i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R5i.xy)).xyz);
R6i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R6i.xy)).xyz);
R7i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R7i.xy)).xyz);
}
if( activeMaskStackC[2] == true ) {
// 0
backupReg0i = R0i.y;
backupReg1i = R0i.x;
PV0i.x = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(R1i.z));
PV0i.y = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(R1i.y));
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(R1i.x));
// 1
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(R2i.z));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(R2i.y));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R2i.x));
// 2
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R3i.x));
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R3i.z));
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(R3i.y));
// 3
backupReg0i = R4i.x;
R4i.x = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R4i.y));
R4i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(backupReg0i));
R0i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R4i.z));
}
if( activeMaskStackC[2] == true ) {
R3i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R15i.xy)).xyz);
R2i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R11i.xy)).xyz);
R0i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R10i.xy)).xyz);
R1i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R9i.xy)).xyz);
R8i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R8i.xy)).xyz);
R9i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R14i.xy)).xyz);
R10i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R13i.xy)).xyz);
R11i.xyz = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R12i.xy)).xyz);
}
if( activeMaskStackC[2] == true ) {
// 0
PV0i.x = floatBitsToInt(intBitsToFloat(R0i.w) + intBitsToFloat(R5i.z));
PV0i.y = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R5i.y));
PV0i.z = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R5i.x));
// 1
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(R6i.z));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(R6i.y));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R6i.x));
// 2
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R7i.x));
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R7i.z));
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(R7i.y));
// 3
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R3i.y));
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(R3i.x));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R3i.z));
// 4
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R2i.z));
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R2i.y));
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R2i.x));
// 5
backupReg0i = R0i.y;
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(R0i.z));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(backupReg0i));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R0i.x));
// 6
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R1i.x));
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R1i.z));
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(R1i.y));
// 7
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R8i.y));
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(R8i.x));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R8i.z));
// 8
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R9i.z));
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R9i.y));
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R9i.x));
// 9
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(R10i.z));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(R10i.y));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R10i.x));
// 10
PV0i.x = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(R11i.x));
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.y) + intBitsToFloat(R11i.z));
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.z) + intBitsToFloat(R11i.y));
// 11
PV1i.x = floatBitsToInt(intBitsToFloat(PV0i.w) * intBitsToFloat(0x3d800000));
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(0x3d800000));
PV1i.w = floatBitsToInt(intBitsToFloat(PV0i.z) * intBitsToFloat(0x3d800000));
// 12
PV0i.x = floatBitsToInt(max(intBitsToFloat(PV1i.w), 0.0));
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.x), 0.0));
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.y), 0.0));
// 13
R0i.x = floatBitsToInt(min(intBitsToFloat(PV0i.z), intBitsToFloat(0x41000000)));
R0i.y = floatBitsToInt(min(intBitsToFloat(PV0i.y), intBitsToFloat(0x41000000)));
R0i.z = floatBitsToInt(min(intBitsToFloat(PV0i.x), intBitsToFloat(0x41000000)));
R0i.w = R12i.z;
}
activeMaskStack[1] = activeMaskStack[1] == false;
activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
if( activeMaskStackC[2] == true ) {
// 0
R0i.xyz = ivec3(0,0,0);
R0i.w = 0;
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
// export
passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y), intBitsToFloat(R0i.z), intBitsToFloat(R0i.w));
}

View File

@ -4,8 +4,11 @@
// shader af7acf7fb6dca1be // shader af7acf7fb6dca1be
//cutscene shadow scaling //cutscene shadow scaling
//to do - extra edge smooth pass, //to do - extra edge smooth pass,
const float resScaleDetail = ($width/$gameWidth);
const float resScale = ($height/$gameHeight); const float resScale = ($height/$gameHeight);
const float resScaleDetail = ($height/$gameHeight)*0.75; //const float resScaleDetail = 2.0;
//const float resScale = 3.0;
const float shadowExposure = 0.85; //By truncating shadow, we decrease overall exposure during day only. const float shadowExposure = 0.85; //By truncating shadow, we decrease overall exposure during day only.
uniform ivec4 uf_remappedPS[31]; uniform ivec4 uf_remappedPS[31];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0

View File

@ -1,17 +1,35 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
// shader b3fb199c73caa796 // bloom pyramid sample 1st #extension GL_ARB_separate_shader_objects : enable
const float resScale = ($height/$gameHeight); // shader b3fb199c73caa796
//const float resScale = ($height/$gameHeight); //BB title
const float dither = $dither ;
const float scaleShader = $scaleShader;
const float scaleBlur = $scaleBlur;
const int sampleScale = 4;
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);
}
uniform ivec4 uf_remappedPS[4]; uniform ivec4 uf_remappedPS[4];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf551a000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf551a000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0 layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0; layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0; layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale; uniform vec2 uf_fragCoordScale;
const int samples = 8, //check if must scale to pascal levels 8 balances 13 is smooth.
// 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 LOD = 2, // gaussian done on MIPmap at scale LOD
sLOD = 1 << LOD; // tile size = 2^LOD sLOD = 1 << LOD; // tile size = 2^LOD
const float sigma = float(samples) * .25; const float sigma = float(samples) * .25;
@ -68,46 +86,43 @@ bool predResult = true;
vec3 cubeMapSTM; vec3 cubeMapSTM;
int cubeMapFaceId; int cubeMapFaceId;
R0f = passParameterSem0; R0f = passParameterSem0;
R0f.xy = R0f.xy - (lineRand(gl_FragCoord.xy)*0.0012 *dither);
R0f.xy = R0f.xy + (lineRand(gl_FragCoord.xy*vec2(0.1, 0.09))*0.0011 *dither);
// 0 // 0
R1f.x = R0f.x + intBitsToFloat(uf_remappedPS[0].x)/resScale; R1f.x = R0f.x + intBitsToFloat(uf_remappedPS[0].x);
R1f.y = R0f.y + intBitsToFloat(uf_remappedPS[0].y)/resScale; R1f.y = R0f.y + intBitsToFloat(uf_remappedPS[0].y);
R0f.z = R0f.x + intBitsToFloat(uf_remappedPS[0].z)/resScale; R0f.z = R0f.x + intBitsToFloat(uf_remappedPS[0].z);
R0f.w = R0f.y + intBitsToFloat(uf_remappedPS[0].w)/resScale; R0f.w = R0f.y + intBitsToFloat(uf_remappedPS[0].w);
// 1 // 1
backupReg0f = R0f.x; backupReg0f = R0f.x;
backupReg1f = R0f.y; backupReg1f = R0f.y;
backupReg0f = R0f.x; backupReg0f = R0f.x;
backupReg1f = R0f.y; backupReg1f = R0f.y;
R0f.x = backupReg0f + intBitsToFloat(uf_remappedPS[1].x)/resScale; R0f.x = backupReg0f + intBitsToFloat(uf_remappedPS[1].x);
R0f.y = backupReg1f + intBitsToFloat(uf_remappedPS[1].y) /resScale; R0f.y = backupReg1f + intBitsToFloat(uf_remappedPS[1].y);
R1f.z = backupReg0f + intBitsToFloat(uf_remappedPS[1].z) /resScale; R1f.z = backupReg0f + intBitsToFloat(uf_remappedPS[1].z);
R1f.w = backupReg1f + intBitsToFloat(uf_remappedPS[1].w) /resScale; R1f.w = backupReg1f + intBitsToFloat(uf_remappedPS[1].w);
vec2 coord = passParameterSem0.xy*textureSize(textureUnitPS0, 0); // R0f.xy;// vec2(0.5, 0.5);
vec2 coord = passParameterSem0.xy*textureSize(textureUnitPS0, 0); //
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0); vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0);
vec2 uv = coord * ps; vec2 uv = coord * ps;
R2f.xyzw = blur(textureUnitPS1, uv, ps);
R3f = R2f;
R4f = R2f;
R5f = R2f;
/*
R2f.xyzw = (texture(textureUnitPS1, R1f.xy).xyzw); R2f.xyzw = (texture(textureUnitPS1, R1f.xy).xyzw);
R3f.xyzw = (texture(textureUnitPS1, R0f.zw).xyzw); R3f.xyzw = (texture(textureUnitPS1, R0f.zw).xyzw);
R4f.xyzw = (texture(textureUnitPS1, R0f.xy).xyzw); R4f.xyzw = (texture(textureUnitPS1, R0f.xy).xyzw);
R5f.xyzw = (texture(textureUnitPS1, R1f.zw).xyzw); R5f.xyzw = (texture(textureUnitPS1, R1f.zw).xyzw);
*/
//R1f.xyzw = blur(textureUnitPS0, uv, ps); R6f.xyz = blur(textureUnitPS0, R1f.xy, ps*scaleBlur).xyz; //1.0 4k //.66 2k //0.075 1k
//R7f = R6f; R7f.xyz = R6f.xyz;
//R0f = R6f; R0f.xyz = R6f.xyz;
//R1f = R6f; R1f.xyz = R6f.xyz;
/*
R6f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw); R6f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
R7f.xyzw = (texture(textureUnitPS0, R0f.zw).xyzw); R7f.xyzw = (texture(textureUnitPS0, R0f.zw).xyzw);
R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw); R0f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
R1f.xyzw = (texture(textureUnitPS0, R1f.zw).xyzw); R1f.xyzw = (texture(textureUnitPS0, R1f.zw).xyzw);
*/
// 0 // 0
PV0f.x = R2f.z + R3f.z; PV0f.x = R2f.z + R3f.z;
PV0f.y = R2f.y + R3f.y; PV0f.y = R2f.y + R3f.y;
@ -226,5 +241,5 @@ R0f.y = max(R126f.y, PV0f.z);
R0f.z = max(R125f.x, PV0f.y); R0f.z = max(R125f.x, PV0f.y);
R0f.w = max(R127f.w, PV0f.x); R0f.w = max(R127f.w, PV0f.x);
// export // export
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w)*1.5; passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w)*0.33; //.25 4k
} }

View File

@ -1,275 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader b77e14af90eec1bd
//skell view separate AA fix
const float resScale = ($height/$gameHeight);
uniform ivec4 uf_remappedPS[3];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5f0a000 res 640x360x1 dim 1 tm: 4 format 080e compSel: 0 4 4 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 0xf470a000 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
layout(location = 2) in vec4 passParameterSem2;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
ivec4 R0i = ivec4(0);
ivec4 R1i = ivec4(0);
ivec4 R2i = ivec4(0);
ivec4 R3i = ivec4(0);
ivec4 R4i = ivec4(0);
ivec4 R5i = ivec4(0);
ivec4 R6i = ivec4(0);
ivec4 R7i = ivec4(0);
ivec4 R123i = 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;
bool activeMaskStack[2];
bool activeMaskStackC[3];
activeMaskStack[0] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem0);
R1i = floatBitsToInt(passParameterSem1);
R2i = floatBitsToInt(passParameterSem2);
if( activeMaskStackC[1] == true ) {
R3i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.zy)).xyz);
R4i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xy)).xyz);
R5i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xw)).xyz);
R1i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.zw)).xyz);
R6i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R2i.xy)).xyz);
R7i.x = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).x);
}
if( activeMaskStackC[1] == true ) {
// 0
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R3i.x),intBitsToFloat(R3i.y),intBitsToFloat(R3i.z),-0.0),vec4(intBitsToFloat(0x3e991687)/resScale,intBitsToFloat(0x3f1645a2)/resScale,intBitsToFloat(0x3de978d5)/resScale,0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
R127i.w = tempi.x;
R127i.z = 0;
PS0i = R127i.z;
// 1
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R4i.x),intBitsToFloat(R4i.y),intBitsToFloat(R4i.z),-0.0),vec4(intBitsToFloat(0x3e991687)/resScale,intBitsToFloat(0x3f1645a2)/resScale,intBitsToFloat(0x3de978d5)/resScale,0.0)));
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
R126i.w = tempi.x;
PS1i = floatBitsToInt(intBitsToFloat(R5i.z) * intBitsToFloat(0x3de978d5)/resScale);
// 2
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(PS1i),-0.0),vec4(intBitsToFloat(0x3e991687)/resScale,intBitsToFloat(0x3f1645a2)/resScale,1.0,0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
R127i.y = tempi.x;
R127i.x = floatBitsToInt(intBitsToFloat(R127i.w) + intBitsToFloat(0x3b2aaaab)/resScale);
PS0i = R127i.x;
// 3
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R1i.x),intBitsToFloat(R1i.y),intBitsToFloat(R1i.z),-0.0),vec4(intBitsToFloat(0x3e991687)/resScale,intBitsToFloat(0x3f1645a2)/resScale,intBitsToFloat(0x3de978d5)/resScale,0.0)));
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
R126i.z = tempi.x;
R126i.y = floatBitsToInt(min(intBitsToFloat(R126i.w), intBitsToFloat(PV0i.x)));
PS1i = R126i.y;
// 4
R126i.x = floatBitsToInt(dot(vec4(intBitsToFloat(R127i.x),intBitsToFloat(R127i.y),intBitsToFloat(PV1i.x),intBitsToFloat(R126i.w)),vec4(-(1.0),1.0,1.0,-(1.0))));
PV0i.x = R126i.x;
PV0i.y = R126i.x;
PV0i.z = R126i.x;
PV0i.w = R126i.x;
R125i.x = floatBitsToInt(min(intBitsToFloat(R127i.x), intBitsToFloat(PV1i.x)));
PS0i = R125i.x;
// 5
backupReg0i = R127i.y;
backupReg1i = R126i.w;
backupReg0i = R127i.y;
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R127i.x),intBitsToFloat(backupReg0i),intBitsToFloat(R126i.z),intBitsToFloat(R126i.w)),vec4(-(1.0),1.0,-(1.0),1.0)));
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
R127i.y = tempi.x;
R126i.w = floatBitsToInt(max(intBitsToFloat(backupReg1i), intBitsToFloat(backupReg0i)));
PS1i = R126i.w;
// 6
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R126i.x),intBitsToFloat(PV1i.x),intBitsToFloat(R127i.z),-0.0),vec4(intBitsToFloat(R126i.x),intBitsToFloat(PV1i.x),intBitsToFloat(R127i.z),0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
R127i.z = floatBitsToInt(max(intBitsToFloat(R127i.x), intBitsToFloat(R126i.z)));
PS0i = R127i.z;
// 7
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R6i.x),intBitsToFloat(R6i.y),intBitsToFloat(R6i.z),-0.0),vec4(intBitsToFloat(0x3e991687),intBitsToFloat(0x3f1645a2),intBitsToFloat(0x3de978d5),0.0)));
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
R126i.z = tempi.x;
tempResultf = 1.0 / sqrt(intBitsToFloat(PV0i.x));
PS1i = floatBitsToInt(tempResultf);
// 8
R0i.y = floatBitsToInt(max(intBitsToFloat(R126i.w), intBitsToFloat(R127i.z)));
PV0i.y = R0i.y;
R125i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R126i.x), intBitsToFloat(PS1i)));
PV0i.z = R125i.z;
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R127i.y), intBitsToFloat(PS1i)));
PV0i.w = R126i.w;
R0i.w = floatBitsToInt(min(intBitsToFloat(R126i.y), intBitsToFloat(R125i.x)));
PS0i = R0i.w;
// 9
PV1i.x = floatBitsToInt(max(intBitsToFloat(PV0i.w), -(intBitsToFloat(PV0i.w))));
PV1i.y = floatBitsToInt(max(intBitsToFloat(PV0i.z), -(intBitsToFloat(PV0i.z))));
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_remappedPS[0].x)/resScale));
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_remappedPS[0].y)/resScale));
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_remappedPS[1].x)/resScale));
PS1i = R127i.z;
// 10
R1i.x = floatBitsToInt(intBitsToFloat(R2i.x) + -(intBitsToFloat(PV1i.z)));
R1i.y = floatBitsToInt(intBitsToFloat(R2i.y) + -(intBitsToFloat(PV1i.w)));
R5i.z = floatBitsToInt(intBitsToFloat(R2i.x) + intBitsToFloat(PV1i.z));
PV0i.w = floatBitsToInt(min(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.x)));
R5i.y = floatBitsToInt(intBitsToFloat(R2i.y) + intBitsToFloat(PV1i.w));
PS0i = R5i.y;
// 11
backupReg0i = R0i.y;
PV1i.y = floatBitsToInt(min(intBitsToFloat(R126i.z), intBitsToFloat(R0i.w)));
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.w), intBitsToFloat(uf_remappedPS[1].z)));
PV1i.w = floatBitsToInt(max(intBitsToFloat(R126i.z), intBitsToFloat(backupReg0i)));
R3i.y = floatBitsToInt(max(intBitsToFloat(R127i.z), intBitsToFloat(uf_remappedPS[1].y)));
PS1i = R3i.y;
// 12
R0i.x = floatBitsToInt(-(intBitsToFloat(PV1i.y)) + intBitsToFloat(PV1i.w));
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.z));
// 13
PV1i.x = floatBitsToInt(intBitsToFloat(R125i.z) * intBitsToFloat(PS0i));
PV1i.w = floatBitsToInt(intBitsToFloat(R126i.w) * intBitsToFloat(PS0i));
// 14
PV0i.y = floatBitsToInt(max(intBitsToFloat(PV1i.w), intBitsToFloat(0xc0000000)/resScale));
PV0i.z = floatBitsToInt(max(intBitsToFloat(PV1i.x), intBitsToFloat(0xc0000000)/resScale));
// 15
PV1i.x = floatBitsToInt(min(intBitsToFloat(PV0i.z), 2.0));
PV1i.w = floatBitsToInt(min(intBitsToFloat(PV0i.y), 2.0));
// 16
PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.x), intBitsToFloat(uf_remappedPS[0].z)/resScale));
PV0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.w), intBitsToFloat(uf_remappedPS[0].w)/resScale));
// 17
backupReg0i = R2i.x;
backupReg1i = R2i.y;
backupReg0i = R2i.x;
backupReg1i = R2i.y;
R2i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + -(intBitsToFloat(PV0i.z)));
R2i.y = floatBitsToInt(intBitsToFloat(backupReg1i) + -(intBitsToFloat(PV0i.w)));
R1i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(PV0i.z));
R1i.w = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(PV0i.w));
}
if( activeMaskStackC[1] == true ) {
R4i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.xy)).xyz);
R5i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R5i.zy)).xyz);
R2i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R2i.xy)).xyz);
R1i.xyz = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R1i.zw)).xyz);
}
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
backupReg0i = R0i.x;
predResult = (intBitsToFloat(R3i.y) > intBitsToFloat(backupReg0i));
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
R6i.w = 0x3f800000;
}
activeMaskStack[1] = activeMaskStack[1] == false;
activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
if( activeMaskStackC[2] == true ) {
// 0
R127i.x = floatBitsToInt(intBitsToFloat(R2i.z) + intBitsToFloat(R1i.z));
PV0i.y = floatBitsToInt(intBitsToFloat(R2i.y) + intBitsToFloat(R1i.y));
PV0i.z = floatBitsToInt(intBitsToFloat(R2i.x) + intBitsToFloat(R1i.x));
// 1
PV1i.x = floatBitsToInt(intBitsToFloat(R4i.y) + intBitsToFloat(R5i.y));
PV1i.y = floatBitsToInt(intBitsToFloat(R4i.x) + intBitsToFloat(R5i.x));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) * 0.25);
R127i.w = floatBitsToInt(intBitsToFloat(R4i.z) + intBitsToFloat(R5i.z));
PS1i = floatBitsToInt(intBitsToFloat(PV0i.z) * 0.25);
// 2
backupReg0i = R127i.x;
R127i.x = floatBitsToInt((intBitsToFloat(PV1i.y) * 0.25 + intBitsToFloat(PS1i)));
PV0i.y = floatBitsToInt(intBitsToFloat(backupReg0i) * 0.25);
R127i.z = PV1i.y;
R127i.z = floatBitsToInt(intBitsToFloat(R127i.z) / 2.0);
R126i.w = floatBitsToInt((intBitsToFloat(PV1i.x) * 0.25 + intBitsToFloat(PV1i.z)));
PV0i.w = R126i.w;
R127i.y = PV1i.x;
R127i.y = floatBitsToInt(intBitsToFloat(R127i.y) / 2.0);
PS0i = R127i.y;
// 3
backupReg0i = R127i.w;
PV1i.x = ((intBitsToFloat(PV0i.w) > intBitsToFloat(R0i.y))?int(0xFFFFFFFF):int(0x0));
PV1i.y = ((intBitsToFloat(R0i.w) > intBitsToFloat(PV0i.w))?int(0xFFFFFFFF):int(0x0));
R126i.z = floatBitsToInt((intBitsToFloat(R127i.w) * 0.25 + intBitsToFloat(PV0i.y)));
R127i.w = backupReg0i;
R127i.w = floatBitsToInt(intBitsToFloat(R127i.w) / 2.0);
// 4
R123i.w = ((PV1i.y == 0)?(PV1i.x):(int(-1)));
PV0i.w = R123i.w;
// 5
R6i.x = ((PV0i.w == 0)?(R127i.x):(R127i.z));
R6i.y = ((PV0i.w == 0)?(R126i.w):(R127i.y));
R6i.z = ((PV0i.w == 0)?(R126i.z):(R127i.w));
R6i.w = 0x3f800000;
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
if( activeMaskStackC[1] == true ) {
// 0
PV0i.w = floatBitsToInt(-(intBitsToFloat(R7i.x)));
PV0i.w = floatBitsToInt(intBitsToFloat(PV0i.w) * 2.0);
// 1
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV0i.w),intBitsToFloat(uf_remappedPS[2].y)) + intBitsToFloat(uf_remappedPS[2].z)));
PV1i.z = R123i.z;
PS1i = floatBitsToInt(1.0 / -(intBitsToFloat(PV0i.w)));
// 2
R0i.x = floatBitsToInt(intBitsToFloat(PV1i.z) * intBitsToFloat(PS1i));
}
// export
passPixelColor0 = vec4(intBitsToFloat(R6i.x), intBitsToFloat(R6i.y), intBitsToFloat(R6i.z), intBitsToFloat(R6i.w));
// export
gl_FragDepth = vec4(intBitsToFloat(R0i.x), 0, 0, 0).x;
}

View File

@ -1,343 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
// shader ba19276703190072
//point light scaling v2,
const float resScale = ($height/$gameHeight);
uniform ivec4 uf_remappedPS[11];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf5196000 res 1280x720x1 dim 1 tm: 4 format 0810 compSel: 0 1 4 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 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(binding = 2) uniform sampler2DShadow textureUnitPS2;// Tex2 addr 0xf551a000 res 512x512x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler2 ClampX/Y/Z: 6 6 6 border: 2
layout(location = 0) in vec4 passParameterSem0;
layout(location = 1) in vec4 passParameterSem1;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
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 R122i = ivec4(0);
ivec4 R123i = 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;
bool activeMaskStack[2];
bool activeMaskStackC[3];
activeMaskStack[0] = false;
activeMaskStackC[0] = false;
activeMaskStackC[1] = false;
activeMaskStack[0] = true;
activeMaskStackC[0] = true;
activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0i = floatBitsToInt(passParameterSem0);
R1i = floatBitsToInt(passParameterSem1);
if( activeMaskStackC[1] == true ) {
R2i.xyzw = floatBitsToInt(texture(textureUnitPS1, intBitsToFloat(R0i.xy)).xyzw);
}
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R2i.x),intBitsToFloat(R2i.y),intBitsToFloat(R2i.z),-0.0),vec4(intBitsToFloat(0xbe000000),intBitsToFloat(0xc1ff0000),intBitsToFloat(0xc5fe0100),0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
R127i.w = tempi.x;
PS0i = floatBitsToInt(1.0 / intBitsToFloat(R1i.z));
// 1
PV1i.y = floatBitsToInt(intBitsToFloat(PV0i.x) * intBitsToFloat(PS0i));
R0i.z = floatBitsToInt(intBitsToFloat(R2i.w) * intBitsToFloat(0x42c80000));
// 2
backupReg0i = R1i.x;
backupReg1i = R1i.y;
R1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(PV1i.y)));
PV0i.x = R1i.x;
R1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg1i), intBitsToFloat(PV1i.y)));
PV0i.y = R1i.y;
R1i.z = R127i.w;
PV0i.z = R1i.z;
// 3
R2i.xyz = floatBitsToInt(vec3(-(intBitsToFloat(PV0i.x)),-(intBitsToFloat(PV0i.y)),-(intBitsToFloat(PV0i.z))) + vec3(intBitsToFloat(uf_remappedPS[0].x),intBitsToFloat(uf_remappedPS[0].y),intBitsToFloat(uf_remappedPS[0].z)));
PV1i.x = R2i.x;
PV1i.y = R2i.y;
PV1i.z = R2i.z;
// 4
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
// 5
R0i.w = floatBitsToInt(sqrt(intBitsToFloat(PV0i.x)));
PS1i = R0i.w;
// 6
R1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS1i), intBitsToFloat(uf_remappedPS[1].x)));
// 7
predResult = (intBitsToFloat(R1i.w) >= 1.0);
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
if( (0 == 0)) discard;
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
if( activeMaskStackC[1] == true ) {
activeMaskStack[1] = activeMaskStack[0];
activeMaskStackC[2] = activeMaskStackC[1];
// 0
PS0i = floatBitsToInt(1.0 / intBitsToFloat(R0i.w));
// 1
R6i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.x), intBitsToFloat(PS0i)));
PV1i.x = R6i.x;
R6i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(PS0i)));
PV1i.y = R6i.y;
R5i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.z), intBitsToFloat(PS0i)));
PV1i.z = R5i.z;
// 2
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(uf_remappedPS[2].x),intBitsToFloat(uf_remappedPS[2].y),intBitsToFloat(uf_remappedPS[2].z),-0.0),vec4(intBitsToFloat(PV1i.x),intBitsToFloat(PV1i.y),intBitsToFloat(PV1i.z),0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
// 3
R0i.w = floatBitsToInt(intBitsToFloat(PV0i.x) + -(intBitsToFloat(uf_remappedPS[1].z)));
R0i.w = clampFI32(R0i.w);
// 4
predResult = (0.0 >= intBitsToFloat(R0i.w));
activeMaskStack[1] = predResult;
activeMaskStackC[2] = predResult == true && activeMaskStackC[1] == true;
}
else {
activeMaskStack[1] = false;
activeMaskStackC[2] = false;
}
if( activeMaskStackC[2] == true ) {
// 0
if( (0 == 0)) discard;
}
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
if( activeMaskStackC[1] == true ) {
R5i.xy = floatBitsToInt(texture(textureUnitPS0, intBitsToFloat(R0i.xy)).xy);
}
if( activeMaskStackC[1] == true ) {
// 0
PV0i.x = floatBitsToInt(intBitsToFloat(uf_remappedPS[3].z) * 1.0);
PV0i.y = floatBitsToInt(intBitsToFloat(uf_remappedPS[3].y) * 1.0);
PV0i.z = floatBitsToInt(intBitsToFloat(uf_remappedPS[3].x) * 1.0);
R127i.w = 0;
R126i.y = 0;
PS0i = R126i.y;
// 1
R127i.x = 0;
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.z),intBitsToFloat(uf_remappedPS[4].z)) + intBitsToFloat(PV0i.x)));
PV1i.y = R123i.y;
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.z),intBitsToFloat(uf_remappedPS[4].y)) + intBitsToFloat(PV0i.y)));
PV1i.z = R123i.z;
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.z),intBitsToFloat(uf_remappedPS[4].x)) + intBitsToFloat(PV0i.z)));
PV1i.w = R123i.w;
R2i.y = floatBitsToInt(-(intBitsToFloat(R1i.w)) + 1.0);
R2i.y = clampFI32(R2i.y);
PS1i = R2i.y;
// 2
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(uf_remappedPS[5].x)) + intBitsToFloat(PV1i.w)));
PV0i.x = R123i.x;
PV0i.y = floatBitsToInt(max(intBitsToFloat(R0i.z), 2.0));
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(uf_remappedPS[5].z)) + intBitsToFloat(PV1i.y)));
PV0i.z = R123i.z;
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.y),intBitsToFloat(uf_remappedPS[5].y)) + intBitsToFloat(PV1i.z)));
PV0i.w = R123i.w;
PS0i = floatBitsToInt(intBitsToFloat(R1i.z) * intBitsToFloat(R1i.z));
// 3
R126i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(uf_remappedPS[6].y)) + intBitsToFloat(PV0i.w)));
R127i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(uf_remappedPS[6].x)) + intBitsToFloat(PV0i.x)));
R4i.z = floatBitsToInt(min(intBitsToFloat(PV0i.y), intBitsToFloat(0x42a00000)));
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R1i.x),intBitsToFloat(uf_remappedPS[6].z)) + intBitsToFloat(PV0i.z)));
PV1i.w = R123i.w;
R122i.x = floatBitsToInt((intBitsToFloat(R1i.y) * intBitsToFloat(R1i.y) + intBitsToFloat(PS0i)));
PS1i = R122i.x;
// 4
backupReg0i = R127i.x;
R127i.x = floatBitsToInt((intBitsToFloat(R1i.x) * intBitsToFloat(R1i.x) + intBitsToFloat(PS1i)));
R125i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.w),intBitsToFloat(uf_remappedPS[7].y)) + intBitsToFloat(uf_remappedPS[8].z)));
PV0i.y = R125i.y;
R127i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg0i), intBitsToFloat(R5i.y)));
PS0i = floatBitsToInt(1.0 / intBitsToFloat(PV1i.w));
// 5
PV1i.x = floatBitsToInt(intBitsToFloat(R126i.x) * intBitsToFloat(PS0i));
PV1i.y = floatBitsToInt(intBitsToFloat(R127i.y) * intBitsToFloat(PS0i));
PV1i.z = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(R127i.w));
R127i.w = floatBitsToInt(-(intBitsToFloat(uf_remappedPS[7].z)));
R126i.z = uf_remappedPS[7].z;
PS1i = R126i.z;
// 6
backupReg0i = R127i.x;
R127i.x = floatBitsToInt(intBitsToFloat(R126i.y) + intBitsToFloat(R125i.y));
PV0i.y = PV1i.z;
PV0i.y = clampFI32(PV0i.y);
R123i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.x),intBitsToFloat(uf_remappedPS[7].x)) + intBitsToFloat(uf_remappedPS[8].y)));
PV0i.z = R123i.z;
R123i.w = floatBitsToInt((mul_nonIEEE(intBitsToFloat(PV1i.y),intBitsToFloat(uf_remappedPS[7].x)) + intBitsToFloat(uf_remappedPS[8].x)));
PV0i.w = R123i.w;
tempResultf = 1.0 / sqrt(intBitsToFloat(backupReg0i));
R125i.x = floatBitsToInt(tempResultf);
PS0i = R125i.x;
// 7
R123i.x = floatBitsToInt((intBitsToFloat(PV0i.w) * 2.0 + -(1.0)));
PV1i.x = R123i.x;
R126i.y = uf_remappedPS[7].z;
R0i.z = PV0i.y;
R123i.w = floatBitsToInt((intBitsToFloat(PV0i.z) * 2.0 + -(1.0)));
PV1i.w = R123i.w;
R1i.w = PV0i.y;
PS1i = R1i.w;
// 8
backupReg0i = R127i.x;
R127i.x = floatBitsToInt(-(intBitsToFloat(uf_remappedPS[7].z)));
PV0i.y = floatBitsToInt(intBitsToFloat(PV1i.w) + intBitsToFloat(uf_remappedPS[9].y));
PV0i.y = floatBitsToInt(intBitsToFloat(PV0i.y) / 2.0);
PV0i.z = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(uf_remappedPS[9].x));
PV0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) / 2.0);
PV0i.w = backupReg0i;
PV0i.w = clampFI32(PV0i.w);
R122i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.y),intBitsToFloat(R5i.y)) + intBitsToFloat(R127i.z)));
PS0i = R122i.x;
// 9
R126i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.z), intBitsToFloat(uf_remappedPS[9].z)));
PV1i.x = R126i.x;
R125i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R5i.x),intBitsToFloat(R5i.x)) + intBitsToFloat(PS0i)));
R2i.z = PV0i.w;
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_remappedPS[9].w)));
R3i.w = PV0i.w;
PS1i = R3i.w;
// 10
R0i.x = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R127i.w) / resScale);
R4i.y = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.x)),intBitsToFloat(R125i.x)) + intBitsToFloat(R6i.x)));
R127i.z = floatBitsToInt(-(intBitsToFloat(PV1i.w)) + 1.0);
PV0i.z = R127i.z;
R2i.w = floatBitsToInt(intBitsToFloat(R126i.y) + intBitsToFloat(PV1i.x));
R1i.x = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R127i.w) / resScale);
PS0i = R1i.x;
// 11
R2i.x = floatBitsToInt(intBitsToFloat(R127i.x) + intBitsToFloat(PV0i.z));
R0i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R127i.w) / resScale);
R3i.z = floatBitsToInt(intBitsToFloat(uf_remappedPS[7].z) / resScale + intBitsToFloat(R126i.x)); //
R4i.w = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(R1i.y)),intBitsToFloat(R125i.x)) + intBitsToFloat(R6i.y)));
R1i.y = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(R126i.z));
PS1i = R1i.y;
// 12
backupReg0i = R1i.z;
backupReg1i = R0i.w;
R3i.x = floatBitsToInt(-(intBitsToFloat(R125i.y)) + 1.0);
R3i.y = floatBitsToInt(intBitsToFloat(uf_remappedPS[7].z) / resScale + intBitsToFloat(R127i.z)); //
R1i.z = floatBitsToInt((mul_nonIEEE(-(intBitsToFloat(backupReg0i)),intBitsToFloat(R125i.x)) + intBitsToFloat(R5i.z)));
R0i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(backupReg1i), intBitsToFloat(uf_remappedPS[1].w)));//N
}
if( activeMaskStackC[1] == true ) {
R0i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R0i.xy), intBitsToFloat(R0i.w))));
R1i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R1i.xy), intBitsToFloat(R1i.w))));
R2i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R2i.wx), intBitsToFloat(R2i.w))));
R4i.x = floatBitsToInt(texture(textureUnitPS2, vec3(intBitsToFloat(R3i.zy), intBitsToFloat(R3i.w))));
}
if( activeMaskStackC[1] == true ) {
// 0
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R4i.y),intBitsToFloat(R4i.w),intBitsToFloat(R1i.z),-0.0),vec4(intBitsToFloat(R4i.y),intBitsToFloat(R4i.w),intBitsToFloat(R1i.z),0.0)));
PV0i.x = tempi.x;
PV0i.y = tempi.x;
PV0i.z = tempi.x;
PV0i.w = tempi.x;
R127i.w = floatBitsToInt(max(intBitsToFloat(R3i.x), -(intBitsToFloat(R3i.x))));
PS0i = R127i.w;
// 1
backupReg0i = R0i.x;
PV1i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(R1i.x));
R125i.y = floatBitsToInt(-(intBitsToFloat(uf_remappedPS[2].w)) + 1.0);
R126i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R2i.y), intBitsToFloat(R0i.w)));
tempResultf = 1.0 / sqrt(intBitsToFloat(PV0i.x));
PS1i = floatBitsToInt(tempResultf);
// 2
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.y), intBitsToFloat(PS1i)));
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.w), intBitsToFloat(PS1i)));
PV0i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R1i.z), intBitsToFloat(PS1i)));
PV0i.w = floatBitsToInt(intBitsToFloat(PV1i.x) + intBitsToFloat(R2i.x));
R127i.z = floatBitsToInt(sqrt(intBitsToFloat(R127i.w)));
PS0i = R127i.z;
// 3
tempi.x = floatBitsToInt(dot(vec4(intBitsToFloat(R5i.x),intBitsToFloat(R5i.y),intBitsToFloat(PS0i),-0.0),vec4(intBitsToFloat(PV0i.x),intBitsToFloat(PV0i.y),intBitsToFloat(PV0i.z),0.0)));
tempi.x = clampFI32(tempi.x);
PV1i.x = tempi.x;
PV1i.y = tempi.x;
PV1i.z = tempi.x;
PV1i.w = tempi.x;
R126i.z = tempi.x;
PS1i = floatBitsToInt(intBitsToFloat(PV0i.w) + intBitsToFloat(R4i.x));
// 4
PV0i.x = floatBitsToInt(intBitsToFloat(PS1i) * 0.25);
PV0i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R5i.z), intBitsToFloat(R127i.z)));
tempResultf = log2(intBitsToFloat(R126i.w));
if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F;
PS0i = floatBitsToInt(tempResultf);
// 5
backupReg0i = R126i.z;
R123i.x = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.y),intBitsToFloat(R5i.y)) + intBitsToFloat(PV0i.y)));
PV1i.x = R123i.x;
PV1i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS0i), intBitsToFloat(uf_remappedPS[1].y)));
R126i.z = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R125i.y),intBitsToFloat(PV0i.x)) + intBitsToFloat(uf_remappedPS[2].w)));
tempResultf = log2(intBitsToFloat(backupReg0i));
if( isinf(tempResultf) == true ) tempResultf = -3.40282347E+38F;
PS1i = floatBitsToInt(tempResultf);
// 6
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R4i.z), intBitsToFloat(PS1i)));
R123i.y = floatBitsToInt((mul_nonIEEE(intBitsToFloat(R6i.x),intBitsToFloat(R5i.x)) + intBitsToFloat(PV1i.x)));
R123i.y = clampFI32(R123i.y);
PV0i.y = R123i.y;
PS0i = floatBitsToInt(exp2(intBitsToFloat(PV1i.y)));
// 7
PV1i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_remappedPS[10].z)));
R125i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS0i), intBitsToFloat(R126i.z)));
PV1i.y = R125i.y;
PV1i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_remappedPS[10].y)));
PV1i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV0i.y), intBitsToFloat(uf_remappedPS[10].x)));
PS1i = floatBitsToInt(exp2(intBitsToFloat(PV0i.x)));
// 8
PV0i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PS1i), intBitsToFloat(uf_remappedPS[10].w)));
R4i.y = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.z)));
R4i.z = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.x)));
R4i.x = floatBitsToInt(mul_nonIEEE(intBitsToFloat(PV1i.y), intBitsToFloat(PV1i.w)));
PS0i = R4i.x;
// 9
R4i.w = floatBitsToInt(mul_nonIEEE(intBitsToFloat(R125i.y), intBitsToFloat(PV0i.x)));
}
// export
passPixelColor0 = vec4(intBitsToFloat(R4i.x), intBitsToFloat(R4i.y), intBitsToFloat(R4i.z), intBitsToFloat(R4i.w));
}

View File

@ -1,21 +1,15 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#define pow2(x) (x * x) #extension GL_ARB_separate_shader_objects : enable
// shader d8e69e8df8c227f5 // shader d8e69e8df8c227f5
// Bloom/blur 1st step, 1280->640->1280 //BB grid n char select
const float dither = $dither ;
uniform ivec4 uf_remappedPS[3]; const float scaleShader = $scaleShader;
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf470a000 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 const float scaleBlur = $scaleBlur;
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
const float resScale = ($height/$gameHeight);
const int sampleScale = 3;
const int sampleScale = 4;
const float lightBloom = 0.95;
highp float lineRand(vec2 co) highp float lineRand(vec2 co)
{ {
highp float a = 12.9898; highp float a = 12.9898;
@ -27,9 +21,15 @@ highp float lineRand(vec2 co)
} }
// FabriceNeyret2, single pass gaussian by intermediate MIPmap level. https://www.shadertoy.com/view/ltScRG
// I hereby pledge my loyalty to the FabriceNeyret2 fanclub, this is bloody beautiful!
uniform ivec4 uf_remappedPS[3];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf470a000 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 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 0
layout(location = 0) in vec4 passParameterSem0;
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 const int samples = 8 * sampleScale, //8 or 4 balances xy position
LOD = 2, // gaussian done on MIPmap at scale LOD LOD = 2, // gaussian done on MIPmap at scale LOD
sLOD = 1 << LOD; // tile size = 2^LOD sLOD = 1 << LOD; // tile size = 2^LOD
@ -52,8 +52,6 @@ vec4 blur(sampler2D sp, vec2 U, vec2 scale) {
} }
int clampFI32(int v) int clampFI32(int v)
{ {
if( v == 0x7FFFFFFF ) if( v == 0x7FFFFFFF )
@ -86,47 +84,44 @@ void main()
vec3 cubeMapSTM; vec3 cubeMapSTM;
int cubeMapFaceId; int cubeMapFaceId;
R0f = passParameterSem0; R0f = passParameterSem0;
R0f.xy = vec2((passParameterSem0.x + passParameterSem0.z), (passParameterSem0.y + passParameterSem0.w)); R0f.xy = R0f.xy - (lineRand(gl_FragCoord.xy)*0.0012 *dither);
R0f.xy = R0f.xy + (lineRand(gl_FragCoord.xy*vec2(0.1, 0.09))*0.0011 *dither);
// 0 // 0
R1f.x = R0f.x + intBitsToFloat(uf_remappedPS[0].x) / resScale; R1f.x = R0f.x + intBitsToFloat(uf_remappedPS[0].x);
R1f.y = R0f.y + intBitsToFloat(uf_remappedPS[0].y) / resScale; R1f.y = R0f.y + intBitsToFloat(uf_remappedPS[0].y);
R0f.z = R0f.x + intBitsToFloat(uf_remappedPS[0].z) / resScale; R0f.z = R0f.x + intBitsToFloat(uf_remappedPS[0].z);
R0f.w = R0f.y + intBitsToFloat(uf_remappedPS[0].w) / resScale; R0f.w = R0f.y + intBitsToFloat(uf_remappedPS[0].w);
// 1 // 1
backupReg0f = R0f.x; backupReg0f = R0f.x;
backupReg1f = R0f.y; backupReg1f = R0f.y;
backupReg0f = R0f.x; backupReg0f = R0f.x;
backupReg1f = R0f.y; backupReg1f = R0f.y;
R0f.x = backupReg0f + intBitsToFloat(uf_remappedPS[1].x) / resScale; R0f.x = backupReg0f + intBitsToFloat(uf_remappedPS[1].x);
R0f.y = backupReg1f + intBitsToFloat(uf_remappedPS[1].y) / resScale; R0f.y = backupReg1f + intBitsToFloat(uf_remappedPS[1].y);
R1f.z = backupReg0f + intBitsToFloat(uf_remappedPS[1].z) / resScale; R1f.z = backupReg0f + intBitsToFloat(uf_remappedPS[1].z);
R1f.w = backupReg1f + intBitsToFloat(uf_remappedPS[1].w) / resScale; R1f.w = backupReg1f + intBitsToFloat(uf_remappedPS[1].w);
vec2 coord = passParameterSem0.xy*textureSize(textureUnitPS0, 0); //
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0);
vec2 uv = coord * ps;
//color.a = 1.0;
R2f.xyz = (texture(textureUnitPS1, R1f.xy).xyz); R2f.xyz = (texture(textureUnitPS1, R1f.xy).xyz);
R3f.xyz = (texture(textureUnitPS1, R0f.zw).xyz); R3f.xyz = (texture(textureUnitPS1, R0f.zw).xyz);
R4f.xyz = (texture(textureUnitPS1, R0f.xy).xyz); R4f.xyz = (texture(textureUnitPS1, R0f.xy).xyz);
R5f.xyz = (texture(textureUnitPS1, R1f.zw).xyz); R5f.xyz = (texture(textureUnitPS1, R1f.zw).xyz);
R6f.xyz = blur(textureUnitPS0, R1f.xy, ps*scaleBlur).xyz; //1.0 4k //.66 2k //0.075 1k //.51 4kx2
R7f.xyz = R6f.xyz;
vec2 coord = passParameterSem0.xy*textureSize(textureUnitPS0, 0); // R0f.xy;// vec2(0.5, 0.5); R0f.xyz = R6f.xyz;
R1f.xyz = R6f.xyz;
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0); /*
vec2 uv = coord * ps; R6f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R7f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
R6f.xyzw = blur(textureUnitPS0, uv, ps); R0f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz);
// R6f.xyz = blur(textureUnitPS0, uv, ps); */
// R6f.w = 1.0; // 0
R7f = R6f;
R0f = R6f;
R1f = R6f;
tempf.x = dot(vec4(R2f.x,R2f.y,R2f.z,-0.0),vec4(intBitsToFloat(0x3e000000),intBitsToFloat(0x41ff0000),intBitsToFloat(0x45fe0100),0.0)); tempf.x = dot(vec4(R2f.x,R2f.y,R2f.z,-0.0),vec4(intBitsToFloat(0x3e000000),intBitsToFloat(0x41ff0000),intBitsToFloat(0x45fe0100),0.0));
PV0f.x = tempf.x; PV0f.x = tempf.x;
PV0f.y = tempf.x; PV0f.y = tempf.x;
@ -197,5 +192,5 @@ void main()
// 11 // 11
R1f.w = PS0f * intBitsToFloat(uf_remappedPS[2].z); R1f.w = PS0f * intBitsToFloat(uf_remappedPS[2].z);
// export // export
passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w); passPixelColor0 = vec4(R1f.x, R1f.y, R1f.z, R1f.w)*1.0;
} }

View File

@ -1,59 +0,0 @@
#version 420
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable
// shader dfd8991cfe6e6bbe
//align AO
uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(location = 0) in uvec4 attrDataSem0;
layout(location = 1) in uvec4 attrDataSem1;
out gl_PerVertex
{
vec4 gl_Position;
float gl_PointSize;
};
layout(location = 0) out vec4 passParameterSem0;
int clampFI32(int v)
{
if( v == 0x7FFFFFFF )
return floatBitsToInt(1.0);
else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
}
float mul_nonIEEE(float a, float b){ if( a == 0.0 || b == 0.0 ) return 0.0; return a*b; }
void main()
{
vec4 R1f = vec4(0.0);
vec4 R2f = vec4(0.0);
uvec4 attrDecoder;
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;
attrDecoder.xyz = attrDataSem0.xyz;
attrDecoder.xyz = (attrDecoder.xyz>>24)|((attrDecoder.xyz>>8)&0xFF00)|((attrDecoder.xyz<<8)&0xFF0000)|((attrDecoder.xyz<<24));
attrDecoder.w = 0;
R1f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(int(attrDecoder.z)), intBitsToFloat(floatBitsToInt(1.0)));
attrDecoder.xy = attrDataSem1.xy;
attrDecoder.xy = (attrDecoder.xy>>24)|((attrDecoder.xy>>8)&0xFF00)|((attrDecoder.xy<<8)&0xFF0000)|((attrDecoder.xy<<24));
attrDecoder.z = 0;
attrDecoder.w = 0;
R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)), intBitsToFloat(floatBitsToInt(0.0)), intBitsToFloat(floatBitsToInt(1.0)));
// 0
backupReg0f = R2f.x;
backupReg1f = R2f.y;
R2f.x = backupReg0f;
R2f.y = backupReg1f;
// export
gl_Position = vec4(R1f.x*(1 / 1.002), R1f.y*(1 / 1.003), R1f.z, R1f.w);
// export
passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.z);
// 0
}

View File

@ -3,7 +3,8 @@
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable #extension GL_ARB_shading_language_packing : enable
// shader e412d30f981be3b5 // shader e412d30f981be3b5
//char select dof //stasis cinematic align 0.5. .1 better right side..butprobalby breaks left
//2.0 for grid align
uniform ivec4 uf_remappedVS[1]; uniform ivec4 uf_remappedVS[1];
uniform vec2 uf_windowSpaceToClipSpaceTransform; uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(location = 0) in uvec4 attrDataSem0; layout(location = 0) in uvec4 attrDataSem0;
@ -22,7 +23,7 @@ else if( v == 0xFFFFFFFF )
return floatBitsToInt(0.0); return floatBitsToInt(0.0);
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.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; } float mul_nonIEEE(float a, float b){ return min(a*b,min(abs(a)*3.40282347E+38F,abs(b)*3.40282347E+38F)); }
void main() void main()
{ {
vec4 R1f = vec4(0.0); vec4 R1f = vec4(0.0);
@ -50,11 +51,10 @@ R2f = vec4(intBitsToFloat(int(attrDecoder.x)), intBitsToFloat(int(attrDecoder.y)
// 0 // 0
backupReg0f = R2f.x; backupReg0f = R2f.x;
backupReg1f = R2f.y; backupReg1f = R2f.y;
R2f.x = (mul_nonIEEE(backupReg0f, intBitsToFloat(uf_remappedVS[0].x)));// +intBitsToFloat(uf_remappedVS[0].z)); R2f.x = (backupReg0f * intBitsToFloat(uf_remappedVS[0].x) + intBitsToFloat(uf_remappedVS[0].z)*0.5);
R2f.y = (mul_nonIEEE(backupReg1f, intBitsToFloat(uf_remappedVS[0].y)));// +intBitsToFloat(uf_remappedVS[0].w)); R2f.y = (backupReg1f * intBitsToFloat(uf_remappedVS[0].y) + intBitsToFloat(uf_remappedVS[0].w)*0.5);
// export // export
gl_Position = vec4(R1f.x*(1.0 / 1.004), R1f.y*(1.0 / 1.006), R1f.z, R1f.w); gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
//gl_Position = vec4(R1f.x, R1f.y, R1f.z, R1f.w);
// export // export
passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.z); passParameterSem0 = vec4(R2f.x, R2f.y, R2f.z, R2f.z);
// 0 // 0

View File

@ -1,12 +1,9 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
// shader fdb5a87dd0368c6b #extension GL_ARB_separate_shader_objects : enable
// shadows scaling, ie 4096 = x4 const float resXScale = ($width/$gameWidth);
// To do - some nice edge smoothing at higher res const float resYScale = ($height/$gameHeight);
const float resScale = ($height/$gameHeight); // shader fdb5a87dd0368c6b //shadow scaling
const float resScaleDetail = ($height/$gameHeight) * 0.75;
const float shadowExposure = 0.85;
uniform ivec4 uf_remappedPS[23]; uniform ivec4 uf_remappedPS[23];
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0 layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4386000 res 1280x720x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 0
layout(binding = 1) uniform sampler2DShadow textureUnitPS1;// Tex1 addr 0xf551a000 res 1024x1024x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 6 6 6 border: 2 layout(binding = 1) uniform sampler2DShadow textureUnitPS1;// Tex1 addr 0xf551a000 res 1024x1024x1 dim 1 tm: 4 format 0005 compSel: 0 4 4 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 6 6 6 border: 2
@ -131,42 +128,42 @@ R2i.x = floatBitsToInt(max(intBitsToFloat(PV1i.x), -(intBitsToFloat(PV1i.x))));
PS0i = R2i.x; PS0i = R2i.x;
// 9 // 9
R127i.x = ((0.5 > intBitsToFloat(PS0i))?int(0xFFFFFFFF):int(0x0)); R127i.x = ((0.5 > intBitsToFloat(PS0i))?int(0xFFFFFFFF):int(0x0));
PV1i.y = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[9].z) / resScaleDetail); PV1i.y = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[9].z) /resXScale);
PV1i.z = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[10].z)/ resScaleDetail); PV1i.z = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[10].z) /resXScale);
R0i.y = floatBitsToInt(max(intBitsToFloat(R126i.y), -(intBitsToFloat(R126i.y)))); R0i.y = floatBitsToInt(max(intBitsToFloat(R126i.y), -(intBitsToFloat(R126i.y))));
PS1i = R0i.y; PS1i = R0i.y;
// 10 // 10
R126i.x = ((0.5 > intBitsToFloat(PS1i))?int(0xFFFFFFFF):int(0x0)); R126i.x = ((0.5 > intBitsToFloat(PS1i))?int(0xFFFFFFFF):int(0x0));
PV0i.y = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[11].z) / resScaleDetail); PV0i.y = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[11].z) /resXScale);
PV0i.z = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[12].z) / resScaleDetail); PV0i.z = floatBitsToInt(intBitsToFloat(R126i.w) + intBitsToFloat(uf_remappedPS[12].z) /resXScale);
R0i.w = PV1i.y; R0i.w = PV1i.y;
R0i.w = clampFI32(R0i.w); R0i.w = clampFI32(R0i.w);
R1i.w = PV1i.z; R1i.w = PV1i.z;
R1i.w = clampFI32(R1i.w); R1i.w = clampFI32(R1i.w);
PS0i = R1i.w; PS0i = R1i.w;
// 11 // 11
R0i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[9].x) / resScale); R0i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[9].x) /resXScale);
PV1i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[13].z)/ resScale); PV1i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[13].z) /resXScale);
R0i.z = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[9].y) / resScale); R0i.z = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[9].y) /resXScale);
R2i.w = PV0i.z; R2i.w = PV0i.z;
R2i.w = clampFI32(R2i.w); R2i.w = clampFI32(R2i.w);
R3i.w = PV0i.y; R3i.w = PV0i.y;
R3i.w = clampFI32(R3i.w); R3i.w = clampFI32(R3i.w);
PS1i = R3i.w; PS1i = R3i.w;
// 12 // 12
R1i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[10].x) / resScale); R1i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[10].x) /resXScale);
R1i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[10].y) / resScale); R1i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[10].y) /resXScale);
R2i.z = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[12].x) / resScale); R2i.z = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[12].x) /resXScale);
R4i.w = PV1i.y; R4i.w = PV1i.y;
R4i.w = clampFI32(R4i.w); R4i.w = clampFI32(R4i.w);
R2i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[12].y) / resScale); R2i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[12].y) /resXScale);
PS0i = R2i.y; PS0i = R2i.y;
// 13 // 13
R3i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[11].x) / resScale); R3i.x = floatBitsToInt(intBitsToFloat(R126i.z) + intBitsToFloat(uf_remappedPS[11].x) /resXScale);
R3i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[11].y) / resScale); R3i.y = floatBitsToInt(intBitsToFloat(R127i.y) + intBitsToFloat(uf_remappedPS[11].y) /resXScale);
R4i.z = floatBitsToInt(intBitsToFloat(R6i.x) + intBitsToFloat(uf_remappedPS[13].x) / resScale); R4i.z = floatBitsToInt(intBitsToFloat(R6i.x) + intBitsToFloat(uf_remappedPS[13].x) /resXScale);
R6i.w = ((R127i.x == 0)?(0):(R126i.x)); R6i.w = ((R127i.x == 0)?(0):(R126i.x));
R4i.y = floatBitsToInt(intBitsToFloat(R5i.y) + intBitsToFloat(uf_remappedPS[13].y) / resScale); R4i.y = floatBitsToInt(intBitsToFloat(R5i.y) + intBitsToFloat(uf_remappedPS[13].y) /resXScale);
PS1i = R4i.y; PS1i = R4i.y;
} }
if( activeMaskStackC[1] == true ) { if( activeMaskStackC[1] == true ) {
@ -236,30 +233,30 @@ activeMaskStackC[3] = false;
} }
if( activeMaskStackC[3] == true ) { if( activeMaskStackC[3] == true ) {
// 0 // 0
R0i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[18].x) / resScale); R0i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[18].x) /resXScale);
R0i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[18].y) / resScale); R0i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[18].y) /resXScale);
R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[18].z) / resScale); R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[18].z) /resXScale);
PV0i.z = R1i.z; PV0i.z = R1i.z;
// 1 // 1
R8i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[19].x) / resScale); R8i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[19].x) /resXScale);
R8i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[19].y) / resScale); R8i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[19].y) /resXScale);
R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[19].z) / resScale); R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[19].z) /resXScale);
PV1i.z = R1i.z; PV1i.z = R1i.z;
R0i.w = PV0i.z; R0i.w = PV0i.z;
R0i.w = clampFI32(R0i.w); R0i.w = clampFI32(R0i.w);
// 2 // 2
R2i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[20].x) / resScale); R2i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[20].x) /resXScale);
R2i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[20].y) / resScale); R2i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[20].y) /resXScale);
R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[20].z) / resScale); R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[20].z) /resXScale);
PV0i.z = R1i.z; PV0i.z = R1i.z;
R8i.w = PV1i.z; R8i.w = PV1i.z;
R8i.w = clampFI32(R8i.w); R8i.w = clampFI32(R8i.w);
// 3 // 3
backupReg0i = R3i.x; backupReg0i = R3i.x;
backupReg1i = R3i.y; backupReg1i = R3i.y;
R3i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[21].x) / resScale); R3i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[21].x) /resXScale);
R3i.y = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(uf_remappedPS[21].y) / resScale); R3i.y = floatBitsToInt(intBitsToFloat(backupReg1i) + intBitsToFloat(uf_remappedPS[21].y) /resXScale);
R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[21].z) / resScale); R1i.z = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[21].z) /resXScale);
PV1i.z = R1i.z; PV1i.z = R1i.z;
R2i.w = PV0i.z; R2i.w = PV0i.z;
R2i.w = clampFI32(R2i.w); R2i.w = clampFI32(R2i.w);
@ -340,29 +337,29 @@ activeMaskStackC[3] = false;
if( activeMaskStackC[3] == true ) { if( activeMaskStackC[3] == true ) {
// 0 // 0
backupReg0i = R0i.z; backupReg0i = R0i.z;
R127i.x = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[18].z) / resScale); R127i.x = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[18].z) /resXScale);
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[19].z) / resScale); PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[19].z) /resXScale);
R6i.w = floatBitsToInt(max(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y))); R6i.w = floatBitsToInt(max(intBitsToFloat(R0i.x), intBitsToFloat(R0i.y)));
// 1 // 1
R0i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[19].x) / resScale); R0i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[19].x) /resXScale);
R0i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[19].y) / resScale); R0i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[19].y) /resXScale);
R1i.z = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[18].x) / resScale); R1i.z = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[18].x) /resXScale);
R0i.w = PV0i.z; R0i.w = PV0i.z;
R0i.w = clampFI32(R0i.w); R0i.w = clampFI32(R0i.w);
R1i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[18].y) / resScale); R1i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[18].y) /resXScale);
PS1i = R1i.y; PS1i = R1i.y;
// 2 // 2
backupReg0i = R0i.z; backupReg0i = R0i.z;
R2i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[20].x) / resScale); R2i.x = floatBitsToInt(intBitsToFloat(R3i.x) + intBitsToFloat(uf_remappedPS[20].x) /resXScale);
R2i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[20].y) / resScale); R2i.y = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[20].y) /resXScale);
PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[20].z) / resScale); PV0i.z = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[20].z) /resXScale);
R1i.w = R127i.x; R1i.w = R127i.x;
R1i.w = clampFI32(R1i.w); R1i.w = clampFI32(R1i.w);
// 3 // 3
backupReg0i = R3i.x; backupReg0i = R3i.x;
R3i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[21].x) / resScale); R3i.x = floatBitsToInt(intBitsToFloat(backupReg0i) + intBitsToFloat(uf_remappedPS[21].x) /resXScale);
PV1i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[21].z) / resScale); PV1i.y = floatBitsToInt(intBitsToFloat(R0i.z) + intBitsToFloat(uf_remappedPS[21].z) /resXScale);
R3i.z = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[21].y) / resScale); R3i.z = floatBitsToInt(intBitsToFloat(R3i.y) + intBitsToFloat(uf_remappedPS[21].y) /resXScale);
R2i.w = PV0i.z; R2i.w = PV0i.z;
R2i.w = clampFI32(R2i.w); R2i.w = clampFI32(R2i.w);
// 4 // 4
@ -419,9 +416,9 @@ PV0i.y = R1i.y;
R0i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].z) + intBitsToFloat(PV1i.z))); R0i.z = floatBitsToInt((intBitsToFloat(R5i.x) * intBitsToFloat(uf_remappedPS[8].z) + intBitsToFloat(PV1i.z)));
PV0i.z = R0i.z; PV0i.z = R0i.z;
// 3 // 3
R4i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(uf_remappedPS[13].x) / resScale); R4i.x = floatBitsToInt(intBitsToFloat(PV0i.x) + intBitsToFloat(uf_remappedPS[13].x) /resXScale);
R4i.y = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(uf_remappedPS[13].y) / resScale); R4i.y = floatBitsToInt(intBitsToFloat(PV0i.y) + intBitsToFloat(uf_remappedPS[13].y) /resXScale);
R0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(uf_remappedPS[13].z) / resScale); R0i.z = floatBitsToInt(intBitsToFloat(PV0i.z) + intBitsToFloat(uf_remappedPS[13].z) /resXScale);
PV1i.z = R0i.z; PV1i.z = R0i.z;
// 4 // 4
R4i.w = PV1i.z; R4i.w = PV1i.z;
@ -465,10 +462,9 @@ activeMaskStackC[2] = activeMaskStack[1] == true && activeMaskStackC[1] == true;
activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true; activeMaskStackC[1] = activeMaskStack[0] == true && activeMaskStackC[0] == true;
if( activeMaskStackC[1] == true ) { if( activeMaskStackC[1] == true ) {
// 0 // 0
R0i.x = floatBitsToInt((intBitsToFloat(R1i.w) * intBitsToFloat(uf_remappedPS[22].x) + intBitsToFloat(uf_remappedPS[22].y))); R0i.x = floatBitsToInt((intBitsToFloat(R1i.w) * intBitsToFloat(uf_remappedPS[22].x) + intBitsToFloat(uf_remappedPS[22].y) /resXScale));
R0i.w = 0; R0i.w = 0;
} }
// export // export
passPixelColor0 = vec4(intBitsToFloat(R0i.x)*shadowExposure, intBitsToFloat(R0i.x)*shadowExposure, intBitsToFloat(R0i.x)*shadowExposure, intBitsToFloat(R0i.w)); passPixelColor0 = vec4(intBitsToFloat(R0i.x), intBitsToFloat(R0i.x), intBitsToFloat(R0i.x), intBitsToFloat(R0i.w));
} }

View File

@ -11,22 +11,10 @@ $width = 1280
$height = 720 $height = 720
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
// Performance $dither = 0.01
$scaleShader = 1.0
[Preset] $scaleBlur = 0.05
name = 256x144
$width = 256
$height = 144
$gameWidth = 1280
$gameHeight = 720
[Preset]
name = 427x240
$width = 427
$height = 240
$gameWidth = 1280
$gameHeight = 720
[Preset] [Preset]
name = 640x360 name = 640x360
@ -34,50 +22,56 @@ $width = 640
$height = 360 $height = 360
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 0.5
[Preset] $dither = 0.01
name = 854x480 $scaleShader = 1.0
$width = 854 $scaleBlur = 0.05
$height = 480
$gameWidth = 1280
$gameHeight = 720
[Preset]
name = 960x540
$width = 960
$height = 540
$gameWidth = 1280
$gameHeight = 720
// Quality // Quality
[Preset]
name = 1920x1080 (HD)
$width = 1920
$height = 1080
$gameWidth = 1280
$gameHeight = 720
$internalRes = 1.0
$dither = 0.15
$scaleShader = 1.0
$scaleBlur = 0.5
[Preset] [Preset]
name = 1600x900 name = 1600x900
$width = 1600 $width = 1600
$height = 900 $height = 900
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
$dither = 0.1
$scaleShader = 1.0
$scaleBlur = 0.5
[Preset] [Preset]
name = 1920x1080 name = 2560x1440 (Native x2)
$width = 1920
$height = 1080
$gameWidth = 1280
$gameHeight = 720
[Preset]
name = 2560x1440
$width = 2560 $width = 2560
$height = 1440 $height = 1440
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
$dither = 0.1
$scaleShader = 1.0
$scaleBlur = 0.5
[Preset] [Preset]
name = 2732x1536 name = 2560x1440 (Native x2) x2 sub scaling
$width = 2732 $width = 2560
$height = 1536 $height = 1440
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 2.0
$dither = 0.15
$scaleShader = 1.0
$scaleBlur = 0.5
[Preset] [Preset]
name = 3200x1800 name = 3200x1800
@ -85,13 +79,32 @@ $width = 3200
$height = 1800 $height = 1800
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
$dither = 0.2
$scaleShader = 1.0
$scaleBlur = 0.5
[Preset] [Preset]
name = 3840x2160 name = 3840x2160 (4k - Native x3)
$width = 3840 $width = 3840
$height = 2160 $height = 2160
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
$dither = 0.2
$scaleShader = 1.0
$scaleBlur = 1.0
[Preset]
name = 3840x2160 (4k - Native x3) x2 sub scaling
$width = 3840
$height = 2160
$gameWidth = 1280
$gameHeight = 720
$internalRes = 2.0
$dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
[Preset] [Preset]
name = 5120x2880 name = 5120x2880
@ -99,7 +112,10 @@ $width = 5120
$height = 2880 $height = 2880
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
$dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
// Enthusiast // Enthusiast
[Preset] [Preset]
@ -108,6 +124,10 @@ $width = 7680
$height = 4320 $height = 4320
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
$dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
[Preset] [Preset]
name = 10240x5760 name = 10240x5760
@ -115,12 +135,15 @@ $width = 10240
$height = 5760 $height = 5760
$gameWidth = 1280 $gameWidth = 1280
$gameHeight = 720 $gameHeight = 720
$internalRes = 1.0
$dither = 0.25
$scaleShader = 1.0
$scaleBlur = 1.0
[TextureRedefine] [TextureRedefine]
width = 1280 width = 1280
height = 720 height = 720
#formats = 0x816,0x810,0x41a,0x008,0x001,0x01a formatsExcluded = 0x031,0x431,0x035,0x034,0x033 #dialog prompt fixes, XCX Logo NLA
formatsExcluded = 0x031 #NLA flyover XCX logo screen
tileModesExcluded = 0x001 tileModesExcluded = 0x001
overwriteWidth = ($width/$gameWidth) * 1280 overwriteWidth = ($width/$gameWidth) * 1280
overwriteHeight = ($height/$gameHeight) * 720 overwriteHeight = ($height/$gameHeight) * 720
@ -129,14 +152,16 @@ overwriteHeight = ($height/$gameHeight) * 720
width = 1024 width = 1024
height = 1024 height = 1024
formats = 0x005 formats = 0x005
overwriteWidth = ($width/$gameWidth) * 1024 #overwriteWidth = ($height/$gameHeight) * 1024
overwriteHeight = ($height/$gameHeight) * 1024 #overwriteHeight = ($height/$gameHeight) * 1024
overwriteWidth = 3072 #1080 breaks without rounding
overwriteHeight = 3072
[TextureRedefine] #ingame menu [TextureRedefine] #ingame menu
width = 1024 width = 1024
height = 720 height = 720
tileModesExcluded = 0x001 tileModesExcluded = 0x001
###formats = 0x01a,0x810,0x011,0x816 # 0x41a
overwriteWidth = ($width/$gameWidth) * 1024 overwriteWidth = ($width/$gameWidth) * 1024
overwriteHeight = ($height/$gameHeight) * 720 overwriteHeight = ($height/$gameHeight) * 720
@ -159,187 +184,190 @@ overwriteHeight = ($height/$gameHeight) * 480
[TextureRedefine] [TextureRedefine]
width = 640 width = 640
height = 368 height = 368
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 #dialog prompt fixes, XCX Logo NLA overwriteWidth = ($width/$gameWidth) * (640*$internalRes)
overwriteWidth = ($width/$gameWidth) * 640 overwriteHeight = ($height/$gameHeight) * (368*$internalRes)
overwriteHeight = ($height/$gameHeight) * 368
[TextureRedefine] [TextureRedefine]
width = 640 width = 640
height = 360 height = 360
tileModesExcluded = 0x001 # fmv sub colour tileModesExcluded = 0x001 # fmv sub colour
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 overwriteWidth = ($width/$gameWidth) * (640*$internalRes)
overwriteWidth = ($width/$gameWidth) * 640 overwriteHeight = ($height/$gameHeight) * (360*$internalRes)
overwriteHeight = ($height/$gameHeight) * 360
[TextureRedefine] # shadows 1024 for smoother transition [TextureRedefine] # shadows 1024 for smoother transition
width = 512 width = 512
height = 512 height = 512
formats = 0x005 formats = 0x005
overwriteWidth = ($height/$gameHeight) * 1024 #overwriteWidth = ($height/$gameHeight) * 512
overwriteHeight = ($height/$gameHeight) * 1024 #overwriteHeight = ($height/$gameHeight) * 512
overwriteWidth = 3072 #1080 breaks without rounding
overwriteHeight = 3072
[TextureRedefine] [TextureRedefine]
width = 512 width = 512
height = 288 height = 288
#formats = overwriteWidth = ($width/$gameWidth) * (512*$internalRes)
overwriteWidth = ($width/$gameWidth) * 512 overwriteHeight = ($height/$gameHeight) * (288*$internalRes)
overwriteHeight = ($height/$gameHeight) * 288
[TextureRedefine] # fog [TextureRedefine] # fog 1.5 match stencil
width = 448 width = 448
height = 240 height = 240
overwriteWidth = ($width/$gameWidth) * 448 overwriteWidth = ($width/$gameWidth) * (448*$internalRes*1.5)
overwriteHeight = ($height/$gameHeight) * 240 overwriteHeight = ($height/$gameHeight) * (240*$internalRes*1.5)
[TextureRedefine] # fog [TextureRedefine] # fog
width = 426 width = 426
height = 240 height = 240
overwriteWidth = ($width/$gameWidth) * 426 overwriteWidth = ($width/$gameWidth) * (426*$internalRes*1.5)
overwriteHeight = ($height/$gameHeight) * 240 overwriteHeight = ($height/$gameHeight) * (240*$internalRes*1.5)
[TextureRedefine] # #Bloom, DOF [TextureRedefine] # #Bloom, DOF
width = 320 width = 320
height = 192 height = 192
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 overwriteWidth = ($width/$gameWidth) * (320*$internalRes)
overwriteWidth = ($width/$gameWidth) * 320 overwriteHeight = ($height/$gameHeight) * (192*$internalRes)
overwriteHeight = ($height/$gameHeight) * 192
[TextureRedefine] # Bloom, DOF
width = 384
height = 192
#formats = 0x001
overwriteWidth = ($width/$gameWidth) * (384*$internalRes)
overwriteHeight = ($height/$gameHeight) * (192*$internalRes)
[TextureRedefine] # Bloom, DOF [TextureRedefine] # Bloom, DOF
width = 320 width = 320
height = 180 height = 180
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 overwriteWidth = ($width/$gameWidth) * (320*$internalRes)
overwriteWidth = ($width/$gameWidth) * 320 overwriteHeight = ($height/$gameHeight) * (180*$internalRes)
overwriteHeight = ($height/$gameHeight) * 180
[TextureRedefine] [TextureRedefine]
width = 256 width = 256
height = 144 height = 144
###formats = 0x816
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 256 overwriteWidth = ($width/$gameWidth) * (256*$internalRes)
overwriteHeight = ($height/$gameHeight) * 144 overwriteHeight = ($height/$gameHeight) * (144*$internalRes)
[TextureRedefine] # PR screen #[TextureRedefine] # PR screen
width = 256 #width = 256
height = 256 #height = 256
formats = 0x810 #,0x011 #0x816 #formats = 0x810 #,0x011 #0x816
overwriteWidth = ($height/$gameHeight) * 256 #overwriteWidth = ($height/$gameHeight) * (256*$internalRes)
overwriteHeight = ($height/$gameHeight) * 256 #overwriteHeight = ($height/$gameHeight) * (256*$internalRes)
#
#[TextureRedefine]# sky
#width = 255
#height = 255
#formats = 0x810
##formatsExcluded = 0x01a,0x431,0x035,0x034,0x033,0x031
#overwriteWidth = ($height/$gameHeight) * 255
#overwriteHeight = ($height/$gameHeight) * 255
[TextureRedefine]# sky [TextureRedefine] # skell depth
width = 255 width = 192
height = 255 height = 96
formats = 0x810 overwriteWidth = ($width/$gameWidth) * (192*$internalRes)
#formatsExcluded = 0x01a,0x431,0x035,0x034,0x033,0x031 overwriteHeight = ($height/$gameHeight) * (96*$internalRes)
overwriteWidth = ($height/$gameHeight) * 255
overwriteHeight = ($height/$gameHeight) * 255
[TextureRedefine] # Bloom [TextureRedefine] # Bloom 2nd
width = 160 width = 160
height = 96 height = 96
###formats = 0x816
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 160 overwriteWidth = ($width/$gameWidth) * (160*$internalRes)
overwriteHeight = ($height/$gameHeight) * 96 overwriteHeight = ($height/$gameHeight) * (96*$internalRes)
[TextureRedefine] #bloom [TextureRedefine] #bloom 2nd
width = 160 width = 160
height = 90 height = 90
###formats = 0x816 ###formats = 0x816
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 160 overwriteWidth = ($width/$gameWidth) * (160*$internalRes)
overwriteHeight = ($height/$gameHeight) * 90 overwriteHeight = ($height/$gameHeight) * (90*$internalRes)
[TextureRedefine] # #[TextureRedefine] #
width = 128 #width = 128
height = 128 #height = 128
#formats = 0x806 #,0x035,0x034,0x033,0x031 ##formats = 0x806 #,0x035,0x034,0x033,0x031
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 #formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 128 #overwriteWidth = ($width/$gameWidth) * 128
overwriteHeight = ($height/$gameHeight) * 128 #overwriteHeight = ($height/$gameHeight) * 128
[TextureRedefine] #[TextureRedefine]
width = 127 #width = 127
height = 127 #height = 127
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 #formatsExcluded = 0x431,0x035,0x034,0x033,0x031
###formats = 0x80e # 0x820,0x816 #,0x035,0x034,0x033,0x032,0x031 ####formats = 0x80e # 0x820,0x816 #,0x035,0x034,0x033,0x032,0x031
overwriteWidth = ($width/$gameWidth) * 127 #overwriteWidth = ($width/$gameWidth) * 127
overwriteHeight = ($height/$gameHeight) * 127 #overwriteHeight = ($height/$gameHeight) * 127
[TextureRedefine] [TextureRedefine] #bloom 3rd level
width = 96 width = 96
height = 48 height = 48
###formats = 0x816 overwriteWidth = ($width/$gameWidth) * (96*$internalRes)
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 overwriteHeight = ($height/$gameHeight) * (48*$internalRes)
overwriteWidth = ($width/$gameWidth) * 96
overwriteHeight = ($height/$gameHeight) * 48
[TextureRedefine] [TextureRedefine] #bloom 3rd level
width = 80 width = 80
height = 46 height = 46
###formats = 0x816 overwriteWidth = ($width/$gameWidth) * (80*$internalRes)
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 overwriteHeight = ($height/$gameHeight) * (46*$internalRes)
overwriteWidth = ($width/$gameWidth) * 80
overwriteHeight = ($height/$gameHeight) * 46
[TextureRedefine] #[TextureRedefine]
width = 64 #width = 64
height = 64 #height = 64
###formats = 0x820,0x816 #,0x035,0x034,0x033,0x032,0x031 ####formats = 0x820,0x816 #,0x035,0x034,0x033,0x032,0x031
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 #formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 64 #overwriteWidth = ($width/$gameWidth) * (64*$internalRes)
overwriteHeight = ($height/$gameHeight) * 64 #overwriteHeight = ($height/$gameHeight) * (64*$internalRes)
[TextureRedefine] [TextureRedefine] #skell cockpit bloom 3rd level
width = 64 width = 64
height = 32 height = 32
###formats = 0x806 #0x820,0x816 #,0x035,0x034,0x033,0x032,0x031 formats = 0x816 #0x820,0x816 #,0x035,0x034,0x033,0x032,0x031
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 overwriteWidth = ($width/$gameWidth) * (64*$internalRes)
overwriteWidth = ($width/$gameWidth) * 64 overwriteHeight = ($height/$gameHeight) * (32*$internalRes)
overwriteHeight = ($height/$gameHeight) * 32
[TextureRedefine] # [TextureRedefine] #
width = 32 width = 32
height = 32 height = 32
formats = 0x806 #001a breaks flashlight scene formats = 0x806 #001a breaks flashlight scene
overwriteWidth = ($width/$gameWidth) * 32 overwriteWidth = ($width/$gameWidth) * (32*$internalRes)
overwriteHeight = ($height/$gameHeight) * 32 overwriteHeight = ($height/$gameHeight) * (32*$internalRes)
[TextureRedefine] [TextureRedefine]
width = 32 width = 32
height = 16 height = 16
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 32 overwriteWidth = ($width/$gameWidth) * (32*$internalRes)
overwriteHeight = ($height/$gameHeight) * 16 overwriteHeight = ($height/$gameHeight) * (16*$internalRes)
[TextureRedefine] # [TextureRedefine] #
width = 16 width = 16
height = 8 height = 8
###formats = 0x008,0x806,0x80e # ,0x431,0x031 ###formats = 0x008,0x806,0x80e # ,0x431,0x031
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 16 overwriteWidth = ($width/$gameWidth) * (16*$internalRes)
overwriteHeight = ($height/$gameHeight) * 8 overwriteHeight = ($height/$gameHeight) * (8*$internalRes)
[TextureRedefine] # #[TextureRedefine] # breaks depth when scaling 1080
width = 8 #width = 8
height = 8 #height = 8
##formats = 0x806,0x81e,0x80e # ,0x431,0x031 ###formats = 0x806,0x81e,0x80e # ,0x431,0x031
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 #formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 8 #overwriteWidth = ($width/$gameWidth) * (8*$internalRes)
overwriteHeight = ($height/$gameHeight) * 8 #overwriteHeight = ($height/$gameHeight) * (8*$internalRes)
#
[TextureRedefine] #[TextureRedefine]
width = 4 #width = 4
height = 4 #height = 4
###formats = 0x81e,0x80e ####formats = 0x81e,0x80e
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 #formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 4 #overwriteWidth = ($width/$gameWidth) * (4*$internalRes)
overwriteHeight = ($height/$gameHeight) * 4 #overwriteHeight = ($height/$gameHeight) * (4*$internalRes)
#
[TextureRedefine] #[TextureRedefine]
width = 1 #width = 1
height = 1 #height = 1
###formats = 0x008,0x81e,0x01a ####formats = 0x008,0x81e,0x01a
formatsExcluded = 0x431,0x035,0x034,0x033,0x031 #formatsExcluded = 0x431,0x035,0x034,0x033,0x031
overwriteWidth = ($width/$gameWidth) * 1 #overwriteWidth = ($width/$gameWidth) * (1*$internalRes)
overwriteHeight = ($height/$gameHeight) * 1 #overwriteHeight = ($height/$gameHeight) * (1*$internalRes)