def _prepare_attributes(self):
        """ Prepares all shaderAttributes, so that we have a list of
        ShaderAttributes we can simply walk through in the update method,
        that is MUCH faster than using set_shader_input, as each call to
        set_shader_input forces the generation of a new ShaderAttrib """
        self.attributes = []
        textures = [self.ping_texture, self.pong_texture]

        current_index = 0
        firstPass = True

        # Horizontal
        for step in range(self.log2_size):
            source = textures[current_index]
            dest = textures[1 - current_index]

            if firstPass:
                source = self.source_tex
                firstPass = False

            index = self.log2_size - step - 1
            self.horizontal_fft.set_shader_input("source", source)
            self.horizontal_fft.set_shader_input("dest", dest)
            self.horizontal_fft.set_shader_input("butterflyIndex", LVecBase2i(index))
            self._queue_shader(self.horizontal_fft)
            current_index = 1 - current_index

        # Vertical
        for step in range(self.log2_size):
            source = textures[current_index]
            dest = textures[1 - current_index]
            is_last_pass = step == self.log2_size - 1
            if is_last_pass:
                dest = self.result_texture
            index = self.log2_size - step - 1
            self.vertical_fft.set_shader_input("source", source)
            self.vertical_fft.set_shader_input("dest", dest)
            self.vertical_fft.set_shader_input("isLastPass", is_last_pass)
            self.vertical_fft.set_shader_input("normalizationFactor", self.normalization_factor)
            self.vertical_fft.set_shader_input("butterflyIndex", LVecBase2i(index))
            self._queue_shader(self.vertical_fft)

            current_index = 1 - current_index
 Prepares all shaderAttributes, so that we have a list of
        ShaderAttributes we can simply walk through in the update method,
        that is MUCH faster than using set_shader_input, as each call to
        set_shader_input forces the generation of a new ShaderAttrib 
metadrive/render_pipeline/rpcore/water/gpu_fft.py