+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ check_error();
+
+ int input_size = (direction == VERTICAL) ? input_height : input_width;
+ if (last_fft_size != fft_size ||
+ last_direction != direction ||
+ last_pass_number != pass_number ||
+ last_inverse != inverse ||
+ last_input_size != input_size) {
+ generate_support_texture();
+ }
+
+ set_uniform_int(glsl_program_num, prefix, "support_tex", *sampler_num);
+ ++*sampler_num;
+
+ assert(input_size % fft_size == 0);
+ set_uniform_float(glsl_program_num, prefix, "num_repeats", input_size / fft_size);
+}
+
+void FFTPassEffect::generate_support_texture()
+{
+ int input_size = (direction == VERTICAL) ? input_height : input_width;