vispy 0.9.5__cp38-cp38-win_amd64.whl → 0.14.0__cp38-cp38-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vispy might be problematic. Click here for more details.

Files changed (103) hide show
  1. vispy/app/backends/_glfw.py +2 -2
  2. vispy/app/backends/_pyglet.py +8 -2
  3. vispy/app/backends/_qt.py +88 -63
  4. vispy/app/backends/_wx.py +6 -1
  5. vispy/app/canvas.py +4 -2
  6. vispy/app/tests/test_canvas.py +52 -1
  7. vispy/app/tests/test_context.py +5 -3
  8. vispy/color/color_array.py +8 -1
  9. vispy/color/colormap.py +5 -25
  10. vispy/geometry/meshdata.py +76 -38
  11. vispy/geometry/rect.py +6 -0
  12. vispy/geometry/tests/test_meshdata.py +72 -0
  13. vispy/gloo/buffer.py +12 -0
  14. vispy/gloo/gl/_constants.py +9 -5
  15. vispy/gloo/gl/_es2.py +8 -4
  16. vispy/gloo/gl/_gl2.py +2 -3
  17. vispy/gloo/gl/_proxy.py +1 -1
  18. vispy/gloo/gl/_pyopengl2.py +12 -7
  19. vispy/gloo/gl/tests/test_names.py +3 -0
  20. vispy/gloo/glir.py +26 -13
  21. vispy/gloo/program.py +39 -22
  22. vispy/gloo/tests/test_program.py +9 -2
  23. vispy/gloo/tests/test_texture.py +19 -2
  24. vispy/gloo/texture.py +46 -16
  25. vispy/gloo/wrappers.py +4 -2
  26. vispy/glsl/build_spatial_filters.py +241 -293
  27. vispy/glsl/misc/spatial-filters.frag +1299 -254
  28. vispy/io/_data/spatial-filters.npy +0 -0
  29. vispy/io/datasets.py +2 -2
  30. vispy/io/image.py +1 -1
  31. vispy/io/stl.py +3 -3
  32. vispy/scene/cameras/base_camera.py +6 -2
  33. vispy/scene/cameras/panzoom.py +10 -14
  34. vispy/scene/cameras/perspective.py +6 -0
  35. vispy/scene/cameras/tests/test_cameras.py +27 -0
  36. vispy/scene/cameras/tests/test_perspective.py +37 -0
  37. vispy/scene/cameras/turntable.py +39 -23
  38. vispy/scene/canvas.py +9 -5
  39. vispy/scene/events.py +9 -0
  40. vispy/scene/node.py +19 -2
  41. vispy/scene/tests/test_canvas.py +30 -1
  42. vispy/scene/tests/test_visuals.py +113 -0
  43. vispy/scene/visuals.py +6 -1
  44. vispy/scene/widgets/viewbox.py +3 -2
  45. vispy/testing/_runners.py +6 -12
  46. vispy/testing/_testing.py +3 -4
  47. vispy/util/check_environment.py +4 -4
  48. vispy/util/gallery_scraper.py +50 -32
  49. vispy/util/tests/test_gallery_scraper.py +2 -0
  50. vispy/util/transforms.py +1 -1
  51. vispy/util/wrappers.py +1 -1
  52. vispy/version.py +2 -3
  53. vispy/visuals/__init__.py +2 -0
  54. vispy/visuals/_scalable_textures.py +20 -17
  55. vispy/visuals/collections/array_list.py +3 -3
  56. vispy/visuals/collections/base_collection.py +1 -1
  57. vispy/visuals/ellipse.py +1 -1
  58. vispy/visuals/filters/__init__.py +3 -2
  59. vispy/visuals/filters/base_filter.py +120 -0
  60. vispy/visuals/filters/clipping_planes.py +24 -12
  61. vispy/visuals/filters/markers.py +28 -0
  62. vispy/visuals/filters/mesh.py +61 -6
  63. vispy/visuals/filters/tests/test_primitive_picking_filters.py +70 -0
  64. vispy/visuals/graphs/graph.py +1 -1
  65. vispy/visuals/image.py +114 -26
  66. vispy/visuals/image_complex.py +130 -0
  67. vispy/visuals/instanced_mesh.py +152 -0
  68. vispy/visuals/isocurve.py +1 -1
  69. vispy/visuals/line/dash_atlas.py +46 -41
  70. vispy/visuals/line/line.py +2 -5
  71. vispy/visuals/markers.py +310 -384
  72. vispy/visuals/mesh.py +2 -2
  73. vispy/visuals/shaders/function.py +3 -0
  74. vispy/visuals/shaders/tests/test_function.py +6 -0
  75. vispy/visuals/tests/test_axis.py +2 -2
  76. vispy/visuals/tests/test_image.py +92 -2
  77. vispy/visuals/tests/test_image_complex.py +36 -0
  78. vispy/visuals/tests/test_instanced_mesh.py +50 -0
  79. vispy/visuals/tests/test_markers.py +6 -0
  80. vispy/visuals/tests/test_mesh.py +17 -0
  81. vispy/visuals/tests/test_text.py +11 -0
  82. vispy/visuals/tests/test_volume.py +218 -12
  83. vispy/visuals/text/_sdf_cpu.cp38-win_amd64.pyd +0 -0
  84. vispy/visuals/text/_sdf_cpu.pyx +21 -23
  85. vispy/visuals/text/text.py +9 -3
  86. vispy/visuals/tube.py +2 -2
  87. vispy/visuals/visual.py +144 -3
  88. vispy/visuals/volume.py +300 -131
  89. {vispy-0.9.5.dist-info → vispy-0.14.0.dist-info}/LICENSE.txt +1 -1
  90. {vispy-0.9.5.dist-info → vispy-0.14.0.dist-info}/METADATA +218 -198
  91. {vispy-0.9.5.dist-info → vispy-0.14.0.dist-info}/RECORD +93 -96
  92. {vispy-0.9.5.dist-info → vispy-0.14.0.dist-info}/WHEEL +1 -1
  93. vispy/glsl/antialias/__init__.py +0 -0
  94. vispy/glsl/arrowheads/__init__.py +0 -0
  95. vispy/glsl/arrows/__init__.py +0 -0
  96. vispy/glsl/collections/__init__.py +0 -0
  97. vispy/glsl/colormaps/__init__.py +0 -0
  98. vispy/glsl/lines/__init__.py +0 -0
  99. vispy/glsl/markers/__init__.py +0 -0
  100. vispy/glsl/math/__init__.py +0 -0
  101. vispy/glsl/misc/__init__.py +0 -0
  102. vispy/glsl/transforms/__init__.py +0 -0
  103. {vispy-0.9.5.dist-info → vispy-0.14.0.dist-info}/top_level.txt +0 -0
@@ -1,362 +1,1407 @@
1
1
  // ------------------------------------
2
2
  // Automatically generated, do not edit
3
3
  // ------------------------------------
4
-
5
- const float kernel_bias = -0.234377;
6
- const float kernel_scale = 1.241974;
7
- const float kernel_size = 1024.000000;
8
- const vec4 bits = vec4(1.0, 1.0/256.0, 1.0/(256.0*256.0), 1.0/(256.0*256.0*256.0));
4
+ const float kernel_bias = -0.23437733388100893;
5
+ const float kernel_scale = 1.2419743353536359;
6
+ const float kernel_size = 1024;
7
+ const vec4 bits = vec4(1, 0.00390625, 1.52587890625e-05, 5.960464477539063e-08);
9
8
  uniform sampler2D u_kernel;
10
9
 
