def _make_diffuse_target(self):
        """ Internal method to create the diffuse cubemap """

        # Create the target which integrates the lambert brdf
        self._diffuse_target = self._stage.create_target("CF:DiffuseIBL")
        self._diffuse_target.size = (CubemapFilter.PREFILTER_CUBEMAP_SIZE * 6, CubemapFilter.PREFILTER_CUBEMAP_SIZE)
        self._diffuse_target.prepare_buffer()

        self._diffuse_target.set_shader_inputs(
            SourceCubemap=self._specular_map,
            DestCubemap=self._prefilter_map,
            cubeSize=CubemapFilter.PREFILTER_CUBEMAP_SIZE
        )

        # Create the target which removes the noise from the previous target,
        # which is introduced with importance sampling
        self._diff_filter_target = self._stage.create_target("CF:DiffPrefIBL")
        self._diff_filter_target.size = (CubemapFilter.DIFFUSE_CUBEMAP_SIZE * 6, CubemapFilter.DIFFUSE_CUBEMAP_SIZE)
        self._diff_filter_target.prepare_buffer()

        self._diff_filter_target.set_shader_inputs(
            SourceCubemap=self._prefilter_map,
            DestCubemap=self._diffuse_map,
            cubeSize=CubemapFilter.DIFFUSE_CUBEMAP_SIZE
        )
 Internal method to create the diffuse cubemap 
metadrive/render_pipeline/rpcore/util/cubemap_filter.py