139 output.allocate_texture(domain);
146 float3 color_x = float3(0.0f);
147 float3 color_y = float3(0.0f);
148 for (int j = 0; j < 3; j++) {
149 for (int i = 0; i < 3; i++) {
150 float3 color = input.load_pixel_extended<float4>(texel + int2(i - 1, j - 1)).xyz();
151 color_x += color * kernel[j][i];
152 color_y += color * kernel[i][j];
164 color.
xyz(), magnitude, factor.
load_pixel<
float,
true>(texel));
173 float4 color = float4(0.0f);
174 for (int j = 0; j < 3; j++) {
175 for (int i = 0; i < 3; i++) {
176 color += input.load_pixel_extended<float4>(texel + int2(i - 1, j - 1)) * kernel[j][i];
182 input.load_pixel<
float4>(texel), color, factor.load_pixel<
float,
true>(texel));
212 switch (get_filter_method()) {
214 const float kernel[3][3] = {{1.0f / 16.0f, 2.0f / 16.0f, 1.0f / 16.0f},
215 {2.0f / 16.0f, 4.0f / 16.0f, 2.0f / 16.0f},
216 {1.0f / 16.0f, 2.0f / 16.0f, 1.0f / 16.0f}};
220 const float kernel[3][3] = {
221 {-1.0f, -1.0f, -1.0f}, {-1.0f, 9.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}};
225 const float kernel[3][3] = {{-1.0f / 8.0f, -1.0f / 8.0f, -1.0f / 8.0f},
226 {-1.0f / 8.0f, 1.0f, -1.0f / 8.0f},
227 {-1.0f / 8.0f, -1.0f / 8.0f, -1.0f / 8.0f}};
231 const float kernel[3][3] = {{1.0f, 0.0f, -1.0f}, {2.0f, 0.0f, -2.0f}, {1.0f, 0.0f, -1.0f}};
235 const float kernel[3][3] = {{1.0f, 0.0f, -1.0f}, {1.0f, 0.0f, -1.0f}, {1.0f, 0.0f, -1.0f}};
239 const float kernel[3][3] = {
240 {5.0f, -3.0f, -2.0f}, {5.0f, -3.0f, -2.0f}, {5.0f, -3.0f, -2.0f}};
244 const float kernel[3][3] = {{1.0f, 2.0f, 1.0f}, {0.0f, 1.0f, 0.0f}, {-1.0f, -2.0f, -1.0f}};
248 const float kernel[3][3] = {
249 {0.0f, -1.0f, 0.0f}, {-1.0f, 5.0f, -1.0f}, {0.0f, -1.0f, 0.0f}};
253 const float kernel[3][3] = {{0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 0.0f}};