11
- float
12
- unpack_unit(vec4 rgba)
13
- {
10
+ float unpack_unit(vec4 rgba) {
14
11
  // return rgba.r; // uncomment this for r32f debugging
15
12
  return dot(rgba, bits);
16
13
  }
17
14
 
18
- float
19
- unpack_ieee(vec4 rgba)
20
- {
15
+ float unpack_ieee(vec4 rgba) {
21
16
  // return rgba.r; // uncomment this for r32f debugging
22
- rgba.rgba = rgba.abgr * 255.;
23
- float sign = 1.0 - step(128.0,rgba[0])*2.0;
24
- float exponent = 2.0 * mod(rgba[0],128.0) + step(128.0,rgba[1]) - 127.0;
25
- float mantissa = mod(rgba[1],128.0)*65536.0 + rgba[2]*256.0 + rgba[3] + float(0x800000);
17
+ rgba.rgba = rgba.abgr * 255;
18
+ float sign = 1 - step(128 , rgba[0]) * 2;
19
+ float exponent = 2 * mod(rgba[0] , 128) + step(128 , rgba[1]) - 127;
20
+ float mantissa = mod(rgba[1] , 128) * 65536 + rgba[2] * 256 + rgba[3] + float(0x800000);
26
21
  return sign * exp2(exponent) * (mantissa * exp2(-23.));
27
22
  }
28
23
 
29
- float
30
- unpack_interpolate(sampler2D kernel, vec2 uv)
31
- {
32
- // return texture2D(kernel, uv).r; //uncomment this for r32f debug without interpolation
24
+
25
+ float unpack_interpolate(sampler2D kernel, vec2 uv) {
26
+ // return texture2D(kernel, uv).r; //uncomment this for r32f debug without interpolation
33
27
  float kpixel = 1. / kernel_size;
34
28
  float u = uv.x / kpixel;
35
29
  float v = uv.y;
36
30
  float uf = fract(u);
37
31
  u = (u - uf) * kpixel;
38
-
39
32
  float d0 = unpack_unit(texture2D(kernel, vec2(u, v)));
40
33
  float d1 = unpack_unit(texture2D(kernel, vec2(u + 1. * kpixel, v)));
41
34
  return mix(d0, d1, uf);
42
35
  }
43
36
 
44
- vec4
45
- filter1D_radius1( sampler2D kernel, float index, float x, vec4 c0, vec4 c1 )
46
- {
47
- float w, w_sum = 0.0;
48
- vec4 r = vec4(0.0,0.0,0.0,0.0);
49
- w = unpack_interpolate(kernel, vec2(0.000000+(x/1.0), index));
50
- w = w*kernel_scale + kernel_bias;
37
+ vec4 filter1D_radius1(sampler2D kernel, float index, float x, vec4 c0, vec4 c1) {
38
+ float w, w_sum = 0;
39
+ vec4 r = vec4(0);
40
+
41
+ w = unpack_interpolate(kernel, vec2(0.0 + (x / 1), index));
42
+ w = w * kernel_scale + kernel_bias;
51
43
  r += c0 * w;
52
- w = unpack_interpolate(kernel, vec2(1.000000-(x/1.0), index));
53
- w = w*kernel_scale + kernel_bias;
44
+ w = unpack_interpolate(kernel, vec2(1.0 - (x / 1), index));
45
+ w = w * kernel_scale + kernel_bias;
54
46
  r += c1 * w;
55
47
  return r;
56
48
  }
57
49
 
58
- vec4
59
- filter2D_radius1(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel)
60
- {
61
- vec2 texel = uv/pixel - vec2(0.5, 0.5) ;
50
+ vec4 filter2D_radius1(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel) {
51
+ vec2 texel = uv / pixel - vec2(0.5);
62
52
  vec2 f = fract(texel);
63
- texel = (texel-fract(texel) + vec2(0.001, 0.001)) * pixel;
53
+ texel = (texel - fract(texel) + vec2(0.001)) * pixel;
54
+
64
55
  vec4 t0 = filter1D_radius1(kernel, index, f.x,
65
- texture2D( texture, texel + vec2(0, 0) * pixel),
66
- texture2D( texture, texel + vec2(1, 0) * pixel));
56
+ texture2D(texture, texel + vec2(0, 0) * pixel),
57
+ texture2D(texture, texel + vec2(1, 0) * pixel));
67
58
  vec4 t1 = filter1D_radius1(kernel, index, f.x,
68
- texture2D( texture, texel + vec2(0, 1) * pixel),
69
- texture2D( texture, texel + vec2(1, 1) * pixel));
59
+ texture2D(texture, texel + vec2(0, 1) * pixel),
60
+ texture2D(texture, texel + vec2(1, 1) * pixel));
70
61
  return filter1D_radius1(kernel, index, f.y, t0, t1);
71
62
  }
72
63
 
73
- vec4
74
- filter1D_radius2( sampler2D kernel, float index, float x, vec4 c0, vec4 c1, vec4 c2, vec4 c3 )
75
- {
76
- float w, w_sum = 0.0;
77
- vec4 r = vec4(0.0,0.0,0.0,0.0);
78
- w = unpack_interpolate(kernel, vec2(0.500000+(x/2.0), index));
79
- w = w*kernel_scale + kernel_bias;
64
+ vec4 filter3D_radius1(sampler3D texture, sampler2D kernel, float index, vec3 uv, vec3 pixel) {
65
+ vec3 texel = uv / pixel - vec3(0.5);
66
+ vec3 f = fract(texel);
67
+ texel = (texel - fract(texel) + vec3(0.001)) * pixel;
68
+
69
+ vec4 t00 = filter1D_radius1(kernel, index, f.x,
70
+ texture3D(texture, texel + vec3(0, 0, 0) * pixel),
71
+ texture3D(texture, texel + vec3(1, 0, 0) * pixel));
72
+ vec4 t01 = filter1D_radius1(kernel, index, f.x,
73
+ texture3D(texture, texel + vec3(0, 1, 0) * pixel),
74
+ texture3D(texture, texel + vec3(1, 1, 0) * pixel));
75
+ vec4 t10 = filter1D_radius1(kernel, index, f.x,
76
+ texture3D(texture, texel + vec3(0, 0, 1) * pixel),
77
+ texture3D(texture, texel + vec3(1, 0, 1) * pixel));
78
+ vec4 t11 = filter1D_radius1(kernel, index, f.x,
79
+ texture3D(texture, texel + vec3(0, 1, 1) * pixel),
80
+ texture3D(texture, texel + vec3(1, 1, 1) * pixel));
81
+
82
+ vec4 t0 = filter1D_radius1(kernel, index, f.y, t00, t01);
83
+ vec4 t1 = filter1D_radius1(kernel, index, f.y, t10, t11);
84
+ return filter1D_radius1(kernel, index, f.z, t0, t1);
85
+ }
86
+
87
+ vec4 filter1D_radius2(sampler2D kernel, float index, float x, vec4 c0, vec4 c1, vec4 c2, vec4 c3) {
88
+ float w, w_sum = 0;
89
+ vec4 r = vec4(0);
90
+
91
+ w = unpack_interpolate(kernel, vec2(0.5 + (x / 2), index));
92
+ w = w * kernel_scale + kernel_bias;
80
93
  r += c0 * w;
81
- w = unpack_interpolate(kernel, vec2(0.500000-(x/2.0), index));
82
- w = w*kernel_scale + kernel_bias;
94
+ w = unpack_interpolate(kernel, vec2(0.5 - (x / 2), index));
95
+ w = w * kernel_scale + kernel_bias;
83
96
  r += c2 * w;
84
- w = unpack_interpolate(kernel, vec2(0.000000+(x/2.0), index));
85
- w = w*kernel_scale + kernel_bias;
97
+ w = unpack_interpolate(kernel, vec2(0.0 + (x / 2), index));
98
+ w = w * kernel_scale + kernel_bias;
86
99
  r += c1 * w;
87
- w = unpack_interpolate(kernel, vec2(1.000000-(x/2.0), index));
88
- w = w*kernel_scale + kernel_bias;
100
+ w = unpack_interpolate(kernel, vec2(1.0 - (x / 2), index));
101
+ w = w * kernel_scale + kernel_bias;
89
102
  r += c3 * w;
90
103
  return r;
91
104
  }
92
105
 
93
- vec4
94
- filter2D_radius2(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel)
95
- {
96
- vec2 texel = uv/pixel - vec2(0.5, 0.5) ;
106
+ vec4 filter2D_radius2(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel) {
107
+ vec2 texel = uv / pixel - vec2(0.5);
97
108
  vec2 f = fract(texel);
98
- texel = (texel-fract(texel) + vec2(0.001, 0.001)) * pixel;
109
+ texel = (texel - fract(texel) + vec2(0.001)) * pixel;
110
+
99
111
  vec4 t0 = filter1D_radius2(kernel, index, f.x,
100
- texture2D( texture, texel + vec2(-1, -1) * pixel),
101
- texture2D( texture, texel + vec2(0, -1) * pixel),
102
- texture2D( texture, texel + vec2(1, -1) * pixel),
103
- texture2D( texture, texel + vec2(2, -1) * pixel));
112
+ texture2D(texture, texel + vec2(-1, -1) * pixel),
113
+ texture2D(texture, texel + vec2(0, -1) * pixel),
114
+ texture2D(texture, texel + vec2(1, -1) * pixel),
115
+ texture2D(texture, texel + vec2(2, -1) * pixel));
104
116
  vec4 t1 = filter1D_radius2(kernel, index, f.x,
105
- texture2D( texture, texel + vec2(-1, 0) * pixel),
106
- texture2D( texture, texel + vec2(0, 0) * pixel),
107
- texture2D( texture, texel + vec2(1, 0) * pixel),
108
- texture2D( texture, texel + vec2(2, 0) * pixel));
117
+ texture2D(texture, texel + vec2(-1, 0) * pixel),
118
+ texture2D(texture, texel + vec2(0, 0) * pixel),
119
+ texture2D(texture, texel + vec2(1, 0) * pixel),
120
+ texture2D(texture, texel + vec2(2, 0) * pixel));
109
121
  vec4 t2 = filter1D_radius2(kernel, index, f.x,
110
- texture2D( texture, texel + vec2(-1, 1) * pixel),
111
- texture2D( texture, texel + vec2(0, 1) * pixel),
112
- texture2D( texture, texel + vec2(1, 1) * pixel),
113
- texture2D( texture, texel + vec2(2, 1) * pixel));
122
+ texture2D(texture, texel + vec2(-1, 1) * pixel),
123
+ texture2D(texture, texel + vec2(0, 1) * pixel),
124
+ texture2D(texture, texel + vec2(1, 1) * pixel),
125
+ texture2D(texture, texel + vec2(2, 1) * pixel));
114
126
  vec4 t3 = filter1D_radius2(kernel, index, f.x,
115
- texture2D( texture, texel + vec2(-1, 2) * pixel),
116
- texture2D( texture, texel + vec2(0, 2) * pixel),
117
- texture2D( texture, texel + vec2(1, 2) * pixel),
118
- texture2D( texture, texel + vec2(2, 2) * pixel));
127
+ texture2D(texture, texel + vec2(-1, 2) * pixel),
128
+ texture2D(texture, texel + vec2(0, 2) * pixel),
129
+ texture2D(texture, texel + vec2(1, 2) * pixel),
130
+ texture2D(texture, texel + vec2(2, 2) * pixel));
119
131
  return filter1D_radius2(kernel, index, f.y, t0, t1, t2, t3);
120
132
  }
121
133
 
122
- vec4
123
- filter1D_radius3( sampler2D kernel, float index, float x, vec4 c0, vec4 c1, vec4 c2, vec4 c3, vec4 c4, vec4 c5 )
124
- {
125
- float w, w_sum = 0.0;
126
- vec4 r = vec4(0.0,0.0,0.0,0.0);
127
- w = unpack_interpolate(kernel, vec2(0.666667+(x/3.0), index));
128
- w = w*kernel_scale + kernel_bias;
134
+ vec4 filter3D_radius2(sampler3D texture, sampler2D kernel, float index, vec3 uv, vec3 pixel) {
135
+ vec3 texel = uv / pixel - vec3(0.5);
136
+ vec3 f = fract(texel);
137
+ texel = (texel - fract(texel) + vec3(0.001)) * pixel;
138
+
139
+ vec4 t00 = filter1D_radius2(kernel, index, f.x,
140
+ texture3D(texture, texel + vec3(-1, -1, -1) * pixel),
141
+ texture3D(texture, texel + vec3(0, -1, -1) * pixel),
142
+ texture3D(texture, texel + vec3(1, -1, -1) * pixel),
143
+ texture3D(texture, texel + vec3(2, -1, -1) * pixel));
144
+ vec4 t01 = filter1D_radius2(kernel, index, f.x,
145
+ texture3D(texture, texel + vec3(-1, 0, -1) * pixel),
146
+ texture3D(texture, texel + vec3(0, 0, -1) * pixel),
147
+ texture3D(texture, texel + vec3(1, 0, -1) * pixel),
148
+ texture3D(texture, texel + vec3(2, 0, -1) * pixel));
149
+ vec4 t02 = filter1D_radius2(kernel, index, f.x,
150
+ texture3D(texture, texel + vec3(-1, 1, -1) * pixel),
151
+ texture3D(texture, texel + vec3(0, 1, -1) * pixel),
152
+ texture3D(texture, texel + vec3(1, 1, -1) * pixel),
153
+ texture3D(texture, texel + vec3(2, 1, -1) * pixel));
154
+ vec4 t03 = filter1D_radius2(kernel, index, f.x,
155
+ texture3D(texture, texel + vec3(-1, 2, -1) * pixel),
156
+ texture3D(texture, texel + vec3(0, 2, -1) * pixel),
157
+ texture3D(texture, texel + vec3(1, 2, -1) * pixel),
158
+ texture3D(texture, texel + vec3(2, 2, -1) * pixel));
159
+ vec4 t10 = filter1D_radius2(kernel, index, f.x,
160
+ texture3D(texture, texel + vec3(-1, -1, 0) * pixel),
161
+ texture3D(texture, texel + vec3(0, -1, 0) * pixel),
162
+ texture3D(texture, texel + vec3(1, -1, 0) * pixel),
163
+ texture3D(texture, texel + vec3(2, -1, 0) * pixel));
164
+ vec4 t11 = filter1D_radius2(kernel, index, f.x,
165
+ texture3D(texture, texel + vec3(-1, 0, 0) * pixel),
166
+ texture3D(texture, texel + vec3(0, 0, 0) * pixel),
167
+ texture3D(texture, texel + vec3(1, 0, 0) * pixel),
168
+ texture3D(texture, texel + vec3(2, 0, 0) * pixel));
169
+ vec4 t12 = filter1D_radius2(kernel, index, f.x,
170
+ texture3D(texture, texel + vec3(-1, 1, 0) * pixel),
171
+ texture3D(texture, texel + vec3(0, 1, 0) * pixel),
172
+ texture3D(texture, texel + vec3(1, 1, 0) * pixel),
173
+ texture3D(texture, texel + vec3(2, 1, 0) * pixel));
174
+ vec4 t13 = filter1D_radius2(kernel, index, f.x,
175
+ texture3D(texture, texel + vec3(-1, 2, 0) * pixel),
176
+ texture3D(texture, texel + vec3(0, 2, 0) * pixel),
177
+ texture3D(texture, texel + vec3(1, 2, 0) * pixel),
178
+ texture3D(texture, texel + vec3(2, 2, 0) * pixel));
179
+ vec4 t20 = filter1D_radius2(kernel, index, f.x,
180
+ texture3D(texture, texel + vec3(-1, -1, 1) * pixel),
181
+ texture3D(texture, texel + vec3(0, -1, 1) * pixel),
182
+ texture3D(texture, texel + vec3(1, -1, 1) * pixel),
183
+ texture3D(texture, texel + vec3(2, -1, 1) * pixel));
184
+ vec4 t21 = filter1D_radius2(kernel, index, f.x,
185
+ texture3D(texture, texel + vec3(-1, 0, 1) * pixel),
186
+ texture3D(texture, texel + vec3(0, 0, 1) * pixel),
187
+ texture3D(texture, texel + vec3(1, 0, 1) * pixel),
188
+ texture3D(texture, texel + vec3(2, 0, 1) * pixel));
189
+ vec4 t22 = filter1D_radius2(kernel, index, f.x,
190
+ texture3D(texture, texel + vec3(-1, 1, 1) * pixel),
191
+ texture3D(texture, texel + vec3(0, 1, 1) * pixel),
192
+ texture3D(texture, texel + vec3(1, 1, 1) * pixel),
193
+ texture3D(texture, texel + vec3(2, 1, 1) * pixel));
194
+ vec4 t23 = filter1D_radius2(kernel, index, f.x,
195
+ texture3D(texture, texel + vec3(-1, 2, 1) * pixel),
196
+ texture3D(texture, texel + vec3(0, 2, 1) * pixel),
197
+ texture3D(texture, texel + vec3(1, 2, 1) * pixel),
198
+ texture3D(texture, texel + vec3(2, 2, 1) * pixel));
199
+ vec4 t30 = filter1D_radius2(kernel, index, f.x,
200
+ texture3D(texture, texel + vec3(-1, -1, 2) * pixel),
201
+ texture3D(texture, texel + vec3(0, -1, 2) * pixel),
202
+ texture3D(texture, texel + vec3(1, -1, 2) * pixel),
203
+ texture3D(texture, texel + vec3(2, -1, 2) * pixel));
204
+ vec4 t31 = filter1D_radius2(kernel, index, f.x,
205
+ texture3D(texture, texel + vec3(-1, 0, 2) * pixel),
206
+ texture3D(texture, texel + vec3(0, 0, 2) * pixel),
207
+ texture3D(texture, texel + vec3(1, 0, 2) * pixel),
208
+ texture3D(texture, texel + vec3(2, 0, 2) * pixel));
209
+ vec4 t32 = filter1D_radius2(kernel, index, f.x,
210
+ texture3D(texture, texel + vec3(-1, 1, 2) * pixel),
211
+ texture3D(texture, texel + vec3(0, 1, 2) * pixel),
212
+ texture3D(texture, texel + vec3(1, 1, 2) * pixel),
213
+ texture3D(texture, texel + vec3(2, 1, 2) * pixel));
214
+ vec4 t33 = filter1D_radius2(kernel, index, f.x,
215
+ texture3D(texture, texel + vec3(-1, 2, 2) * pixel),
216
+ texture3D(texture, texel + vec3(0, 2, 2) * pixel),
217
+ texture3D(texture, texel + vec3(1, 2, 2) * pixel),
218
+ texture3D(texture, texel + vec3(2, 2, 2) * pixel));
219
+
220
+ vec4 t0 = filter1D_radius2(kernel, index, f.y, t00, t01, t02, t03);
221
+ vec4 t1 = filter1D_radius2(kernel, index, f.y, t10, t11, t12, t13);
222
+ vec4 t2 = filter1D_radius2(kernel, index, f.y, t20, t21, t22, t23);
223
+ vec4 t3 = filter1D_radius2(kernel, index, f.y, t30, t31, t32, t33);
224
+ return filter1D_radius2(kernel, index, f.z, t0, t1, t2, t3);
225
+ }
226
+
227
+ vec4 filter1D_radius3(sampler2D kernel, float index, float x, vec4 c0, vec4 c1, vec4 c2, vec4 c3, vec4 c4, vec4 c5) {
228
+ float w, w_sum = 0;
229
+ vec4 r = vec4(0);
230
+
231
+ w = unpack_interpolate(kernel, vec2(0.6666666666666667 + (x / 3), index));
232
+ w = w * kernel_scale + kernel_bias;
129
233
  r += c0 * w;
130
- w = unpack_interpolate(kernel, vec2(0.333333-(x/3.0), index));
131
- w = w*kernel_scale + kernel_bias;
234
+ w = unpack_interpolate(kernel, vec2(0.3333333333333333 - (x / 3), index));
235
+ w = w * kernel_scale + kernel_bias;
132
236
  r += c3 * w;
133
- w = unpack_interpolate(kernel, vec2(0.333333+(x/3.0), index));
134
- w = w*kernel_scale + kernel_bias;
237
+ w = unpack_interpolate(kernel, vec2(0.33333333333333337 + (x / 3), index));
238
+ w = w * kernel_scale + kernel_bias;
135
239
  r += c1 * w;
136
- w = unpack_interpolate(kernel, vec2(0.666667-(x/3.0), index));
137
- w = w*kernel_scale + kernel_bias;
240
+ w = unpack_interpolate(kernel, vec2(0.6666666666666666 - (x / 3), index));
241
+ w = w * kernel_scale + kernel_bias;
138
242
  r += c4 * w;
139
- w = unpack_interpolate(kernel, vec2(0.000000+(x/3.0), index));
140
- w = w*kernel_scale + kernel_bias;
243
+ w = unpack_interpolate(kernel, vec2(0.0 + (x / 3), index));
244
+ w = w * kernel_scale + kernel_bias;
141
245
  r += c2 * w;
142
- w = unpack_interpolate(kernel, vec2(1.000000-(x/3.0), index));
143
- w = w*kernel_scale + kernel_bias;
246
+ w = unpack_interpolate(kernel, vec2(1.0 - (x / 3), index));
247
+ w = w * kernel_scale + kernel_bias;
144
248
  r += c5 * w;
145
249
  return r;
146
250
  }
147
251
 
148
- vec4
149
- filter2D_radius3(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel)
150
- {
151
- vec2 texel = uv/pixel - vec2(0.5, 0.5) ;
252
+ vec4 filter2D_radius3(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel) {
253
+ vec2 texel = uv / pixel - vec2(0.5);
152
254
  vec2 f = fract(texel);
153
- texel = (texel-fract(texel) + vec2(0.001, 0.001)) * pixel;
255
+ texel = (texel - fract(texel) + vec2(0.001)) * pixel;
256
+
154
257
  vec4 t0 = filter1D_radius3(kernel, index, f.x,
155
- texture2D( texture, texel + vec2(-2, -2) * pixel),
156
- texture2D( texture, texel + vec2(-1, -2) * pixel),
157
- texture2D( texture, texel + vec2(0, -2) * pixel),
158
- texture2D( texture, texel + vec2(1, -2) * pixel),
159
- texture2D( texture, texel + vec2(2, -2) * pixel),
160
- texture2D( texture, texel + vec2(3, -2) * pixel));
258
+ texture2D(texture, texel + vec2(-2, -2) * pixel),
259
+ texture2D(texture, texel + vec2(-1, -2) * pixel),
260
+ texture2D(texture, texel + vec2(0, -2) * pixel),
261
+ texture2D(texture, texel + vec2(1, -2) * pixel),
262
+ texture2D(texture, texel + vec2(2, -2) * pixel),
263
+ texture2D(texture, texel + vec2(3, -2) * pixel));
161
264
  vec4 t1 = filter1D_radius3(kernel, index, f.x,
162
- texture2D( texture, texel + vec2(-2, -1) * pixel),
163
- texture2D( texture, texel + vec2(-1, -1) * pixel),
164
- texture2D( texture, texel + vec2(0, -1) * pixel),
165
- texture2D( texture, texel + vec2(1, -1) * pixel),
166
- texture2D( texture, texel + vec2(2, -1) * pixel),
167
- texture2D( texture, texel + vec2(3, -1) * pixel));
265
+ texture2D(texture, texel + vec2(-2, -1) * pixel),
266
+ texture2D(texture, texel + vec2(-1, -1) * pixel),
267
+ texture2D(texture, texel + vec2(0, -1) * pixel),
268
+ texture2D(texture, texel + vec2(1, -1) * pixel),
269
+ texture2D(texture, texel + vec2(2, -1) * pixel),
270
+ texture2D(texture, texel + vec2(3, -1) * pixel));
168
271
  vec4 t2 = filter1D_radius3(kernel, index, f.x,
169
- texture2D( texture, texel + vec2(-2, 0) * pixel),
170
- texture2D( texture, texel + vec2(-1, 0) * pixel),
171
- texture2D( texture, texel + vec2(0, 0) * pixel),
172
- texture2D( texture, texel + vec2(1, 0) * pixel),
173
- texture2D( texture, texel + vec2(2, 0) * pixel),
174
- texture2D( texture, texel + vec2(3, 0) * pixel));
272
+ texture2D(texture, texel + vec2(-2, 0) * pixel),
273
+ texture2D(texture, texel + vec2(-1, 0) * pixel),
274
+ texture2D(texture, texel + vec2(0, 0) * pixel),
275
+ texture2D(texture, texel + vec2(1, 0) * pixel),
276
+ texture2D(texture, texel + vec2(2, 0) * pixel),
277
+ texture2D(texture, texel + vec2(3, 0) * pixel));
175
278
  vec4 t3 = filter1D_radius3(kernel, index, f.x,
176
- texture2D( texture, texel + vec2(-2, 1) * pixel),
177
- texture2D( texture, texel + vec2(-1, 1) * pixel),
178
- texture2D( texture, texel + vec2(0, 1) * pixel),
179
- texture2D( texture, texel + vec2(1, 1) * pixel),
180
- texture2D( texture, texel + vec2(2, 1) * pixel),
181
- texture2D( texture, texel + vec2(3, 1) * pixel));
279
+ texture2D(texture, texel + vec2(-2, 1) * pixel),
280
+ texture2D(texture, texel + vec2(-1, 1) * pixel),
281
+ texture2D(texture, texel + vec2(0, 1) * pixel),
282
+ texture2D(texture, texel + vec2(1, 1) * pixel),
283
+ texture2D(texture, texel + vec2(2, 1) * pixel),
284
+ texture2D(texture, texel + vec2(3, 1) * pixel));
182
285
  vec4 t4 = filter1D_radius3(kernel, index, f.x,
183
- texture2D( texture, texel + vec2(-2, 2) * pixel),
184
- texture2D( texture, texel + vec2(-1, 2) * pixel),
185
- texture2D( texture, texel + vec2(0, 2) * pixel),
186
- texture2D( texture, texel + vec2(1, 2) * pixel),
187
- texture2D( texture, texel + vec2(2, 2) * pixel),
188
- texture2D( texture, texel + vec2(3, 2) * pixel));
286
+ texture2D(texture, texel + vec2(-2, 2) * pixel),
287
+ texture2D(texture, texel + vec2(-1, 2) * pixel),
288
+ texture2D(texture, texel + vec2(0, 2) * pixel),
289
+ texture2D(texture, texel + vec2(1, 2) * pixel),
290
+ texture2D(texture, texel + vec2(2, 2) * pixel),
291
+ texture2D(texture, texel + vec2(3, 2) * pixel));
189
292
  vec4 t5 = filter1D_radius3(kernel, index, f.x,
190
- texture2D( texture, texel + vec2(-2, 3) * pixel),
191
- texture2D( texture, texel + vec2(-1, 3) * pixel),
192
- texture2D( texture, texel + vec2(0, 3) * pixel),
193
- texture2D( texture, texel + vec2(1, 3) * pixel),
194
- texture2D( texture, texel + vec2(2, 3) * pixel),
195
- texture2D( texture, texel + vec2(3, 3) * pixel));
293
+ texture2D(texture, texel + vec2(-2, 3) * pixel),
294
+ texture2D(texture, texel + vec2(-1, 3) * pixel),
295
+ texture2D(texture, texel + vec2(0, 3) * pixel),
296
+ texture2D(texture, texel + vec2(1, 3) * pixel),
297
+ texture2D(texture, texel + vec2(2, 3) * pixel),
298
+ texture2D(texture, texel + vec2(3, 3) * pixel));
196
299
  return filter1D_radius3(kernel, index, f.y, t0, t1, t2, t3, t4, t5);
