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++) {
172 float4(input.load_pixel_extended<Color>(texel + int2(i - 1, j - 1))).xyz();
173 color_x += color * kernel[j][i];
174 color_y += color * kernel[i][j];
195 float4 color = float4(0.0f);
196 for (int j = 0; j < 3; j++) {
197 for (int i = 0; i < 3; i++) {
198 color += float4(input.load_pixel_extended<Color>(texel + int2(i - 1, j - 1))) *
205 float4(input.load_pixel<
Color>(texel)),
color, factor.load_pixel<
float,
true>(texel));
237 const float kernel[3][3] = {{1.0f / 16.0f, 2.0f / 16.0f, 1.0f / 16.0f},
238 {2.0f / 16.0f, 4.0f / 16.0f, 2.0f / 16.0f},
239 {1.0f / 16.0f, 2.0f / 16.0f, 1.0f / 16.0f}};
243 const float kernel[3][3] = {
244 {-1.0f, -1.0f, -1.0f}, {-1.0f, 9.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}};
248 const float kernel[3][3] = {{-1.0f / 8.0f, -1.0f / 8.0f, -1.0f / 8.0f},
249 {-1.0f / 8.0f, 1.0f, -1.0f / 8.0f},
250 {-1.0f / 8.0f, -1.0f / 8.0f, -1.0f / 8.0f}};
254 const float kernel[3][3] = {{1.0f, 0.0f, -1.0f}, {2.0f, 0.0f, -2.0f}, {1.0f, 0.0f, -1.0f}};
258 const float kernel[3][3] = {{1.0f, 0.0f, -1.0f}, {1.0f, 0.0f, -1.0f}, {1.0f, 0.0f, -1.0f}};
262 const float kernel[3][3] = {
263 {5.0f, -3.0f, -2.0f}, {5.0f, -3.0f, -2.0f}, {5.0f, -3.0f, -2.0f}};
267 const float kernel[3][3] = {{1.0f, 2.0f, 1.0f}, {0.0f, 1.0f, 0.0f}, {-1.0f, -2.0f, -1.0f}};
271 const float kernel[3][3] = {
272 {0.0f, -1.0f, 0.0f}, {-1.0f, 5.0f, -1.0f}, {0.0f, -1.0f, 0.0f}};
277 const float kernel[3][3] = {{0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 0.0f}};