2017-09-30 00:01:54 +02:00
|
|
|
#version 420
|
|
|
|
#extension GL_ARB_texture_gather : enable
|
2017-10-13 05:48:39 +02:00
|
|
|
// shader 45d85f1d25e7d0de // vertical blur 5760
|
2017-09-30 00:01:54 +02:00
|
|
|
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;
|
|
|
|
|
2017-10-13 05:48:39 +02:00
|
|
|
float data = passParameterSem0.z - passParameterSem0.w;
|
|
|
|
float h = data / 1.38461538 * uf_fragCoordScale.y;
|
|
|
|
|
|
|
|
uniform float o_weight[] = float[]( 0.29411765, 0.35294118 );
|
|
|
|
uniform float o_offset[] = float[]( 0.00000000, 1.33333333 );
|
|
|
|
|
|
|
|
uniform float weight[] = float[]( 0.04202302, 0.08289284, 0.07843703, 0.07101047, 0.06150497, 0.05096469, 0.04039985, 0.03063492, 0.02222034, 0.01541512, 0.01022743, 0.00648881, 0.00393634, 0.00228295, 0.00126565, 0.00067063, 0.00033957, 0.00016428, 0.00007592, 0.00003351, 0.00001412, 0.00000568, 0.00000218, 0.00000080, 0.00000028, 0.00000009 );
|
|
|
|
uniform float offset[] = float[]( 0.00000000, 1.49584488, 3.49030471, 5.48476454, 7.47922438, 9.47368421, 11.46814404, 13.46260388, 15.45706371, 17.45152355, 19.44598338, 21.44044321, 23.43490305, 25.42936288, 27.42382271, 29.41828255, 31.41274238, 33.40720222, 35.40166205, 37.39612188, 39.39058172, 41.38504155, 43.37950139, 45.37396122, 47.36842105, 49.36288089 );
|
2017-09-30 00:01:54 +02:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec2 R0f = vec2(passParameterSem0.x, passParameterSem0.w);
|
2017-10-13 05:48:39 +02:00
|
|
|
|
2017-09-30 00:01:54 +02:00
|
|
|
vec4 R1f = texture( textureUnitPS0, R0f ) * weight[0];
|
2017-10-13 05:48:39 +02:00
|
|
|
for (int i=1; i<26; i++) {
|
|
|
|
R1f += texture( textureUnitPS0, R0f + vec2(0.0, offset[i]*h) ) * weight[i];
|
|
|
|
R1f += texture( textureUnitPS0, R0f - vec2(0.0, offset[i]*h) ) * weight[i];
|
2017-09-30 00:01:54 +02:00
|
|
|
}
|
2017-10-13 05:48:39 +02:00
|
|
|
|
|
|
|
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 );
|
2017-09-30 00:01:54 +02:00
|
|
|
}
|