197
300
  }
198
301
 
199
- vec4
200
- filter1D_radius4( sampler2D kernel, float index, float x, vec4 c0, vec4 c1, vec4 c2, vec4 c3, vec4 c4, vec4 c5, vec4 c6, vec4 c7 )
201
- {
202
- float w, w_sum = 0.0;
203
- vec4 r = vec4(0.0,0.0,0.0,0.0);
204
- w = unpack_interpolate(kernel, vec2(0.750000+(x/4.0), index));
205
- w = w*kernel_scale + kernel_bias;
302
+ vec4 filter3D_radius3(sampler3D texture, sampler2D kernel, float index, vec3 uv, vec3 pixel) {
303
+ vec3 texel = uv / pixel - vec3(0.5);
304
+ vec3 f = fract(texel);
305
+ texel = (texel - fract(texel) + vec3(0.001)) * pixel;
306
+
307
+ vec4 t00 = filter1D_radius3(kernel, index, f.x,
308
+ texture3D(texture, texel + vec3(-2, -2, -2) * pixel),
309
+ texture3D(texture, texel + vec3(-1, -2, -2) * pixel),
310
+ texture3D(texture, texel + vec3(0, -2, -2) * pixel),
311
+ texture3D(texture, texel + vec3(1, -2, -2) * pixel),
312
+ texture3D(texture, texel + vec3(2, -2, -2) * pixel),
313
+ texture3D(texture, texel + vec3(3, -2, -2) * pixel));
314
+ vec4 t01 = filter1D_radius3(kernel, index, f.x,
315
+ texture3D(texture, texel + vec3(-2, -1, -2) * pixel),
316
+ texture3D(texture, texel + vec3(-1, -1, -2) * pixel),
317
+ texture3D(texture, texel + vec3(0, -1, -2) * pixel),
318
+ texture3D(texture, texel + vec3(1, -1, -2) * pixel),
319
+ texture3D(texture, texel + vec3(2, -1, -2) * pixel),
320
+ texture3D(texture, texel + vec3(3, -1, -2) * pixel));
321
+ vec4 t02 = filter1D_radius3(kernel, index, f.x,
322
+ texture3D(texture, texel + vec3(-2, 0, -2) * pixel),
323
+ texture3D(texture, texel + vec3(-1, 0, -2) * pixel),
324
+ texture3D(texture, texel + vec3(0, 0, -2) * pixel),
325
+ texture3D(texture, texel + vec3(1, 0, -2) * pixel),
326
+ texture3D(texture, texel + vec3(2, 0, -2) * pixel),
327
+ texture3D(texture, texel + vec3(3, 0, -2) * pixel));
328
+ vec4 t03 = filter1D_radius3(kernel, index, f.x,
329
+ texture3D(texture, texel + vec3(-2, 1, -2) * pixel),
330
+ texture3D(texture, texel + vec3(-1, 1, -2) * pixel),
331
+ texture3D(texture, texel + vec3(0, 1, -2) * pixel),
332
+ texture3D(texture, texel + vec3(1, 1, -2) * pixel),
333
+ texture3D(texture, texel + vec3(2, 1, -2) * pixel),
334
+ texture3D(texture, texel + vec3(3, 1, -2) * pixel));
335
+ vec4 t04 = filter1D_radius3(kernel, index, f.x,
336
+ texture3D(texture, texel + vec3(-2, 2, -2) * pixel),
337
+ texture3D(texture, texel + vec3(-1, 2, -2) * pixel),
338
+ texture3D(texture, texel + vec3(0, 2, -2) * pixel),
339
+ texture3D(texture, texel + vec3(1, 2, -2) * pixel),
340
+ texture3D(texture, texel + vec3(2, 2, -2) * pixel),
341
+ texture3D(texture, texel + vec3(3, 2, -2) * pixel));
342
+ vec4 t05 = filter1D_radius3(kernel, index, f.x,
343
+ texture3D(texture, texel + vec3(-2, 3, -2) * pixel),
344
+ texture3D(texture, texel + vec3(-1, 3, -2) * pixel),
345
+ texture3D(texture, texel + vec3(0, 3, -2) * pixel),
346
+ texture3D(texture, texel + vec3(1, 3, -2) * pixel),
347
+ texture3D(texture, texel + vec3(2, 3, -2) * pixel),
348
+ texture3D(texture, texel + vec3(3, 3, -2) * pixel));
349
+ vec4 t10 = filter1D_radius3(kernel, index, f.x,
350
+ texture3D(texture, texel + vec3(-2, -2, -1) * pixel),
351
+ texture3D(texture, texel + vec3(-1, -2, -1) * pixel),
352
+ texture3D(texture, texel + vec3(0, -2, -1) * pixel),
353
+ texture3D(texture, texel + vec3(1, -2, -1) * pixel),
354
+ texture3D(texture, texel + vec3(2, -2, -1) * pixel),
355
+ texture3D(texture, texel + vec3(3, -2, -1) * pixel));
356
+ vec4 t11 = filter1D_radius3(kernel, index, f.x,
357
+ texture3D(texture, texel + vec3(-2, -1, -1) * pixel),
358
+ texture3D(texture, texel + vec3(-1, -1, -1) * pixel),
359
+ texture3D(texture, texel + vec3(0, -1, -1) * pixel),
360
+ texture3D(texture, texel + vec3(1, -1, -1) * pixel),
361
+ texture3D(texture, texel + vec3(2, -1, -1) * pixel),
362
+ texture3D(texture, texel + vec3(3, -1, -1) * pixel));
363
+ vec4 t12 = filter1D_radius3(kernel, index, f.x,
364
+ texture3D(texture, texel + vec3(-2, 0, -1) * pixel),
365
+ texture3D(texture, texel + vec3(-1, 0, -1) * pixel),
366
+ texture3D(texture, texel + vec3(0, 0, -1) * pixel),
367
+ texture3D(texture, texel + vec3(1, 0, -1) * pixel),
368
+ texture3D(texture, texel + vec3(2, 0, -1) * pixel),
369
+ texture3D(texture, texel + vec3(3, 0, -1) * pixel));
370
+ vec4 t13 = filter1D_radius3(kernel, index, f.x,
371
+ texture3D(texture, texel + vec3(-2, 1, -1) * pixel),
372
+ texture3D(texture, texel + vec3(-1, 1, -1) * pixel),
373
+ texture3D(texture, texel + vec3(0, 1, -1) * pixel),
374
+ texture3D(texture, texel + vec3(1, 1, -1) * pixel),
375
+ texture3D(texture, texel + vec3(2, 1, -1) * pixel),
376
+ texture3D(texture, texel + vec3(3, 1, -1) * pixel));
377
+ vec4 t14 = filter1D_radius3(kernel, index, f.x,
378
+ texture3D(texture, texel + vec3(-2, 2, -1) * pixel),
379
+ texture3D(texture, texel + vec3(-1, 2, -1) * pixel),
380
+ texture3D(texture, texel + vec3(0, 2, -1) * pixel),
381
+ texture3D(texture, texel + vec3(1, 2, -1) * pixel),
382
+ texture3D(texture, texel + vec3(2, 2, -1) * pixel),
383
+ texture3D(texture, texel + vec3(3, 2, -1) * pixel));
384
+ vec4 t15 = filter1D_radius3(kernel, index, f.x,
385
+ texture3D(texture, texel + vec3(-2, 3, -1) * pixel),
386
+ texture3D(texture, texel + vec3(-1, 3, -1) * pixel),
387
+ texture3D(texture, texel + vec3(0, 3, -1) * pixel),
388
+ texture3D(texture, texel + vec3(1, 3, -1) * pixel),
389
+ texture3D(texture, texel + vec3(2, 3, -1) * pixel),
390
+ texture3D(texture, texel + vec3(3, 3, -1) * pixel));
391
+ vec4 t20 = filter1D_radius3(kernel, index, f.x,
392
+ texture3D(texture, texel + vec3(-2, -2, 0) * pixel),
393
+ texture3D(texture, texel + vec3(-1, -2, 0) * pixel),
394
+ texture3D(texture, texel + vec3(0, -2, 0) * pixel),
395
+ texture3D(texture, texel + vec3(1, -2, 0) * pixel),
396
+ texture3D(texture, texel + vec3(2, -2, 0) * pixel),
397
+ texture3D(texture, texel + vec3(3, -2, 0) * pixel));
398
+ vec4 t21 = filter1D_radius3(kernel, index, f.x,
399
+ texture3D(texture, texel + vec3(-2, -1, 0) * pixel),
400
+ texture3D(texture, texel + vec3(-1, -1, 0) * pixel),
401
+ texture3D(texture, texel + vec3(0, -1, 0) * pixel),
402
+ texture3D(texture, texel + vec3(1, -1, 0) * pixel),
403
+ texture3D(texture, texel + vec3(2, -1, 0) * pixel),
404
+ texture3D(texture, texel + vec3(3, -1, 0) * pixel));
405
+ vec4 t22 = filter1D_radius3(kernel, index, f.x,
406
+ texture3D(texture, texel + vec3(-2, 0, 0) * pixel),
407
+ texture3D(texture, texel + vec3(-1, 0, 0) * pixel),
408
+ texture3D(texture, texel + vec3(0, 0, 0) * pixel),
409
+ texture3D(texture, texel + vec3(1, 0, 0) * pixel),
410
+ texture3D(texture, texel + vec3(2, 0, 0) * pixel),
411
+ texture3D(texture, texel + vec3(3, 0, 0) * pixel));
412
+ vec4 t23 = filter1D_radius3(kernel, index, f.x,
413
+ texture3D(texture, texel + vec3(-2, 1, 0) * pixel),
414
+ texture3D(texture, texel + vec3(-1, 1, 0) * pixel),
415
+ texture3D(texture, texel + vec3(0, 1, 0) * pixel),
416
+ texture3D(texture, texel + vec3(1, 1, 0) * pixel),
417
+ texture3D(texture, texel + vec3(2, 1, 0) * pixel),
418
+ texture3D(texture, texel + vec3(3, 1, 0) * pixel));
419
+ vec4 t24 = filter1D_radius3(kernel, index, f.x,
420
+ texture3D(texture, texel + vec3(-2, 2, 0) * pixel),
421
+ texture3D(texture, texel + vec3(-1, 2, 0) * pixel),
422
+ texture3D(texture, texel + vec3(0, 2, 0) * pixel),
423
+ texture3D(texture, texel + vec3(1, 2, 0) * pixel),
424
+ texture3D(texture, texel + vec3(2, 2, 0) * pixel),
425
+ texture3D(texture, texel + vec3(3, 2, 0) * pixel));
426
+ vec4 t25 = filter1D_radius3(kernel, index, f.x,
427
+ texture3D(texture, texel + vec3(-2, 3, 0) * pixel),
428
+ texture3D(texture, texel + vec3(-1, 3, 0) * pixel),
429
+ texture3D(texture, texel + vec3(0, 3, 0) * pixel),
430
+ texture3D(texture, texel + vec3(1, 3, 0) * pixel),
431
+ texture3D(texture, texel + vec3(2, 3, 0) * pixel),
432
+ texture3D(texture, texel + vec3(3, 3, 0) * pixel));
433
+ vec4 t30 = filter1D_radius3(kernel, index, f.x,
434
+ texture3D(texture, texel + vec3(-2, -2, 1) * pixel),
435
+ texture3D(texture, texel + vec3(-1, -2, 1) * pixel),
436
+ texture3D(texture, texel + vec3(0, -2, 1) * pixel),
437
+ texture3D(texture, texel + vec3(1, -2, 1) * pixel),
438
+ texture3D(texture, texel + vec3(2, -2, 1) * pixel),
439
+ texture3D(texture, texel + vec3(3, -2, 1) * pixel));
440
+ vec4 t31 = filter1D_radius3(kernel, index, f.x,
441
+ texture3D(texture, texel + vec3(-2, -1, 1) * pixel),
442
+ texture3D(texture, texel + vec3(-1, -1, 1) * pixel),
443
+ texture3D(texture, texel + vec3(0, -1, 1) * pixel),
444
+ texture3D(texture, texel + vec3(1, -1, 1) * pixel),
445
+ texture3D(texture, texel + vec3(2, -1, 1) * pixel),
446
+ texture3D(texture, texel + vec3(3, -1, 1) * pixel));
447
+ vec4 t32 = filter1D_radius3(kernel, index, f.x,
448
+ texture3D(texture, texel + vec3(-2, 0, 1) * pixel),
449
+ texture3D(texture, texel + vec3(-1, 0, 1) * pixel),
450
+ texture3D(texture, texel + vec3(0, 0, 1) * pixel),
451
+ texture3D(texture, texel + vec3(1, 0, 1) * pixel),
452
+ texture3D(texture, texel + vec3(2, 0, 1) * pixel),
453
+ texture3D(texture, texel + vec3(3, 0, 1) * pixel));
454
+ vec4 t33 = filter1D_radius3(kernel, index, f.x,
455
+ texture3D(texture, texel + vec3(-2, 1, 1) * pixel),
456
+ texture3D(texture, texel + vec3(-1, 1, 1) * pixel),
457
+ texture3D(texture, texel + vec3(0, 1, 1) * pixel),
458
+ texture3D(texture, texel + vec3(1, 1, 1) * pixel),
459
+ texture3D(texture, texel + vec3(2, 1, 1) * pixel),
460
+ texture3D(texture, texel + vec3(3, 1, 1) * pixel));
461
+ vec4 t34 = filter1D_radius3(kernel, index, f.x,
462
+ texture3D(texture, texel + vec3(-2, 2, 1) * pixel),
463
+ texture3D(texture, texel + vec3(-1, 2, 1) * pixel),
464
+ texture3D(texture, texel + vec3(0, 2, 1) * pixel),
465
+ texture3D(texture, texel + vec3(1, 2, 1) * pixel),
466
+ texture3D(texture, texel + vec3(2, 2, 1) * pixel),
467
+ texture3D(texture, texel + vec3(3, 2, 1) * pixel));
468
+ vec4 t35 = filter1D_radius3(kernel, index, f.x,
469
+ texture3D(texture, texel + vec3(-2, 3, 1) * pixel),
470
+ texture3D(texture, texel + vec3(-1, 3, 1) * pixel),
471
+ texture3D(texture, texel + vec3(0, 3, 1) * pixel),
472
+ texture3D(texture, texel + vec3(1, 3, 1) * pixel),
473
+ texture3D(texture, texel + vec3(2, 3, 1) * pixel),
474
+ texture3D(texture, texel + vec3(3, 3, 1) * pixel));
475
+ vec4 t40 = filter1D_radius3(kernel, index, f.x,
476
+ texture3D(texture, texel + vec3(-2, -2, 2) * pixel),
477
+ texture3D(texture, texel + vec3(-1, -2, 2) * pixel),
478
+ texture3D(texture, texel + vec3(0, -2, 2) * pixel),
479
+ texture3D(texture, texel + vec3(1, -2, 2) * pixel),
480
+ texture3D(texture, texel + vec3(2, -2, 2) * pixel),
481
+ texture3D(texture, texel + vec3(3, -2, 2) * pixel));
482
+ vec4 t41 = filter1D_radius3(kernel, index, f.x,
483
+ texture3D(texture, texel + vec3(-2, -1, 2) * pixel),
484
+ texture3D(texture, texel + vec3(-1, -1, 2) * pixel),
485
+ texture3D(texture, texel + vec3(0, -1, 2) * pixel),
486
+ texture3D(texture, texel + vec3(1, -1, 2) * pixel),
487
+ texture3D(texture, texel + vec3(2, -1, 2) * pixel),
488
+ texture3D(texture, texel + vec3(3, -1, 2) * pixel));
489
+ vec4 t42 = filter1D_radius3(kernel, index, f.x,
490
+ texture3D(texture, texel + vec3(-2, 0, 2) * pixel),
491
+ texture3D(texture, texel + vec3(-1, 0, 2) * pixel),
492
+ texture3D(texture, texel + vec3(0, 0, 2) * pixel),
493
+ texture3D(texture, texel + vec3(1, 0, 2) * pixel),
494
+ texture3D(texture, texel + vec3(2, 0, 2) * pixel),
495
+ texture3D(texture, texel + vec3(3, 0, 2) * pixel));
496
+ vec4 t43 = filter1D_radius3(kernel, index, f.x,
497
+ texture3D(texture, texel + vec3(-2, 1, 2) * pixel),
498
+ texture3D(texture, texel + vec3(-1, 1, 2) * pixel),
499
+ texture3D(texture, texel + vec3(0, 1, 2) * pixel),
500
+ texture3D(texture, texel + vec3(1, 1, 2) * pixel),
501
+ texture3D(texture, texel + vec3(2, 1, 2) * pixel),
502
+ texture3D(texture, texel + vec3(3, 1, 2) * pixel));
503
+ vec4 t44 = filter1D_radius3(kernel, index, f.x,
504
+ texture3D(texture, texel + vec3(-2, 2, 2) * pixel),
505
+ texture3D(texture, texel + vec3(-1, 2, 2) * pixel),
506
+ texture3D(texture, texel + vec3(0, 2, 2) * pixel),
507
+ texture3D(texture, texel + vec3(1, 2, 2) * pixel),
508
+ texture3D(texture, texel + vec3(2, 2, 2) * pixel),
509
+ texture3D(texture, texel + vec3(3, 2, 2) * pixel));
510
+ vec4 t45 = filter1D_radius3(kernel, index, f.x,
511
+ texture3D(texture, texel + vec3(-2, 3, 2) * pixel),
512
+ texture3D(texture, texel + vec3(-1, 3, 2) * pixel),
513
+ texture3D(texture, texel + vec3(0, 3, 2) * pixel),
514
+ texture3D(texture, texel + vec3(1, 3, 2) * pixel),
515
+ texture3D(texture, texel + vec3(2, 3, 2) * pixel),
516
+ texture3D(texture, texel + vec3(3, 3, 2) * pixel));
517
+ vec4 t50 = filter1D_radius3(kernel, index, f.x,
518
+ texture3D(texture, texel + vec3(-2, -2, 3) * pixel),
519
+ texture3D(texture, texel + vec3(-1, -2, 3) * pixel),
520
+ texture3D(texture, texel + vec3(0, -2, 3) * pixel),
521
+ texture3D(texture, texel + vec3(1, -2, 3) * pixel),
522
+ texture3D(texture, texel + vec3(2, -2, 3) * pixel),
523
+ texture3D(texture, texel + vec3(3, -2, 3) * pixel));
524
+ vec4 t51 = filter1D_radius3(kernel, index, f.x,
525
+ texture3D(texture, texel + vec3(-2, -1, 3) * pixel),
526
+ texture3D(texture, texel + vec3(-1, -1, 3) * pixel),
527
+ texture3D(texture, texel + vec3(0, -1, 3) * pixel),
528
+ texture3D(texture, texel + vec3(1, -1, 3) * pixel),
529
+ texture3D(texture, texel + vec3(2, -1, 3) * pixel),
530
+ texture3D(texture, texel + vec3(3, -1, 3) * pixel));
531
+ vec4 t52 = filter1D_radius3(kernel, index, f.x,
532
+ texture3D(texture, texel + vec3(-2, 0, 3) * pixel),
533
+ texture3D(texture, texel + vec3(-1, 0, 3) * pixel),
534
+ texture3D(texture, texel + vec3(0, 0, 3) * pixel),
535
+ texture3D(texture, texel + vec3(1, 0, 3) * pixel),
536
+ texture3D(texture, texel + vec3(2, 0, 3) * pixel),
537
+ texture3D(texture, texel + vec3(3, 0, 3) * pixel));
538
+ vec4 t53 = filter1D_radius3(kernel, index, f.x,
539
+ texture3D(texture, texel + vec3(-2, 1, 3) * pixel),
540
+ texture3D(texture, texel + vec3(-1, 1, 3) * pixel),
541
+ texture3D(texture, texel + vec3(0, 1, 3) * pixel),
542
+ texture3D(texture, texel + vec3(1, 1, 3) * pixel),
543
+ texture3D(texture, texel + vec3(2, 1, 3) * pixel),
544
+ texture3D(texture, texel + vec3(3, 1, 3) * pixel));
545
+ vec4 t54 = filter1D_radius3(kernel, index, f.x,
546
+ texture3D(texture, texel + vec3(-2, 2, 3) * pixel),
547
+ texture3D(texture, texel + vec3(-1, 2, 3) * pixel),
548
+ texture3D(texture, texel + vec3(0, 2, 3) * pixel),
549
+ texture3D(texture, texel + vec3(1, 2, 3) * pixel),
550
+ texture3D(texture, texel + vec3(2, 2, 3) * pixel),
551
+ texture3D(texture, texel + vec3(3, 2, 3) * pixel));
552
+ vec4 t55 = filter1D_radius3(kernel, index, f.x,
553
+ texture3D(texture, texel + vec3(-2, 3, 3) * pixel),
554
+ texture3D(texture, texel + vec3(-1, 3, 3) * pixel),
555
+ texture3D(texture, texel + vec3(0, 3, 3) * pixel),
556
+ texture3D(texture, texel + vec3(1, 3, 3) * pixel),
557
+ texture3D(texture, texel + vec3(2, 3, 3) * pixel),
558
+ texture3D(texture, texel + vec3(3, 3, 3) * pixel));
559
+
560
+ vec4 t0 = filter1D_radius3(kernel, index, f.y, t00, t01, t02, t03, t04, t05);
561
+ vec4 t1 = filter1D_radius3(kernel, index, f.y, t10, t11, t12, t13, t14, t15);
562
+ vec4 t2 = filter1D_radius3(kernel, index, f.y, t20, t21, t22, t23, t24, t25);
563
+ vec4 t3 = filter1D_radius3(kernel, index, f.y, t30, t31, t32, t33, t34, t35);
564
+ vec4 t4 = filter1D_radius3(kernel, index, f.y, t40, t41, t42, t43, t44, t45);
565
+ vec4 t5 = filter1D_radius3(kernel, index, f.y, t50, t51, t52, t53, t54, t55);
566
+ return filter1D_radius3(kernel, index, f.z, t0, t1, t2, t3, t4, t5);
567
+ }
568
+
569
+ vec4 filter1D_radius4(sampler2D kernel, float index, float x, vec4 c0, vec4 c1, vec4 c2, vec4 c3, vec4 c4, vec4 c5, vec4 c6, vec4 c7) {
570
+ float w, w_sum = 0;
571
+ vec4 r = vec4(0);
572
+
573
+ w = unpack_interpolate(kernel, vec2(0.75 + (x / 4), index));
574
+ w = w * kernel_scale + kernel_bias;
206
575
  r += c0 * w;
207
- w = unpack_interpolate(kernel, vec2(0.250000-(x/4.0), index));
208
- w = w*kernel_scale + kernel_bias;
576
+ w = unpack_interpolate(kernel, vec2(0.25 - (x / 4), index));
577
+ w = w * kernel_scale + kernel_bias;
209
578
  r += c4 * w;
210
- w = unpack_interpolate(kernel, vec2(0.500000+(x/4.0), index));
211
- w = w*kernel_scale + kernel_bias;
579
+ w = unpack_interpolate(kernel, vec2(0.5 + (x / 4), index));
580
+ w = w * kernel_scale + kernel_bias;
212
581
  r += c1 * w;
213
- w = unpack_interpolate(kernel, vec2(0.500000-(x/4.0), index));
214
- w = w*kernel_scale + kernel_bias;
582
+ w = unpack_interpolate(kernel, vec2(0.5 - (x / 4), index));
583
+ w = w * kernel_scale + kernel_bias;
215
584
  r += c5 * w;
216
- w = unpack_interpolate(kernel, vec2(0.250000+(x/4.0), index));
217
- w = w*kernel_scale + kernel_bias;
585
+ w = unpack_interpolate(kernel, vec2(0.25 + (x / 4), index));
586
+ w = w * kernel_scale + kernel_bias;
218
587
  r += c2 * w;
219
- w = unpack_interpolate(kernel, vec2(0.750000-(x/4.0), index));
220
- w = w*kernel_scale + kernel_bias;
588
+ w = unpack_interpolate(kernel, vec2(0.75 - (x / 4), index));
589
+ w = w * kernel_scale + kernel_bias;
221
590
  r += c6 * w;
222
- w = unpack_interpolate(kernel, vec2(0.000000+(x/4.0), index));
223
- w = w*kernel_scale + kernel_bias;
591
+ w = unpack_interpolate(kernel, vec2(0.0 + (x / 4), index));
592
+ w = w * kernel_scale + kernel_bias;
224
593
  r += c3 * w;
225
- w = unpack_interpolate(kernel, vec2(1.000000-(x/4.0), index));
226
- w = w*kernel_scale + kernel_bias;
594
+ w = unpack_interpolate(kernel, vec2(1.0 - (x / 4), index));
595
+ w = w * kernel_scale + kernel_bias;
227
596
  r += c7 * w;
228
597
  return r;
229
598
  }
230
599
 
231
- vec4
232
- filter2D_radius4(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel)
233
- {
234
- vec2 texel = uv/pixel - vec2(0.5, 0.5) ;
600
+ vec4 filter2D_radius4(sampler2D texture, sampler2D kernel, float index, vec2 uv, vec2 pixel) {
601
+ vec2 texel = uv / pixel - vec2(0.5);
235
602
  vec2 f = fract(texel);
236
- texel = (texel-fract(texel) + vec2(0.001, 0.001)) * pixel;
603
+ texel = (texel - fract(texel) + vec2(0.001)) * pixel;
604
+
237
605
  vec4 t0 = filter1D_radius4(kernel, index, f.x,
238
- texture2D( texture, texel + vec2(-3, -3) * pixel),
239
- texture2D( texture, texel + vec2(-2, -3) * pixel),
240
- texture2D( texture, texel + vec2(-1, -3) * pixel),
241
- texture2D( texture, texel + vec2(0, -3) * pixel),
242
- texture2D( texture, texel + vec2(1, -3) * pixel),
243
- texture2D( texture, texel + vec2(2, -3) * pixel),
244
- texture2D( texture, texel + vec2(3, -3) * pixel),
245
- texture2D( texture, texel + vec2(4, -3) * pixel));
606
+ texture2D(texture, texel + vec2(-3, -3) * pixel),
607
+ texture2D(texture, texel + vec2(-2, -3) * pixel),
608
+ texture2D(texture, texel + vec2(-1, -3) * pixel),
609
+ texture2D(texture, texel + vec2(0, -3) * pixel),
610
+ texture2D(texture, texel + vec2(1, -3) * pixel),
611
+ texture2D(texture, texel + vec2(2, -3) * pixel),
612
+ texture2D(texture, texel + vec2(3, -3) * pixel),
613
+ texture2D(texture, texel + vec2(4, -3) * pixel));
246
614
  vec4 t1 = filter1D_radius4(kernel, index, f.x,
247
- texture2D( texture, texel + vec2(-3, -2) * pixel),
248
- texture2D( texture, texel + vec2(-2, -2) * pixel),
249
- texture2D( texture, texel + vec2(-1, -2) * pixel),
250
- texture2D( texture, texel + vec2(0, -2) * pixel),
251
- texture2D( texture, texel + vec2(1, -2) * pixel),
252
- texture2D( texture, texel + vec2(2, -2) * pixel),
253
- texture2D( texture, texel + vec2(3, -2) * pixel),
254
- texture2D( texture, texel + vec2(4, -2) * pixel));
615
+ texture2D(texture, texel + vec2(-3, -2) * pixel),
616
+ texture2D(texture, texel + vec2(-2, -2) * pixel),
617
+ texture2D(texture, texel + vec2(-1, -2) * pixel),
618
+ texture2D(texture, texel + vec2(0, -2) * pixel),
619
+ texture2D(texture, texel + vec2(1, -2) * pixel),
620
+ texture2D(texture, texel + vec2(2, -2) * pixel),
621
+ texture2D(texture, texel + vec2(3, -2) * pixel),
622
+ texture2D(texture, texel + vec2(4, -2) * pixel));
255
623
  vec4 t2 = filter1D_radius4(kernel, index, f.x,
256
- texture2D( texture, texel + vec2(-3, -1) * pixel),
257
- texture2D( texture, texel + vec2(-2, -1) * pixel),
258
- texture2D( texture, texel + vec2(-1, -1) * pixel),
259
- texture2D( texture, texel + vec2(0, -1) * pixel),
260
- texture2D( texture, texel + vec2(1, -1) * pixel),
261
- texture2D( texture, texel + vec2(2, -1) * pixel),
262
- texture2D( texture, texel + vec2(3, -1) * pixel),
263
- texture2D( texture, texel + vec2(4, -1) * pixel));
624
+ texture2D(texture, texel + vec2(-3, -1) * pixel),
625
+ texture2D(texture, texel + vec2(-2, -1) * pixel),
626
+ texture2D(texture, texel + vec2(-1, -1) * pixel),
627
+ texture2D(texture, texel + vec2(0, -1) * pixel),
628
+ texture2D(texture, texel + vec2(1, -1) * pixel),
629
+ texture2D(texture, texel + vec2(2, -1) * pixel),
630
+ texture2D(texture, texel + vec2(3, -1) * pixel),
631
+ texture2D(texture, texel + vec2(4, -1) * pixel));
264
632
  vec4 t3 = filter1D_radius4(kernel, index, f.x,
265
- texture2D( texture, texel + vec2(-3, 0) * pixel),
266
- texture2D( texture, texel + vec2(-2, 0) * pixel),
267
- texture2D( texture, texel + vec2(-1, 0) * pixel),
268
- texture2D( texture, texel + vec2(0, 0) * pixel),
269
- texture2D( texture, texel + vec2(1, 0) * pixel),
270
- texture2D( texture, texel + vec2(2, 0) * pixel),
271
- texture2D( texture, texel + vec2(3, 0) * pixel),
272
- texture2D( texture, texel + vec2(4, 0) * pixel));
633
+ texture2D(texture, texel + vec2(-3, 0) * pixel),
634
+ texture2D(texture, texel + vec2(-2, 0) * pixel),
635
+ texture2D(texture, texel + vec2(-1, 0) * pixel),
636
+ texture2D(texture, texel + vec2(0, 0) * pixel),
637
+ texture2D(texture, texel + vec2(1, 0) * pixel),
638
+ texture2D(texture, texel + vec2(2, 0) * pixel),
639
+ texture2D(texture, texel + vec2(3, 0) * pixel),
640
+ texture2D(texture, texel + vec2(4, 0) * pixel));
273
641
  vec4 t4 = filter1D_radius4(kernel, index, f.x,
274
- texture2D( texture, texel + vec2(-3, 1) * pixel),
275
- texture2D( texture, texel + vec2(-2, 1) * pixel),
276
- texture2D( texture, texel + vec2(-1, 1) * pixel),
277
- texture2D( texture, texel + vec2(0, 1) * pixel),
278
- texture2D( texture, texel + vec2(1, 1) * pixel),
279
- texture2D( texture, texel + vec2(2, 1) * pixel),
280
- texture2D( texture, texel + vec2(3, 1) * pixel),
281
- texture2D( texture, texel + vec2(4, 1) * pixel));
642
+ texture2D(texture, texel + vec2(-3, 1) * pixel),
643
+ texture2D(texture, texel + vec2(-2, 1) * pixel),
644
+ texture2D(texture, texel + vec2(-1, 1) * pixel),
645
+ texture2D(texture, texel + vec2(0, 1) * pixel),
646
+ texture2D(texture, texel + vec2(1, 1) * pixel),
647
+ texture2D(texture, texel + vec2(2, 1) * pixel),
648
+ texture2D(texture, texel + vec2(3, 1) * pixel),
649
+ texture2D(texture, texel + vec2(4, 1) * pixel));
282
650
  vec4 t5 = filter1D_radius4(kernel, index, f.x,
283
- texture2D( texture, texel + vec2(-3, 2) * pixel),
284
- texture2D( texture, texel + vec2(-2, 2) * pixel),
285
- texture2D( texture, texel + vec2(-1, 2) * pixel),
286
- texture2D( texture, texel + vec2(0, 2) * pixel),
287
- texture2D( texture, texel + vec2(1, 2) * pixel),
288
- texture2D( texture, texel + vec2(2, 2) * pixel),
289
- texture2D( texture, texel + vec2(3, 2) * pixel),
290
- texture2D( texture, texel + vec2(4, 2) * pixel));
651
+ texture2D(texture, texel + vec2(-3, 2) * pixel),
652
+ texture2D(texture, texel + vec2(-2, 2) * pixel),
653
+ texture2D(texture, texel + vec2(-1, 2) * pixel),
654
+ texture2D(texture, texel + vec2(0, 2) * pixel),
655
+ texture2D(texture, texel + vec2(1, 2) * pixel),
656
+ texture2D(texture, texel + vec2(2, 2) * pixel),
657
+ texture2D(texture, texel + vec2(3, 2) * pixel),
658
+ texture2D(texture, texel + vec2(4, 2) * pixel));
291
659
  vec4 t6 = filter1D_radius4(kernel, index, f.x,
292
- texture2D( texture, texel + vec2(-3, 3) * pixel),
293
- texture2D( texture, texel + vec2(-2, 3) * pixel),
294
- texture2D( texture, texel + vec2(-1, 3) * pixel),
295
- texture2D( texture, texel + vec2(0, 3) * pixel),
296
- texture2D( texture, texel + vec2(1, 3) * pixel),
297
- texture2D( texture, texel + vec2(2, 3) * pixel),
298
- texture2D( texture, texel + vec2(3, 3) * pixel),
299
- texture2D( texture, texel + vec2(4, 3) * pixel));
660
+ texture2D(texture, texel + vec2(-3, 3) * pixel),
661
+ texture2D(texture, texel + vec2(-2, 3) * pixel),
662
+ texture2D(texture, texel + vec2(-1, 3) * pixel),
663
+ texture2D(texture, texel + vec2(0, 3) * pixel),
664
+ texture2D(texture, texel + vec2(1, 3) * pixel),
665
+ texture2D(texture, texel + vec2(2, 3) * pixel),
666
+ texture2D(texture, texel + vec2(3, 3) * pixel),
667
+ texture2D(texture, texel + vec2(4, 3) * pixel));
300
668
  vec4 t7 = filter1D_radius4(kernel, index, f.x,
301
- texture2D( texture, texel + vec2(-3, 4) * pixel),
302
- texture2D( texture, texel + vec2(-2, 4) * pixel),
303
- texture2D( texture, texel + vec2(-1, 4) * pixel),
304
- texture2D( texture, texel + vec2(0, 4) * pixel),
305
- texture2D( texture, texel + vec2(1, 4) * pixel),
306
- texture2D( texture, texel + vec2(2, 4) * pixel),
307
- texture2D( texture, texel + vec2(3, 4) * pixel),
308
- texture2D( texture, texel + vec2(4, 4) * pixel));
669
+ texture2D(texture, texel + vec2(-3, 4) * pixel),
670
+ texture2D(texture, texel + vec2(-2, 4) * pixel),
671
+ texture2D(texture, texel + vec2(-1, 4) * pixel),
672
+ texture2D(texture, texel + vec2(0, 4) * pixel),
673
+ texture2D(texture, texel + vec2(1, 4) * pixel),
674
+ texture2D(texture, texel + vec2(2, 4) * pixel),
675
+ texture2D(texture, texel + vec2(3, 4) * pixel),
676
+ texture2D(texture, texel + vec2(4, 4) * pixel));
309
677
  return filter1D_radius4(kernel, index, f.y, t0, t1, t2, t3, t4, t5, t6, t7);
