cemu_graphic_packs/Quality/Splatoon_2160p/45d85f1d25e7d0de_0000000000000079_ps.txt

36 lines
1.5 KiB
Plaintext
Raw Normal View History

#version 420
#extension GL_ARB_texture_gather : enable
// shader 45d85f1d25e7d0de // vertical blur 2160
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4601800 res 320x180x1 dim 1 tm: 4 format 001a compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
layout(location = 0) in vec4 passParameterSem0;
layout(location = 0) out vec4 passPixelColor0;
uniform vec2 uf_fragCoordScale;
float data = passParameterSem0.z - passParameterSem0.w;
float h = data / 1.33333333 * uf_fragCoordScale.y;
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
uniform float weight[] = float[]( 0.10621973, 0.19485826, 0.13789364, 0.07373992, 0.02961301, 0.00884599, 0.00193931 );
uniform float offset[] = float[]( 0.00000000, 1.47368421, 3.43859649, 5.40350877, 7.36842105, 9.33333333, 11.29824561 );
void main()
{
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
for (int i=1; i<7; i++) {
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
}
vec4 R2f = texture( textureUnitPS0, R0f ) * o_weight[0];
for (int i=1; i<2; i++) {
R2f += texture( textureUnitPS0, R0f + vec2(0.0, o_offset[i]*h) ) * o_weight[i];
R2f += texture( textureUnitPS0, R0f - vec2(0.0, o_offset[i]*h) ) * o_weight[i];
}
passPixelColor0 = ( (uf_fragCoordScale.y == 1.0) ? R2f : R1f );
}