def reload_shaders(self):
        uniforms = []
        lines = []

        # Collect all samplers and generate the required uniforms and copy code
        for i, (from_tex, to_tex) in enumerate(self._transfers):
            index = str(i)
            uniforms.append(self.get_sampler_type(from_tex) + " SrcTex" + index)
            uniforms.append(self.get_sampler_type(to_tex, True) + " DestTex" + index)
            lines += [
                "\n  // Copying " + from_tex.get_name() + " to " + to_tex.get_name(),
                self.get_sampler_lookup(from_tex, "data" + index, "SrcTex" + index, "coord_2d_int"),
                self.get_store_code(to_tex, "DestTex" + index, "coord_2d_int", "data" + index),
                "\n",
            ]

        # Actually create the shader
        fragment = "#version 430\n"
        fragment += "\n// Autogenerated, do not edit! Your changes will be lost.\n\n"
        for uniform in uniforms:
            fragment += "uniform " + uniform + ";\n"
        fragment += "\nvoid main() {\n"
        fragment += "  ivec2 coord_2d_int = ivec2(gl_FragCoord.xy);\n"
        for line in lines:
            fragment += "  " + line + "\n"
        fragment += "}\n"

        # Write the shader
        shader_dest = "/$$rptemp/$$update_previous_pipes.frag.glsl"
        with open(shader_dest, "w") as handle:
            handle.write(fragment)

        # Load it back again
        self._target.shader = self.load_shader(shader_dest)
This method augo-generates a shader which copies all textures specified
dataset/ETHPy150Open tobspr/RenderPipeline/rpcore/stages/update_previous_pipes_stage.py/UpdatePreviousPipesStage.reload_shaders