310
678
  }
311
679
 
312
- vec4 Nearest(sampler2D texture, vec2 shape, vec2 uv)
313
- { return texture2D(texture,uv); }
680
+ vec4 filter3D_radius4(sampler3D texture, sampler2D kernel, float index, vec3 uv, vec3 pixel) {
681
+ vec3 texel = uv / pixel - vec3(0.5);
682
+ vec3 f = fract(texel);
683
+ texel = (texel - fract(texel) + vec3(0.001)) * pixel;
684
+
685
+ vec4 t00 = filter1D_radius4(kernel, index, f.x,
686
+ texture3D(texture, texel + vec3(-3, -3, -3) * pixel),
687
+ texture3D(texture, texel + vec3(-2, -3, -3) * pixel),
688
+ texture3D(texture, texel + vec3(-1, -3, -3) * pixel),
689
+ texture3D(texture, texel + vec3(0, -3, -3) * pixel),
690
+ texture3D(texture, texel + vec3(1, -3, -3) * pixel),
691
+ texture3D(texture, texel + vec3(2, -3, -3) * pixel),
692
+ texture3D(texture, texel + vec3(3, -3, -3) * pixel),
693
+ texture3D(texture, texel + vec3(4, -3, -3) * pixel));
694
+ vec4 t01 = filter1D_radius4(kernel, index, f.x,
695
+ texture3D(texture, texel + vec3(-3, -2, -3) * pixel),
696
+ texture3D(texture, texel + vec3(-2, -2, -3) * pixel),
697
+ texture3D(texture, texel + vec3(-1, -2, -3) * pixel),
698
+ texture3D(texture, texel + vec3(0, -2, -3) * pixel),
699
+ texture3D(texture, texel + vec3(1, -2, -3) * pixel),
700
+ texture3D(texture, texel + vec3(2, -2, -3) * pixel),
701
+ texture3D(texture, texel + vec3(3, -2, -3) * pixel),
702
+ texture3D(texture, texel + vec3(4, -2, -3) * pixel));
703
+ vec4 t02 = filter1D_radius4(kernel, index, f.x,
704
+ texture3D(texture, texel + vec3(-3, -1, -3) * pixel),
705
+ texture3D(texture, texel + vec3(-2, -1, -3) * pixel),
706
+ texture3D(texture, texel + vec3(-1, -1, -3) * pixel),
707
+ texture3D(texture, texel + vec3(0, -1, -3) * pixel),
708
+ texture3D(texture, texel + vec3(1, -1, -3) * pixel),
709
+ texture3D(texture, texel + vec3(2, -1, -3) * pixel),
710
+ texture3D(texture, texel + vec3(3, -1, -3) * pixel),
711
+ texture3D(texture, texel + vec3(4, -1, -3) * pixel));
712
+ vec4 t03 = filter1D_radius4(kernel, index, f.x,
713
+ texture3D(texture, texel + vec3(-3, 0, -3) * pixel),
714
+ texture3D(texture, texel + vec3(-2, 0, -3) * pixel),
715
+ texture3D(texture, texel + vec3(-1, 0, -3) * pixel),
716
+ texture3D(texture, texel + vec3(0, 0, -3) * pixel),
717
+ texture3D(texture, texel + vec3(1, 0, -3) * pixel),
718
+ texture3D(texture, texel + vec3(2, 0, -3) * pixel),
719
+ texture3D(texture, texel + vec3(3, 0, -3) * pixel),
720
+ texture3D(texture, texel + vec3(4, 0, -3) * pixel));
721
+ vec4 t04 = filter1D_radius4(kernel, index, f.x,
722
+ texture3D(texture, texel + vec3(-3, 1, -3) * pixel),
723
+ texture3D(texture, texel + vec3(-2, 1, -3) * pixel),
724
+ texture3D(texture, texel + vec3(-1, 1, -3) * pixel),
725
+ texture3D(texture, texel + vec3(0, 1, -3) * pixel),
726
+ texture3D(texture, texel + vec3(1, 1, -3) * pixel),
727
+ texture3D(texture, texel + vec3(2, 1, -3) * pixel),
728
+ texture3D(texture, texel + vec3(3, 1, -3) * pixel),
729
+ texture3D(texture, texel + vec3(4, 1, -3) * pixel));
730
+ vec4 t05 = filter1D_radius4(kernel, index, f.x,
731
+ texture3D(texture, texel + vec3(-3, 2, -3) * pixel),
732
+ texture3D(texture, texel + vec3(-2, 2, -3) * pixel),
733
+ texture3D(texture, texel + vec3(-1, 2, -3) * pixel),
734
+ texture3D(texture, texel + vec3(0, 2, -3) * pixel),
735
+ texture3D(texture, texel + vec3(1, 2, -3) * pixel),
736
+ texture3D(texture, texel + vec3(2, 2, -3) * pixel),
737
+ texture3D(texture, texel + vec3(3, 2, -3) * pixel),
738
+ texture3D(texture, texel + vec3(4, 2, -3) * pixel));
739
+ vec4 t06 = filter1D_radius4(kernel, index, f.x,
740
+ texture3D(texture, texel + vec3(-3, 3, -3) * pixel),
741
+ texture3D(texture, texel + vec3(-2, 3, -3) * pixel),
742
+ texture3D(texture, texel + vec3(-1, 3, -3) * pixel),
743
+ texture3D(texture, texel + vec3(0, 3, -3) * pixel),
744
+ texture3D(texture, texel + vec3(1, 3, -3) * pixel),
745
+ texture3D(texture, texel + vec3(2, 3, -3) * pixel),
746
+ texture3D(texture, texel + vec3(3, 3, -3) * pixel),
747
+ texture3D(texture, texel + vec3(4, 3, -3) * pixel));
748
+ vec4 t07 = filter1D_radius4(kernel, index, f.x,
749
+ texture3D(texture, texel + vec3(-3, 4, -3) * pixel),
750
+ texture3D(texture, texel + vec3(-2, 4, -3) * pixel),
751
+ texture3D(texture, texel + vec3(-1, 4, -3) * pixel),
752
+ texture3D(texture, texel + vec3(0, 4, -3) * pixel),
753
+ texture3D(texture, texel + vec3(1, 4, -3) * pixel),
754
+ texture3D(texture, texel + vec3(2, 4, -3) * pixel),
755
+ texture3D(texture, texel + vec3(3, 4, -3) * pixel),
756
+ texture3D(texture, texel + vec3(4, 4, -3) * pixel));
757
+ vec4 t10 = filter1D_radius4(kernel, index, f.x,
758
+ texture3D(texture, texel + vec3(-3, -3, -2) * pixel),
759
+ texture3D(texture, texel + vec3(-2, -3, -2) * pixel),
760
+ texture3D(texture, texel + vec3(-1, -3, -2) * pixel),
761
+ texture3D(texture, texel + vec3(0, -3, -2) * pixel),
762
+ texture3D(texture, texel + vec3(1, -3, -2) * pixel),
763
+ texture3D(texture, texel + vec3(2, -3, -2) * pixel),
764
+ texture3D(texture, texel + vec3(3, -3, -2) * pixel),
765
+ texture3D(texture, texel + vec3(4, -3, -2) * pixel));
766
+ vec4 t11 = filter1D_radius4(kernel, index, f.x,
767
+ texture3D(texture, texel + vec3(-3, -2, -2) * pixel),
768
+ texture3D(texture, texel + vec3(-2, -2, -2) * pixel),
769
+ texture3D(texture, texel + vec3(-1, -2, -2) * pixel),
770
+ texture3D(texture, texel + vec3(0, -2, -2) * pixel),
771
+ texture3D(texture, texel + vec3(1, -2, -2) * pixel),
772
+ texture3D(texture, texel + vec3(2, -2, -2) * pixel),
773
+ texture3D(texture, texel + vec3(3, -2, -2) * pixel),
774
+ texture3D(texture, texel + vec3(4, -2, -2) * pixel));
775
+ vec4 t12 = filter1D_radius4(kernel, index, f.x,
776
+ texture3D(texture, texel + vec3(-3, -1, -2) * pixel),
777
+ texture3D(texture, texel + vec3(-2, -1, -2) * pixel),
778
+ texture3D(texture, texel + vec3(-1, -1, -2) * pixel),
779
+ texture3D(texture, texel + vec3(0, -1, -2) * pixel),
780
+ texture3D(texture, texel + vec3(1, -1, -2) * pixel),
781
+ texture3D(texture, texel + vec3(2, -1, -2) * pixel),
782
+ texture3D(texture, texel + vec3(3, -1, -2) * pixel),
783
+ texture3D(texture, texel + vec3(4, -1, -2) * pixel));
784
+ vec4 t13 = filter1D_radius4(kernel, index, f.x,
785
+ texture3D(texture, texel + vec3(-3, 0, -2) * pixel),
786
+ texture3D(texture, texel + vec3(-2, 0, -2) * pixel),
787
+ texture3D(texture, texel + vec3(-1, 0, -2) * pixel),
788
+ texture3D(texture, texel + vec3(0, 0, -2) * pixel),
789
+ texture3D(texture, texel + vec3(1, 0, -2) * pixel),
790
+ texture3D(texture, texel + vec3(2, 0, -2) * pixel),
791
+ texture3D(texture, texel + vec3(3, 0, -2) * pixel),
792
+ texture3D(texture, texel + vec3(4, 0, -2) * pixel));
793
+ vec4 t14 = filter1D_radius4(kernel, index, f.x,
794
+ texture3D(texture, texel + vec3(-3, 1, -2) * pixel),
795
+ texture3D(texture, texel + vec3(-2, 1, -2) * pixel),
796
+ texture3D(texture, texel + vec3(-1, 1, -2) * pixel),
797
+ texture3D(texture, texel + vec3(0, 1, -2) * pixel),
798
+ texture3D(texture, texel + vec3(1, 1, -2) * pixel),
799
+ texture3D(texture, texel + vec3(2, 1, -2) * pixel),
800
+ texture3D(texture, texel + vec3(3, 1, -2) * pixel),
801
+ texture3D(texture, texel + vec3(4, 1, -2) * pixel));
802
+ vec4 t15 = filter1D_radius4(kernel, index, f.x,
803
+ texture3D(texture, texel + vec3(-3, 2, -2) * pixel),
804
+ texture3D(texture, texel + vec3(-2, 2, -2) * pixel),
805
+ texture3D(texture, texel + vec3(-1, 2, -2) * pixel),
806
+ texture3D(texture, texel + vec3(0, 2, -2) * pixel),
807
+ texture3D(texture, texel + vec3(1, 2, -2) * pixel),
808
+ texture3D(texture, texel + vec3(2, 2, -2) * pixel),
809
+ texture3D(texture, texel + vec3(3, 2, -2) * pixel),
810
+ texture3D(texture, texel + vec3(4, 2, -2) * pixel));
811
+ vec4 t16 = filter1D_radius4(kernel, index, f.x,
812
+ texture3D(texture, texel + vec3(-3, 3, -2) * pixel),
813
+ texture3D(texture, texel + vec3(-2, 3, -2) * pixel),
814
+ texture3D(texture, texel + vec3(-1, 3, -2) * pixel),
815
+ texture3D(texture, texel + vec3(0, 3, -2) * pixel),
816
+ texture3D(texture, texel + vec3(1, 3, -2) * pixel),
817
+ texture3D(texture, texel + vec3(2, 3, -2) * pixel),
818
+ texture3D(texture, texel + vec3(3, 3, -2) * pixel),
819
+ texture3D(texture, texel + vec3(4, 3, -2) * pixel));
820
+ vec4 t17 = filter1D_radius4(kernel, index, f.x,
821
+ texture3D(texture, texel + vec3(-3, 4, -2) * pixel),
822
+ texture3D(texture, texel + vec3(-2, 4, -2) * pixel),
823
+ texture3D(texture, texel + vec3(-1, 4, -2) * pixel),
824
+ texture3D(texture, texel + vec3(0, 4, -2) * pixel),
825
+ texture3D(texture, texel + vec3(1, 4, -2) * pixel),
826
+ texture3D(texture, texel + vec3(2, 4, -2) * pixel),
827
+ texture3D(texture, texel + vec3(3, 4, -2) * pixel),
828
+ texture3D(texture, texel + vec3(4, 4, -2) * pixel));
829
+ vec4 t20 = filter1D_radius4(kernel, index, f.x,
830
+ texture3D(texture, texel + vec3(-3, -3, -1) * pixel),
831
+ texture3D(texture, texel + vec3(-2, -3, -1) * pixel),
832
+ texture3D(texture, texel + vec3(-1, -3, -1) * pixel),
833
+ texture3D(texture, texel + vec3(0, -3, -1) * pixel),
834
+ texture3D(texture, texel + vec3(1, -3, -1) * pixel),
835
+ texture3D(texture, texel + vec3(2, -3, -1) * pixel),
836
+ texture3D(texture, texel + vec3(3, -3, -1) * pixel),
837
+ texture3D(texture, texel + vec3(4, -3, -1) * pixel));
838
+ vec4 t21 = filter1D_radius4(kernel, index, f.x,
839
+ texture3D(texture, texel + vec3(-3, -2, -1) * pixel),
840
+ texture3D(texture, texel + vec3(-2, -2, -1) * pixel),
841
+ texture3D(texture, texel + vec3(-1, -2, -1) * pixel),
842
+ texture3D(texture, texel + vec3(0, -2, -1) * pixel),
843
+ texture3D(texture, texel + vec3(1, -2, -1) * pixel),
844
+ texture3D(texture, texel + vec3(2, -2, -1) * pixel),
845
+ texture3D(texture, texel + vec3(3, -2, -1) * pixel),
846
+ texture3D(texture, texel + vec3(4, -2, -1) * pixel));
847
+ vec4 t22 = filter1D_radius4(kernel, index, f.x,
848
+ texture3D(texture, texel + vec3(-3, -1, -1) * pixel),
849
+ texture3D(texture, texel + vec3(-2, -1, -1) * pixel),
850
+ texture3D(texture, texel + vec3(-1, -1, -1) * pixel),
851
+ texture3D(texture, texel + vec3(0, -1, -1) * pixel),
852
+ texture3D(texture, texel + vec3(1, -1, -1) * pixel),
853
+ texture3D(texture, texel + vec3(2, -1, -1) * pixel),
854
+ texture3D(texture, texel + vec3(3, -1, -1) * pixel),
855
+ texture3D(texture, texel + vec3(4, -1, -1) * pixel));
856
+ vec4 t23 = filter1D_radius4(kernel, index, f.x,
857
+ texture3D(texture, texel + vec3(-3, 0, -1) * pixel),
858
+ texture3D(texture, texel + vec3(-2, 0, -1) * pixel),
859
+ texture3D(texture, texel + vec3(-1, 0, -1) * pixel),
860
+ texture3D(texture, texel + vec3(0, 0, -1) * pixel),
861
+ texture3D(texture, texel + vec3(1, 0, -1) * pixel),
862
+ texture3D(texture, texel + vec3(2, 0, -1) * pixel),
863
+ texture3D(texture, texel + vec3(3, 0, -1) * pixel),
864
+ texture3D(texture, texel + vec3(4, 0, -1) * pixel));
865
+ vec4 t24 = filter1D_radius4(kernel, index, f.x,
866
+ texture3D(texture, texel + vec3(-3, 1, -1) * pixel),
867
+ texture3D(texture, texel + vec3(-2, 1, -1) * pixel),
868
+ texture3D(texture, texel + vec3(-1, 1, -1) * pixel),
869
+ texture3D(texture, texel + vec3(0, 1, -1) * pixel),
870
+ texture3D(texture, texel + vec3(1, 1, -1) * pixel),
871
+ texture3D(texture, texel + vec3(2, 1, -1) * pixel),
872
+ texture3D(texture, texel + vec3(3, 1, -1) * pixel),
873
+ texture3D(texture, texel + vec3(4, 1, -1) * pixel));
874
+ vec4 t25 = filter1D_radius4(kernel, index, f.x,
875
+ texture3D(texture, texel + vec3(-3, 2, -1) * pixel),
876
+ texture3D(texture, texel + vec3(-2, 2, -1) * pixel),
877
+ texture3D(texture, texel + vec3(-1, 2, -1) * pixel),
878
+ texture3D(texture, texel + vec3(0, 2, -1) * pixel),
879
+ texture3D(texture, texel + vec3(1, 2, -1) * pixel),
880
+ texture3D(texture, texel + vec3(2, 2, -1) * pixel),
881
+ texture3D(texture, texel + vec3(3, 2, -1) * pixel),
882
+ texture3D(texture, texel + vec3(4, 2, -1) * pixel));
883
+ vec4 t26 = filter1D_radius4(kernel, index, f.x,
884
+ texture3D(texture, texel + vec3(-3, 3, -1) * pixel),
885
+ texture3D(texture, texel + vec3(-2, 3, -1) * pixel),
886
+ texture3D(texture, texel + vec3(-1, 3, -1) * pixel),
887
+ texture3D(texture, texel + vec3(0, 3, -1) * pixel),
888
+ texture3D(texture, texel + vec3(1, 3, -1) * pixel),
889
+ texture3D(texture, texel + vec3(2, 3, -1) * pixel),
890
+ texture3D(texture, texel + vec3(3, 3, -1) * pixel),
891
+ texture3D(texture, texel + vec3(4, 3, -1) * pixel));
892
+ vec4 t27 = filter1D_radius4(kernel, index, f.x,
893
+ texture3D(texture, texel + vec3(-3, 4, -1) * pixel),
894
+ texture3D(texture, texel + vec3(-2, 4, -1) * pixel),
895
+ texture3D(texture, texel + vec3(-1, 4, -1) * pixel),
896
+ texture3D(texture, texel + vec3(0, 4, -1) * pixel),
897
+ texture3D(texture, texel + vec3(1, 4, -1) * pixel),
898
+ texture3D(texture, texel + vec3(2, 4, -1) * pixel),
899
+ texture3D(texture, texel + vec3(3, 4, -1) * pixel),
900
+ texture3D(texture, texel + vec3(4, 4, -1) * pixel));
901
+ vec4 t30 = filter1D_radius4(kernel, index, f.x,
902
+ texture3D(texture, texel + vec3(-3, -3, 0) * pixel),
903
+ texture3D(texture, texel + vec3(-2, -3, 0) * pixel),
904
+ texture3D(texture, texel + vec3(-1, -3, 0) * pixel),
905
+ texture3D(texture, texel + vec3(0, -3, 0) * pixel),
906
+ texture3D(texture, texel + vec3(1, -3, 0) * pixel),
907
+ texture3D(texture, texel + vec3(2, -3, 0) * pixel),
908
+ texture3D(texture, texel + vec3(3, -3, 0) * pixel),
909
+ texture3D(texture, texel + vec3(4, -3, 0) * pixel));
910
+ vec4 t31 = filter1D_radius4(kernel, index, f.x,
911
+ texture3D(texture, texel + vec3(-3, -2, 0) * pixel),
912
+ texture3D(texture, texel + vec3(-2, -2, 0) * pixel),
913
+ texture3D(texture, texel + vec3(-1, -2, 0) * pixel),
914
+ texture3D(texture, texel + vec3(0, -2, 0) * pixel),
915
+ texture3D(texture, texel + vec3(1, -2, 0) * pixel),
916
+ texture3D(texture, texel + vec3(2, -2, 0) * pixel),
917
+ texture3D(texture, texel + vec3(3, -2, 0) * pixel),
918
+ texture3D(texture, texel + vec3(4, -2, 0) * pixel));
919
+ vec4 t32 = filter1D_radius4(kernel, index, f.x,
920
+ texture3D(texture, texel + vec3(-3, -1, 0) * pixel),
921
+ texture3D(texture, texel + vec3(-2, -1, 0) * pixel),
922
+ texture3D(texture, texel + vec3(-1, -1, 0) * pixel),
923
+ texture3D(texture, texel + vec3(0, -1, 0) * pixel),
924
+ texture3D(texture, texel + vec3(1, -1, 0) * pixel),
925
+ texture3D(texture, texel + vec3(2, -1, 0) * pixel),
926
+ texture3D(texture, texel + vec3(3, -1, 0) * pixel),
927
+ texture3D(texture, texel + vec3(4, -1, 0) * pixel));
928
+ vec4 t33 = filter1D_radius4(kernel, index, f.x,
929
+ texture3D(texture, texel + vec3(-3, 0, 0) * pixel),
930
+ texture3D(texture, texel + vec3(-2, 0, 0) * pixel),
931
+ texture3D(texture, texel + vec3(-1, 0, 0) * pixel),
932
+ texture3D(texture, texel + vec3(0, 0, 0) * pixel),
933
+ texture3D(texture, texel + vec3(1, 0, 0) * pixel),
934
+ texture3D(texture, texel + vec3(2, 0, 0) * pixel),
935
+ texture3D(texture, texel + vec3(3, 0, 0) * pixel),
936
+ texture3D(texture, texel + vec3(4, 0, 0) * pixel));
937
+ vec4 t34 = filter1D_radius4(kernel, index, f.x,
938
+ texture3D(texture, texel + vec3(-3, 1, 0) * pixel),
939
+ texture3D(texture, texel + vec3(-2, 1, 0) * pixel),
940
+ texture3D(texture, texel + vec3(-1, 1, 0) * pixel),
941
+ texture3D(texture, texel + vec3(0, 1, 0) * pixel),
942
+ texture3D(texture, texel + vec3(1, 1, 0) * pixel),
943
+ texture3D(texture, texel + vec3(2, 1, 0) * pixel),
944
+ texture3D(texture, texel + vec3(3, 1, 0) * pixel),
945
+ texture3D(texture, texel + vec3(4, 1, 0) * pixel));
946
+ vec4 t35 = filter1D_radius4(kernel, index, f.x,
947
+ texture3D(texture, texel + vec3(-3, 2, 0) * pixel),
948
+ texture3D(texture, texel + vec3(-2, 2, 0) * pixel),
949
+ texture3D(texture, texel + vec3(-1, 2, 0) * pixel),
950
+ texture3D(texture, texel + vec3(0, 2, 0) * pixel),
951
+ texture3D(texture, texel + vec3(1, 2, 0) * pixel),
952
+ texture3D(texture, texel + vec3(2, 2, 0) * pixel),
953
+ texture3D(texture, texel + vec3(3, 2, 0) * pixel),
954
+ texture3D(texture, texel + vec3(4, 2, 0) * pixel));
955
+ vec4 t36 = filter1D_radius4(kernel, index, f.x,
956
+ texture3D(texture, texel + vec3(-3, 3, 0) * pixel),
957
+ texture3D(texture, texel + vec3(-2, 3, 0) * pixel),
958
+ texture3D(texture, texel + vec3(-1, 3, 0) * pixel),
959
+ texture3D(texture, texel + vec3(0, 3, 0) * pixel),
960
+ texture3D(texture, texel + vec3(1, 3, 0) * pixel),
961
+ texture3D(texture, texel + vec3(2, 3, 0) * pixel),
962
+ texture3D(texture, texel + vec3(3, 3, 0) * pixel),
963
+ texture3D(texture, texel + vec3(4, 3, 0) * pixel));
964
+ vec4 t37 = filter1D_radius4(kernel, index, f.x,
965
+ texture3D(texture, texel + vec3(-3, 4, 0) * pixel),
966
+ texture3D(texture, texel + vec3(-2, 4, 0) * pixel),
967
+ texture3D(texture, texel + vec3(-1, 4, 0) * pixel),
968
+ texture3D(texture, texel + vec3(0, 4, 0) * pixel),
969
+ texture3D(texture, texel + vec3(1, 4, 0) * pixel),
970
+ texture3D(texture, texel + vec3(2, 4, 0) * pixel),
971
+ texture3D(texture, texel + vec3(3, 4, 0) * pixel),
972
+ texture3D(texture, texel + vec3(4, 4, 0) * pixel));
973
+ vec4 t40 = filter1D_radius4(kernel, index, f.x,
974
+ texture3D(texture, texel + vec3(-3, -3, 1) * pixel),
975
+ texture3D(texture, texel + vec3(-2, -3, 1) * pixel),
976
+ texture3D(texture, texel + vec3(-1, -3, 1) * pixel),
977
+ texture3D(texture, texel + vec3(0, -3, 1) * pixel),
978
+ texture3D(texture, texel + vec3(1, -3, 1) * pixel),
979
+ texture3D(texture, texel + vec3(2, -3, 1) * pixel),
980
+ texture3D(texture, texel + vec3(3, -3, 1) * pixel),
981
+ texture3D(texture, texel + vec3(4, -3, 1) * pixel));
982
+ vec4 t41 = filter1D_radius4(kernel, index, f.x,
983
+ texture3D(texture, texel + vec3(-3, -2, 1) * pixel),
984
+ texture3D(texture, texel + vec3(-2, -2, 1) * pixel),
985
+ texture3D(texture, texel + vec3(-1, -2, 1) * pixel),
986
+ texture3D(texture, texel + vec3(0, -2, 1) * pixel),
987
+ texture3D(texture, texel + vec3(1, -2, 1) * pixel),
988
+ texture3D(texture, texel + vec3(2, -2, 1) * pixel),
989
+ texture3D(texture, texel + vec3(3, -2, 1) * pixel),
990
+ texture3D(texture, texel + vec3(4, -2, 1) * pixel));
991
+ vec4 t42 = filter1D_radius4(kernel, index, f.x,
992
+ texture3D(texture, texel + vec3(-3, -1, 1) * pixel),
993
+ texture3D(texture, texel + vec3(-2, -1, 1) * pixel),
994
+ texture3D(texture, texel + vec3(-1, -1, 1) * pixel),
995
+ texture3D(texture, texel + vec3(0, -1, 1) * pixel),
996
+ texture3D(texture, texel + vec3(1, -1, 1) * pixel),
997
+ texture3D(texture, texel + vec3(2, -1, 1) * pixel),
998
+ texture3D(texture, texel + vec3(3, -1, 1) * pixel),
999
+ texture3D(texture, texel + vec3(4, -1, 1) * pixel));
1000
+ vec4 t43 = filter1D_radius4(kernel, index, f.x,
1001
+ texture3D(texture, texel + vec3(-3, 0, 1) * pixel),
1002
+ texture3D(texture, texel + vec3(-2, 0, 1) * pixel),
1003
+ texture3D(texture, texel + vec3(-1, 0, 1) * pixel),
1004
+ texture3D(texture, texel + vec3(0, 0, 1) * pixel),
1005
+ texture3D(texture, texel + vec3(1, 0, 1) * pixel),
1006
+ texture3D(texture, texel + vec3(2, 0, 1) * pixel),
1007
+ texture3D(texture, texel + vec3(3, 0, 1) * pixel),
1008
+ texture3D(texture, texel + vec3(4, 0, 1) * pixel));
1009
+ vec4 t44 = filter1D_radius4(kernel, index, f.x,
1010
+ texture3D(texture, texel + vec3(-3, 1, 1) * pixel),
1011
+ texture3D(texture, texel + vec3(-2, 1, 1) * pixel),
1012
+ texture3D(texture, texel + vec3(-1, 1, 1) * pixel),
1013
+ texture3D(texture, texel + vec3(0, 1, 1) * pixel),
1014
+ texture3D(texture, texel + vec3(1, 1, 1) * pixel),
1015
+ texture3D(texture, texel + vec3(2, 1, 1) * pixel),
1016
+ texture3D(texture, texel + vec3(3, 1, 1) * pixel),
1017
+ texture3D(texture, texel + vec3(4, 1, 1) * pixel));
1018
+ vec4 t45 = filter1D_radius4(kernel, index, f.x,
1019
+ texture3D(texture, texel + vec3(-3, 2, 1) * pixel),
1020
+ texture3D(texture, texel + vec3(-2, 2, 1) * pixel),
1021
+ texture3D(texture, texel + vec3(-1, 2, 1) * pixel),
1022
+ texture3D(texture, texel + vec3(0, 2, 1) * pixel),
1023
+ texture3D(texture, texel + vec3(1, 2, 1) * pixel),
1024
+ texture3D(texture, texel + vec3(2, 2, 1) * pixel),
1025
+ texture3D(texture, texel + vec3(3, 2, 1) * pixel),
1026
+ texture3D(texture, texel + vec3(4, 2, 1) * pixel));
1027
+ vec4 t46 = filter1D_radius4(kernel, index, f.x,
1028
+ texture3D(texture, texel + vec3(-3, 3, 1) * pixel),
1029
+ texture3D(texture, texel + vec3(-2, 3, 1) * pixel),
1030
+ texture3D(texture, texel + vec3(-1, 3, 1) * pixel),
1031
+ texture3D(texture, texel + vec3(0, 3, 1) * pixel),
1032
+ texture3D(texture, texel + vec3(1, 3, 1) * pixel),
1033
+ texture3D(texture, texel + vec3(2, 3, 1) * pixel),
1034
+ texture3D(texture, texel + vec3(3, 3, 1) * pixel),
1035
+ texture3D(texture, texel + vec3(4, 3, 1) * pixel));
1036
+ vec4 t47 = filter1D_radius4(kernel, index, f.x,
1037
+ texture3D(texture, texel + vec3(-3, 4, 1) * pixel),
1038
+ texture3D(texture, texel + vec3(-2, 4, 1) * pixel),
1039
+ texture3D(texture, texel + vec3(-1, 4, 1) * pixel),
1040
+ texture3D(texture, texel + vec3(0, 4, 1) * pixel),
1041
+ texture3D(texture, texel + vec3(1, 4, 1) * pixel),
1042
+ texture3D(texture, texel + vec3(2, 4, 1) * pixel),
1043
+ texture3D(texture, texel + vec3(3, 4, 1) * pixel),
1044
+ texture3D(texture, texel + vec3(4, 4, 1) * pixel));
1045
+ vec4 t50 = filter1D_radius4(kernel, index, f.x,
1046
+ texture3D(texture, texel + vec3(-3, -3, 2) * pixel),
1047
+ texture3D(texture, texel + vec3(-2, -3, 2) * pixel),
1048
+ texture3D(texture, texel + vec3(-1, -3, 2) * pixel),
1049
+ texture3D(texture, texel + vec3(0, -3, 2) * pixel),
1050
+ texture3D(texture, texel + vec3(1, -3, 2) * pixel),
1051
+ texture3D(texture, texel + vec3(2, -3, 2) * pixel),
1052
+ texture3D(texture, texel + vec3(3, -3, 2) * pixel),
1053
+ texture3D(texture, texel + vec3(4, -3, 2) * pixel));
1054
+ vec4 t51 = filter1D_radius4(kernel, index, f.x,
1055
+ texture3D(texture, texel + vec3(-3, -2, 2) * pixel),
1056
+ texture3D(texture, texel + vec3(-2, -2, 2) * pixel),
1057
+ texture3D(texture, texel + vec3(-1, -2, 2) * pixel),
1058
+ texture3D(texture, texel + vec3(0, -2, 2) * pixel),
1059
+ texture3D(texture, texel + vec3(1, -2, 2) * pixel),
1060
+ texture3D(texture, texel + vec3(2, -2, 2) * pixel),
1061
+ texture3D(texture, texel + vec3(3, -2, 2) * pixel),
1062
+ texture3D(texture, texel + vec3(4, -2, 2) * pixel));
1063
+ vec4 t52 = filter1D_radius4(kernel, index, f.x,
1064
+ texture3D(texture, texel + vec3(-3, -1, 2) * pixel),
1065
+ texture3D(texture, texel + vec3(-2, -1, 2) * pixel),
1066
+ texture3D(texture, texel + vec3(-1, -1, 2) * pixel),
1067
+ texture3D(texture, texel + vec3(0, -1, 2) * pixel),
1068
+ texture3D(texture, texel + vec3(1, -1, 2) * pixel),
1069
+ texture3D(texture, texel + vec3(2, -1, 2) * pixel),
1070
+ texture3D(texture, texel + vec3(3, -1, 2) * pixel),
1071
+ texture3D(texture, texel + vec3(4, -1, 2) * pixel));
1072
+ vec4 t53 = filter1D_radius4(kernel, index, f.x,
1073
+ texture3D(texture, texel + vec3(-3, 0, 2) * pixel),
1074
+ texture3D(texture, texel + vec3(-2, 0, 2) * pixel),
1075
+ texture3D(texture, texel + vec3(-1, 0, 2) * pixel),
1076
+ texture3D(texture, texel + vec3(0, 0, 2) * pixel),
1077
+ texture3D(texture, texel + vec3(1, 0, 2) * pixel),
1078
+ texture3D(texture, texel + vec3(2, 0, 2) * pixel),
1079
+ texture3D(texture, texel + vec3(3, 0, 2) * pixel),
1080
+ texture3D(texture, texel + vec3(4, 0, 2) * pixel));
1081
+ vec4 t54 = filter1D_radius4(kernel, index, f.x,
1082
+ texture3D(texture, texel + vec3(-3, 1, 2) * pixel),
1083
+ texture3D(texture, texel + vec3(-2, 1, 2) * pixel),
1084
+ texture3D(texture, texel + vec3(-1, 1, 2) * pixel),
1085
+ texture3D(texture, texel + vec3(0, 1, 2) * pixel),
1086
+ texture3D(texture, texel + vec3(1, 1, 2) * pixel),
1087
+ texture3D(texture, texel + vec3(2, 1, 2) * pixel),
1088
+ texture3D(texture, texel + vec3(3, 1, 2) * pixel),
1089
+ texture3D(texture, texel + vec3(4, 1, 2) * pixel));
1090
+ vec4 t55 = filter1D_radius4(kernel, index, f.x,
1091
+ texture3D(texture, texel + vec3(-3, 2, 2) * pixel),
1092
+ texture3D(texture, texel + vec3(-2, 2, 2) * pixel),
1093
+ texture3D(texture, texel + vec3(-1, 2, 2) * pixel),
1094
+ texture3D(texture, texel + vec3(0, 2, 2) * pixel),
1095
+ texture3D(texture, texel + vec3(1, 2, 2) * pixel),
1096
+ texture3D(texture, texel + vec3(2, 2, 2) * pixel),
1097
+ texture3D(texture, texel + vec3(3, 2, 2) * pixel),
1098
+ texture3D(texture, texel + vec3(4, 2, 2) * pixel));
1099
+ vec4 t56 = filter1D_radius4(kernel, index, f.x,
1100
+ texture3D(texture, texel + vec3(-3, 3, 2) * pixel),
1101
+ texture3D(texture, texel + vec3(-2, 3, 2) * pixel),
1102
+ texture3D(texture, texel + vec3(-1, 3, 2) * pixel),
1103
+ texture3D(texture, texel + vec3(0, 3, 2) * pixel),
1104
+ texture3D(texture, texel + vec3(1, 3, 2) * pixel),
1105
+ texture3D(texture, texel + vec3(2, 3, 2) * pixel),
1106
+ texture3D(texture, texel + vec3(3, 3, 2) * pixel),
1107
+ texture3D(texture, texel + vec3(4, 3, 2) * pixel));
1108
+ vec4 t57 = filter1D_radius4(kernel, index, f.x,
1109
+ texture3D(texture, texel + vec3(-3, 4, 2) * pixel),
1110
+ texture3D(texture, texel + vec3(-2, 4, 2) * pixel),
1111
+ texture3D(texture, texel + vec3(-1, 4, 2) * pixel),
1112
+ texture3D(texture, texel + vec3(0, 4, 2) * pixel),
1113
+ texture3D(texture, texel + vec3(1, 4, 2) * pixel),
1114
+ texture3D(texture, texel + vec3(2, 4, 2) * pixel),
1115
+ texture3D(texture, texel + vec3(3, 4, 2) * pixel),
1116
+ texture3D(texture, texel + vec3(4, 4, 2) * pixel));
1117
+ vec4 t60 = filter1D_radius4(kernel, index, f.x,
1118
+ texture3D(texture, texel + vec3(-3, -3, 3) * pixel),
1119
+ texture3D(texture, texel + vec3(-2, -3, 3) * pixel),
1120
+ texture3D(texture, texel + vec3(-1, -3, 3) * pixel),
1121
+ texture3D(texture, texel + vec3(0, -3, 3) * pixel),
1122
+ texture3D(texture, texel + vec3(1, -3, 3) * pixel),
1123
+ texture3D(texture, texel + vec3(2, -3, 3) * pixel),
1124
+ texture3D(texture, texel + vec3(3, -3, 3) * pixel),
1125
+ texture3D(texture, texel + vec3(4, -3, 3) * pixel));
1126
+ vec4 t61 = filter1D_radius4(kernel, index, f.x,
1127
+ texture3D(texture, texel + vec3(-3, -2, 3) * pixel),
1128
+ texture3D(texture, texel + vec3(-2, -2, 3) * pixel),
1129
+ texture3D(texture, texel + vec3(-1, -2, 3) * pixel),
1130
+ texture3D(texture, texel + vec3(0, -2, 3) * pixel),
1131
+ texture3D(texture, texel + vec3(1, -2, 3) * pixel),
1132
+ texture3D(texture, texel + vec3(2, -2, 3) * pixel),
1133
+ texture3D(texture, texel + vec3(3, -2, 3) * pixel),
1134
+ texture3D(texture, texel + vec3(4, -2, 3) * pixel));
1135
+ vec4 t62 = filter1D_radius4(kernel, index, f.x,
1136
+ texture3D(texture, texel + vec3(-3, -1, 3) * pixel),
1137
+ texture3D(texture, texel + vec3(-2, -1, 3) * pixel),
1138
+ texture3D(texture, texel + vec3(-1, -1, 3) * pixel),
1139
+ texture3D(texture, texel + vec3(0, -1, 3) * pixel),
1140
+ texture3D(texture, texel + vec3(1, -1, 3) * pixel),
1141
+ texture3D(texture, texel + vec3(2, -1, 3) * pixel),
1142
+ texture3D(texture, texel + vec3(3, -1, 3) * pixel),
1143
+ texture3D(texture, texel + vec3(4, -1, 3) * pixel));
1144
+ vec4 t63 = filter1D_radius4(kernel, index, f.x,
1145
+ texture3D(texture, texel + vec3(-3, 0, 3) * pixel),
1146
+ texture3D(texture, texel + vec3(-2, 0, 3) * pixel),
1147
+ texture3D(texture, texel + vec3(-1, 0, 3) * pixel),
1148
+ texture3D(texture, texel + vec3(0, 0, 3) * pixel),
1149
+ texture3D(texture, texel + vec3(1, 0, 3) * pixel),
1150
+ texture3D(texture, texel + vec3(2, 0, 3) * pixel),
1151
+ texture3D(texture, texel + vec3(3, 0, 3) * pixel),
1152
+ texture3D(texture, texel + vec3(4, 0, 3) * pixel));
1153
+ vec4 t64 = filter1D_radius4(kernel, index, f.x,
1154
+ texture3D(texture, texel + vec3(-3, 1, 3) * pixel),
1155
+ texture3D(texture, texel + vec3(-2, 1, 3) * pixel),
1156
+ texture3D(texture, texel + vec3(-1, 1, 3) * pixel),
1157
+ texture3D(texture, texel + vec3(0, 1, 3) * pixel),
1158
+ texture3D(texture, texel + vec3(1, 1, 3) * pixel),
1159
+ texture3D(texture, texel + vec3(2, 1, 3) * pixel),
1160
+ texture3D(texture, texel + vec3(3, 1, 3) * pixel),
1161
+ texture3D(texture, texel + vec3(4, 1, 3) * pixel));
1162
+ vec4 t65 = filter1D_radius4(kernel, index, f.x,
1163
+ texture3D(texture, texel + vec3(-3, 2, 3) * pixel),
1164
+ texture3D(texture, texel + vec3(-2, 2, 3) * pixel),
1165
+ texture3D(texture, texel + vec3(-1, 2, 3) * pixel),
1166
+ texture3D(texture, texel + vec3(0, 2, 3) * pixel),
1167
+ texture3D(texture, texel + vec3(1, 2, 3) * pixel),
1168
+ texture3D(texture, texel + vec3(2, 2, 3) * pixel),
1169
+ texture3D(texture, texel + vec3(3, 2, 3) * pixel),
1170
+ texture3D(texture, texel + vec3(4, 2, 3) * pixel));
1171
+ vec4 t66 = filter1D_radius4(kernel, index, f.x,
1172
+ texture3D(texture, texel + vec3(-3, 3, 3) * pixel),
1173
+ texture3D(texture, texel + vec3(-2, 3, 3) * pixel),
1174
+ texture3D(texture, texel + vec3(-1, 3, 3) * pixel),
1175
+ texture3D(texture, texel + vec3(0, 3, 3) * pixel),
1176
+ texture3D(texture, texel + vec3(1, 3, 3) * pixel),
1177
+ texture3D(texture, texel + vec3(2, 3, 3) * pixel),
1178
+ texture3D(texture, texel + vec3(3, 3, 3) * pixel),
1179
+ texture3D(texture, texel + vec3(4, 3, 3) * pixel));
1180
+ vec4 t67 = filter1D_radius4(kernel, index, f.x,
1181
+ texture3D(texture, texel + vec3(-3, 4, 3) * pixel),
1182
+ texture3D(texture, texel + vec3(-2, 4, 3) * pixel),
1183
+ texture3D(texture, texel + vec3(-1, 4, 3) * pixel),
1184
+ texture3D(texture, texel + vec3(0, 4, 3) * pixel),
1185
+ texture3D(texture, texel + vec3(1, 4, 3) * pixel),
1186
+ texture3D(texture, texel + vec3(2, 4, 3) * pixel),
1187
+ texture3D(texture, texel + vec3(3, 4, 3) * pixel),
1188
+ texture3D(texture, texel + vec3(4, 4, 3) * pixel));
1189
+ vec4 t70 = filter1D_radius4(kernel, index, f.x,
1190
+ texture3D(texture, texel + vec3(-3, -3, 4) * pixel),
1191
+ texture3D(texture, texel + vec3(-2, -3, 4) * pixel),
1192
+ texture3D(texture, texel + vec3(-1, -3, 4) * pixel),
1193
+ texture3D(texture, texel + vec3(0, -3, 4) * pixel),
1194
+ texture3D(texture, texel + vec3(1, -3, 4) * pixel),
1195
+ texture3D(texture, texel + vec3(2, -3, 4) * pixel),
1196
+ texture3D(texture, texel + vec3(3, -3, 4) * pixel),
1197
+ texture3D(texture, texel + vec3(4, -3, 4) * pixel));
1198
+ vec4 t71 = filter1D_radius4(kernel, index, f.x,
1199
+ texture3D(texture, texel + vec3(-3, -2, 4) * pixel),
1200
+ texture3D(texture, texel + vec3(-2, -2, 4) * pixel),
1201
+ texture3D(texture, texel + vec3(-1, -2, 4) * pixel),
1202
+ texture3D(texture, texel + vec3(0, -2, 4) * pixel),
1203
+ texture3D(texture, texel + vec3(1, -2, 4) * pixel),
1204
+ texture3D(texture, texel + vec3(2, -2, 4) * pixel),
1205
+ texture3D(texture, texel + vec3(3, -2, 4) * pixel),
1206
+ texture3D(texture, texel + vec3(4, -2, 4) * pixel));
1207
+ vec4 t72 = filter1D_radius4(kernel, index, f.x,
1208
+ texture3D(texture, texel + vec3(-3, -1, 4) * pixel),
1209
+ texture3D(texture, texel + vec3(-2, -1, 4) * pixel),
1210
+ texture3D(texture, texel + vec3(-1, -1, 4) * pixel),
1211
+ texture3D(texture, texel + vec3(0, -1, 4) * pixel),
1212
+ texture3D(texture, texel + vec3(1, -1, 4) * pixel),
1213
+ texture3D(texture, texel + vec3(2, -1, 4) * pixel),
1214
+ texture3D(texture, texel + vec3(3, -1, 4) * pixel),
1215
+ texture3D(texture, texel + vec3(4, -1, 4) * pixel));
1216
+ vec4 t73 = filter1D_radius4(kernel, index, f.x,
1217
+ texture3D(texture, texel + vec3(-3, 0, 4) * pixel),
1218
+ texture3D(texture, texel + vec3(-2, 0, 4) * pixel),
1219
+ texture3D(texture, texel + vec3(-1, 0, 4) * pixel),
1220
+ texture3D(texture, texel + vec3(0, 0, 4) * pixel),
1221
+ texture3D(texture, texel + vec3(1, 0, 4) * pixel),
1222
+ texture3D(texture, texel + vec3(2, 0, 4) * pixel),
1223
+ texture3D(texture, texel + vec3(3, 0, 4) * pixel),
1224
+ texture3D(texture, texel + vec3(4, 0, 4) * pixel));
1225
+ vec4 t74 = filter1D_radius4(kernel, index, f.x,
1226
+ texture3D(texture, texel + vec3(-3, 1, 4) * pixel),
1227
+ texture3D(texture, texel + vec3(-2, 1, 4) * pixel),
1228
+ texture3D(texture, texel + vec3(-1, 1, 4) * pixel),
1229
+ texture3D(texture, texel + vec3(0, 1, 4) * pixel),
1230
+ texture3D(texture, texel + vec3(1, 1, 4) * pixel),
1231
+ texture3D(texture, texel + vec3(2, 1, 4) * pixel),
1232
+ texture3D(texture, texel + vec3(3, 1, 4) * pixel),
1233
+ texture3D(texture, texel + vec3(4, 1, 4) * pixel));
1234
+ vec4 t75 = filter1D_radius4(kernel, index, f.x,
1235
+ texture3D(texture, texel + vec3(-3, 2, 4) * pixel),
1236
+ texture3D(texture, texel + vec3(-2, 2, 4) * pixel),
1237
+ texture3D(texture, texel + vec3(-1, 2, 4) * pixel),
1238
+ texture3D(texture, texel + vec3(0, 2, 4) * pixel),
1239
+ texture3D(texture, texel + vec3(1, 2, 4) * pixel),
1240
+ texture3D(texture, texel + vec3(2, 2, 4) * pixel),
1241
+ texture3D(texture, texel + vec3(3, 2, 4) * pixel),
1242
+ texture3D(texture, texel + vec3(4, 2, 4) * pixel));
1243
+ vec4 t76 = filter1D_radius4(kernel, index, f.x,
1244
+ texture3D(texture, texel + vec3(-3, 3, 4) * pixel),
1245
+ texture3D(texture, texel + vec3(-2, 3, 4) * pixel),
1246
+ texture3D(texture, texel + vec3(-1, 3, 4) * pixel),
1247
+ texture3D(texture, texel + vec3(0, 3, 4) * pixel),
1248
+ texture3D(texture, texel + vec3(1, 3, 4) * pixel),
1249
+ texture3D(texture, texel + vec3(2, 3, 4) * pixel),
1250
+ texture3D(texture, texel + vec3(3, 3, 4) * pixel),
1251
+ texture3D(texture, texel + vec3(4, 3, 4) * pixel));
1252
+ vec4 t77 = filter1D_radius4(kernel, index, f.x,
1253
+ texture3D(texture, texel + vec3(-3, 4, 4) * pixel),
1254
+ texture3D(texture, texel + vec3(-2, 4, 4) * pixel),
1255
+ texture3D(texture, texel + vec3(-1, 4, 4) * pixel),
1256
+ texture3D(texture, texel + vec3(0, 4, 4) * pixel),
1257
+ texture3D(texture, texel + vec3(1, 4, 4) * pixel),
1258
+ texture3D(texture, texel + vec3(2, 4, 4) * pixel),
1259
+ texture3D(texture, texel + vec3(3, 4, 4) * pixel),
1260
+ texture3D(texture, texel + vec3(4, 4, 4) * pixel));
1261
+
1262
+ vec4 t0 = filter1D_radius4(kernel, index, f.y, t00, t01, t02, t03, t04, t05, t06, t07);
1263
+ vec4 t1 = filter1D_radius4(kernel, index, f.y, t10, t11, t12, t13, t14, t15, t16, t17);
1264
+ vec4 t2 = filter1D_radius4(kernel, index, f.y, t20, t21, t22, t23, t24, t25, t26, t27);
1265
+ vec4 t3 = filter1D_radius4(kernel, index, f.y, t30, t31, t32, t33, t34, t35, t36, t37);
1266
+ vec4 t4 = filter1D_radius4(kernel, index, f.y, t40, t41, t42, t43, t44, t45, t46, t47);
1267
+ vec4 t5 = filter1D_radius4(kernel, index, f.y, t50, t51, t52, t53, t54, t55, t56, t57);
1268
+ vec4 t6 = filter1D_radius4(kernel, index, f.y, t60, t61, t62, t63, t64, t65, t66, t67);
1269
+ vec4 t7 = filter1D_radius4(kernel, index, f.y, t70, t71, t72, t73, t74, t75, t76, t77);
1270
+ return filter1D_radius4(kernel, index, f.z, t0, t1, t2, t3, t4, t5, t6, t7);
1271
+ }
314
1272
 
