160 output.allocate_texture(domain);
167 float3 color_x = float3(0.0f);
168 float3 color_y = float3(0.0f);
169 for (int j = 0; j < 3; j++) {
170 for (int i = 0; i < 3; i++) {
171 float3 color = input.load_pixel_extended<float4>(texel + int2(i - 1, j - 1)).xyz();
172 color_x += color * kernel[j][i];
173 color_y += color * kernel[i][j];
194 float4 color = float4(0.0f);
195 for (int j = 0; j < 3; j++) {
196 for (int i = 0; i < 3; i++) {
197 color += input.load_pixel_extended<float4>(texel + int2(i - 1, j - 1)) * kernel[j][i];
203 input.load_pixel<
float4>(texel),
color, factor.load_pixel<
float,
true>(texel));
235 const float kernel[3][3] = {{1.0f / 16.0f, 2.0f / 16.0f, 1.0f / 16.0f},
236 {2.0f / 16.0f, 4.0f / 16.0f, 2.0f / 16.0f},
237 {1.0f / 16.0f, 2.0f / 16.0f, 1.0f / 16.0f}};
241 const float kernel[3][3] = {
242 {-1.0f, -1.0f, -1.0f}, {-1.0f, 9.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}};
246 const float kernel[3][3] = {{-1.0f / 8.0f, -1.0f / 8.0f, -1.0f / 8.0f},
247 {-1.0f / 8.0f, 1.0f, -1.0f / 8.0f},
248 {-1.0f / 8.0f, -1.0f / 8.0f, -1.0f / 8.0f}};
252 const float kernel[3][3] = {{1.0f, 0.0f, -1.0f}, {2.0f, 0.0f, -2.0f}, {1.0f, 0.0f, -1.0f}};
256 const float kernel[3][3] = {{1.0f, 0.0f, -1.0f}, {1.0f, 0.0f, -1.0f}, {1.0f, 0.0f, -1.0f}};
260 const float kernel[3][3] = {
261 {5.0f, -3.0f, -2.0f}, {5.0f, -3.0f, -2.0f}, {5.0f, -3.0f, -2.0f}};
265 const float kernel[3][3] = {{1.0f, 2.0f, 1.0f}, {0.0f, 1.0f, 0.0f}, {-1.0f, -2.0f, -1.0f}};
269 const float kernel[3][3] = {
270 {0.0f, -1.0f, 0.0f}, {-1.0f, 5.0f, -1.0f}, {0.0f, -1.0f, 0.0f}};
275 const float kernel[3][3] = {{0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 0.0f}};