def _load_mesh_terrain_textures(self, engine, anisotropic_degree=16, filter_type=Texture.FTLinearMipmapLinear):
        """
        Only maintain one copy of all asset
        :param anisotropic_degree: https://docs.panda3d.org/1.10/python/programming/texturing/texture-filter-types
        :param filter_type: https://docs.panda3d.org/1.10/python/programming/texturing/texture-filter-types
        :return: None
        """
        # texture stage
        self.ts_color = TextureStage("color")
        self.ts_normal = TextureStage("normal")
        self.ts_normal.setMode(TextureStage.M_normal)

        # grass
        self.grass_tex = self.loader.loadTexture(
            AssetLoader.file_path("textures", "grass1", "GroundGrassGreen002_COL_1K.jpg")
        )
        self.grass_normal = self.loader.loadTexture(
            AssetLoader.file_path("textures", "grass1", "GroundGrassGreen002_NRM_1K.jpg")
        )

        white = PNMImage(256, 256, 4)
        white.fill(1., 1., 1.)
        self.grass_rough = Texture("grass rough")
        self.grass_rough.load(white)
        self.grass_tex_ratio = 64 * self._terrain_size / 512

        v_wrap = Texture.WMRepeat
        u_warp = Texture.WMMirror

        for tex in [self.grass_tex, self.grass_normal, self.grass_rough]:
            tex.set_wrap_u(u_warp)
            tex.set_wrap_v(v_wrap)
            tex.setMinfilter(filter_type)
            tex.setMagfilter(filter_type)
            tex.setAnisotropicDegree(1)

        # rock
        self.rock_tex = self.loader.loadTexture(
            AssetLoader.file_path("textures", "rock", "brown_mud_leaves_01_diff_1k.png")
        )
        self.rock_normal = self.loader.loadTexture(
            AssetLoader.file_path("textures", "rock", "brown_mud_leaves_01_nor_gl_1k.png")
        )
        self.rock_rough = self.loader.loadTexture(
            AssetLoader.file_path("textures", "rock", "brown_mud_leaves_01_rough_1k.png")
        )
        self.rock_tex_ratio = 512 * self._terrain_size / 2048

        v_wrap = Texture.WMRepeat
        u_warp = Texture.WMMirror

        for tex in [self.rock_tex, self.rock_normal, self.rock_rough]:
            tex.set_wrap_u(u_warp)
            tex.set_wrap_v(v_wrap)
            tex.setMinfilter(filter_type)
            tex.setMagfilter(filter_type)
            tex.setAnisotropicDegree(1)

        # rock 2
        self.rock_tex_2 = self.loader.loadTexture(
            AssetLoader.file_path("textures", "grass2", "grass_path_2_diff_1k.png")
        )
        self.rock_normal_2 = self.loader.loadTexture(
            AssetLoader.file_path("textures", "grass2", "grass_path_2_nor_gl_1k.png")
        )
        self.rock_rough_2 = self.loader.loadTexture(
            AssetLoader.file_path("textures", "grass2", "grass_path_2_rough_1k.png")
        )
        self.rock_tex_ratio_2 = 256 * self._terrain_size / 2048

        v_wrap = Texture.WMRepeat
        u_warp = Texture.WMMirror

        for tex in [self.rock_tex_2, self.rock_normal_2, self.rock_rough_2]:
            tex.set_wrap_u(u_warp)
            tex.set_wrap_v(v_wrap)
            tex.setMinfilter(filter_type)
            tex.setMagfilter(filter_type)

        # # sidewalk
        # self.side_tex = self.loader.loadTexture(AssetLoader.file_path("textures", "sidewalk", "color.png"))
        # self.side_normal = self.loader.loadTexture(AssetLoader.file_path("textures", "sidewalk", "normal.png"))
        #
        # v_wrap = Texture.WMRepeat
        # u_warp = Texture.WMMirror
        #
        # for tex in [self.side_tex, self.side_normal]:
        #     tex.set_wrap_u(u_warp)
        #     tex.set_wrap_v(v_wrap)
        #     tex.setMinfilter(filter_type)
        #     tex.setMagfilter(filter_type)
        #     tex.setAnisotropicDegree(1)

        # Road surface
        self.road_texture = self.loader.loadTexture(AssetLoader.file_path("textures", "asphalt", "diff_2k.png"))
        self.road_texture_normal = self.loader.loadTexture(
            AssetLoader.file_path("textures", "asphalt", "normal_2k.png")
        )
        self.road_texture_rough = self.loader.loadTexture(AssetLoader.file_path("textures", "asphalt", "rough_2k.png"))
        self.road_tex_ratio = 128 * self._terrain_size / 2048
        v_wrap = Texture.WMRepeat
        u_warp = Texture.WMMirror
        filter_type = Texture.FTLinearMipmapLinear
        for tex in [self.road_texture_rough, self.road_texture, self.road_texture_normal]:
            tex.set_wrap_u(u_warp)
            tex.set_wrap_v(v_wrap)
            tex.setMinfilter(filter_type)
            tex.setMagfilter(filter_type)
            tex.setAnisotropicDegree(1)
        # self.road_texture_displacement = self.loader.loadTexture(AssetLoader.file_path("textures", "sci", "normal.jpg"))
        # self.road_texture.setMinfilter(minfilter)
        # self.road_texture.setAnisotropicDegree(1)

        # lane line
        # white_lane_line = PNMImage(256, 256, 4)
        # white_lane_line.fill(1., 1., 1.)
        # self.white_lane_line = Texture("white lane line")
        # self.white_lane_line.load(white_lane_line)
        #
        # yellow_lane_line = PNMImage(256, 256, 4)
        # yellow_lane_line.fill(*(255 / 255, 200 / 255, 0 / 255))
        # self.yellow_lane_line = Texture("white lane line")
        # self.yellow_lane_line.load(yellow_lane_line)

        # crosswalk
        tex = np.frombuffer(self.road_texture.getRamImage().getData(), dtype=np.uint8)
        tex = tex.copy()
        tex = tex.reshape((self.road_texture.getYSize(), self.road_texture.getXSize(), 3))
        step_size = 64
        for x in range(0, 2048, step_size * 2):
            tex[x:x + step_size, ...] = 220
        self.crosswalk_tex = Texture()
        self.crosswalk_tex.setup2dTexture(*tex.shape[:2], Texture.TUnsignedByte, Texture.F_rgb)
        self.crosswalk_tex.setRamImage(tex)
        # self.crosswalk_tex.write("test_crosswalk.png")

        Only maintain one copy of all asset
        :param anisotropic_degree: https://docs.panda3d.org/1.10/python/programming/texturing/texture-filter-types
        :param filter_type: https://docs.panda3d.org/1.10/python/programming/texturing/texture-filter-types
        :return: None
        
metadrive/engine/core/terrain.py