315
- vec4 Bilinear(sampler2D texture, vec2 shape, vec2 uv)
316
- { return filter2D_radius1(texture, u_kernel, 0.031250, uv, 1.0/shape); }
1273
+ vec4 Nearest2D(sampler2D texture, vec2 shape, vec2 uv) {
1274
+ return texture2D(texture, uv);
1275
+ }
317
1276
 
318
- vec4 Hanning(sampler2D texture, vec2 shape, vec2 uv)
319
- { return filter2D_radius1(texture, u_kernel, 0.093750, uv, 1.0/shape); }
1277
+ vec4 Nearest3D(sampler3D texture, vec3 shape, vec3 uv) {
1278
+ return texture3D(texture, uv);
1279
+ }
320
1280
 
321
- vec4 Hamming(sampler2D texture, vec2 shape, vec2 uv)
322
- { return filter2D_radius1(texture, u_kernel, 0.156250, uv, 1.0/shape); }
1281
+ vec4 Linear2D(sampler2D texture, vec2 shape, vec2 uv) {
1282
+ return filter2D_radius1(texture, u_kernel, 0.03125, uv, 1 / shape);
1283
+ }
323
1284
 
324
- vec4 Hermite(sampler2D texture, vec2 shape, vec2 uv)
325
- { return filter2D_radius1(texture, u_kernel, 0.218750, uv, 1.0/shape); }
1285
+ vec4 Linear3D(sampler3D texture, vec3 shape, vec3 uv) {
1286
+ return filter3D_radius1(texture, u_kernel, 0.03125, uv, 1 / shape);
1287
+ }
326
1288
 
327
- vec4 Kaiser(sampler2D texture, vec2 shape, vec2 uv)
328
- { return filter2D_radius1(texture, u_kernel, 0.281250, uv, 1.0/shape); }
1289
+ vec4 Hanning2D(sampler2D texture, vec2 shape, vec2 uv) {
1290
+ return filter2D_radius1(texture, u_kernel, 0.09375, uv, 1 / shape);
1291
+ }
329
1292
 
330
- vec4 Quadric(sampler2D texture, vec2 shape, vec2 uv)
331
- { return filter2D_radius2(texture, u_kernel, 0.343750, uv, 1.0/shape); }
1293
+ vec4 Hanning3D(sampler3D texture, vec3 shape, vec3 uv) {
1294
+ return filter3D_radius1(texture, u_kernel, 0.09375, uv, 1 / shape);
1295
+ }
332
1296
 
333
- vec4 Bicubic(sampler2D texture, vec2 shape, vec2 uv)
334
- { return filter2D_radius2(texture, u_kernel, 0.406250, uv, 1.0/shape); }
1297
+ vec4 Hamming2D(sampler2D texture, vec2 shape, vec2 uv) {
1298
+ return filter2D_radius1(texture, u_kernel, 0.15625, uv, 1 / shape);
1299
+ }
335
1300
 
336
- vec4 CatRom(sampler2D texture, vec2 shape, vec2 uv)
337
- { return filter2D_radius2(texture, u_kernel, 0.468750, uv, 1.0/shape); }
1301
+ vec4 Hamming3D(sampler3D texture, vec3 shape, vec3 uv) {
1302
+ return filter3D_radius1(texture, u_kernel, 0.15625, uv, 1 / shape);
1303
+ }
338
1304
 
339
- vec4 Mitchell(sampler2D texture, vec2 shape, vec2 uv)
340
- { return filter2D_radius2(texture, u_kernel, 0.531250, uv, 1.0/shape); }
1305
+ vec4 Hermite2D(sampler2D texture, vec2 shape, vec2 uv) {
1306
+ return filter2D_radius1(texture, u_kernel, 0.21875, uv, 1 / shape);
1307
+ }
341
1308
 
342
- vec4 Spline16(sampler2D texture, vec2 shape, vec2 uv)
343
- { return filter2D_radius2(texture, u_kernel, 0.593750, uv, 1.0/shape); }
1309
+ vec4 Hermite3D(sampler3D texture, vec3 shape, vec3 uv) {
1310
+ return filter3D_radius1(texture, u_kernel, 0.21875, uv, 1 / shape);
1311
+ }
344
1312
 
345
- vec4 Spline36(sampler2D texture, vec2 shape, vec2 uv)
346
- { return filter2D_radius3(texture, u_kernel, 0.656250, uv, 1.0/shape); }
1313
+ vec4 Kaiser2D(sampler2D texture, vec2 shape, vec2 uv) {
1314
+ return filter2D_radius1(texture, u_kernel, 0.28125, uv, 1 / shape);
1315
+ }
347
1316
 
348
- vec4 Gaussian(sampler2D texture, vec2 shape, vec2 uv)
349
- { return filter2D_radius2(texture, u_kernel, 0.718750, uv, 1.0/shape); }
1317
+ vec4 Kaiser3D(sampler3D texture, vec3 shape, vec3 uv) {
1318
+ return filter3D_radius1(texture, u_kernel, 0.28125, uv, 1 / shape);
1319
+ }
350
1320
 
351
- vec4 Bessel(sampler2D texture, vec2 shape, vec2 uv)
352
- { return filter2D_radius4(texture, u_kernel, 0.781250, uv, 1.0/shape); }
1321
+ vec4 Quadric2D(sampler2D texture, vec2 shape, vec2 uv) {
1322
+ return filter2D_radius2(texture, u_kernel, 0.34375, uv, 1 / shape);
1323
+ }
353
1324
 
354
- vec4 Sinc(sampler2D texture, vec2 shape, vec2 uv)
355
- { return filter2D_radius4(texture, u_kernel, 0.843750, uv, 1.0/shape); }
1325
+ vec4 Quadric3D(sampler3D texture, vec3 shape, vec3 uv) {
1326
+ return filter3D_radius2(texture, u_kernel, 0.34375, uv, 1 / shape);
1327
+ }
356
1328
 
357
- vec4 Lanczos(sampler2D texture, vec2 shape, vec2 uv)
358
- { return filter2D_radius4(texture, u_kernel, 0.906250, uv, 1.0/shape); }
1329
+ vec4 Cubic2D(sampler2D texture, vec2 shape, vec2 uv) {
1330
+ return filter2D_radius2(texture, u_kernel, 0.40625, uv, 1 / shape);
1331
+ }
1332
+
1333
+ vec4 Cubic3D(sampler3D texture, vec3 shape, vec3 uv) {
1334
+ return filter3D_radius2(texture, u_kernel, 0.40625, uv, 1 / shape);
1335
+ }
359
1336
 
360
- vec4 Blackman(sampler2D texture, vec2 shape, vec2 uv)
361
- { return filter2D_radius4(texture, u_kernel, 0.968750, uv, 1.0/shape); }
1337
+ vec4 CatRom2D(sampler2D texture, vec2 shape, vec2 uv) {
1338
+ return filter2D_radius2(texture, u_kernel, 0.46875, uv, 1 / shape);
1339
+ }
362
1340
 
1341
+ vec4 CatRom3D(sampler3D texture, vec3 shape, vec3 uv) {
1342
+ return filter3D_radius2(texture, u_kernel, 0.46875, uv, 1 / shape);
1343
+ }
1344
+
1345
+ vec4 Mitchell2D(sampler2D texture, vec2 shape, vec2 uv) {
1346
+ return filter2D_radius2(texture, u_kernel, 0.53125, uv, 1 / shape);
1347
+ }
1348
+
1349
+ vec4 Mitchell3D(sampler3D texture, vec3 shape, vec3 uv) {
1350
+ return filter3D_radius2(texture, u_kernel, 0.53125, uv, 1 / shape);
1351
+ }
1352
+
1353
+ vec4 Spline162D(sampler2D texture, vec2 shape, vec2 uv) {
1354
+ return filter2D_radius2(texture, u_kernel, 0.59375, uv, 1 / shape);
1355
+ }
1356
+
1357
+ vec4 Spline163D(sampler3D texture, vec3 shape, vec3 uv) {
1358
+ return filter3D_radius2(texture, u_kernel, 0.59375, uv, 1 / shape);
1359
+ }
1360
+
1361
+ vec4 Spline362D(sampler2D texture, vec2 shape, vec2 uv) {
1362
+ return filter2D_radius3(texture, u_kernel, 0.65625, uv, 1 / shape);
1363
+ }
1364
+
1365
+ vec4 Spline363D(sampler3D texture, vec3 shape, vec3 uv) {
1366
+ return filter3D_radius3(texture, u_kernel, 0.65625, uv, 1 / shape);
1367
+ }
1368
+
1369
+ vec4 Gaussian2D(sampler2D texture, vec2 shape, vec2 uv) {
1370
+ return filter2D_radius2(texture, u_kernel, 0.71875, uv, 1 / shape);
1371
+ }
1372
+
1373
+ vec4 Gaussian3D(sampler3D texture, vec3 shape, vec3 uv) {
1374
+ return filter3D_radius2(texture, u_kernel, 0.71875, uv, 1 / shape);
1375
+ }
1376
+
1377
+ vec4 Bessel2D(sampler2D texture, vec2 shape, vec2 uv) {
1378
+ return filter2D_radius4(texture, u_kernel, 0.78125, uv, 1 / shape);
1379
+ }
1380
+
1381
+ vec4 Bessel3D(sampler3D texture, vec3 shape, vec3 uv) {
1382
+ return filter3D_radius4(texture, u_kernel, 0.78125, uv, 1 / shape);
1383
+ }
1384
+
1385
+ vec4 Sinc2D(sampler2D texture, vec2 shape, vec2 uv) {
1386
+ return filter2D_radius4(texture, u_kernel, 0.84375, uv, 1 / shape);
1387
+ }
1388
+
1389
+ vec4 Sinc3D(sampler3D texture, vec3 shape, vec3 uv) {
1390
+ return filter3D_radius4(texture, u_kernel, 0.84375, uv, 1 / shape);
1391
+ }
1392
+
1393
+ vec4 Lanczos2D(sampler2D texture, vec2 shape, vec2 uv) {
1394
+ return filter2D_radius4(texture, u_kernel, 0.90625, uv, 1 / shape);
1395
+ }
1396
+
1397
+ vec4 Lanczos3D(sampler3D texture, vec3 shape, vec3 uv) {
1398
+ return filter3D_radius4(texture, u_kernel, 0.90625, uv, 1 / shape);
1399
+ }
1400
+
1401
+ vec4 Blackman2D(sampler2D texture, vec2 shape, vec2 uv) {
1402
+ return filter2D_radius4(texture, u_kernel, 0.96875, uv, 1 / shape);
1403
+ }
1404
+
1405
+ vec4 Blackman3D(sampler3D texture, vec3 shape, vec3 uv) {
1406
+ return filter3D_radius4(texture, u_kernel, 0.96875, uv, 1 / shape);
1407
+ }