amdSeperateFiles :: FilePath -> Text -> CubeMapSelection
amdSeperateFiles dir ext = CubeMapSelection
    { selectionDirectory     = dir
    , selectionFiles         = matchFiles
    , selectionLevelAndSide  = matchLevelAndSide
    }
    where
    matchFiles f = (fpToString f) =~ ("^[[:alnum:]]*_m[[:digit:]]{1,2}_c[[:digit:]]{1,2}\\." ++unpack ext++"$")
    matchLevelAndSide f =
        let sub :: String
            sub = (fpToString f) =~ (asString "_m[[:digit:]]{1,2}_c[[:digit:]]{1,2}\\.")
            nums :: [Int]
            nums = (concatMap . map) read (sub =~ (asString "[[:digit:]]{1,2}") :: [[String]])
        in (nums!!0, toCubeSide $ nums !! 1)
    toCubeSide i = toList glFaceTargets !! i
amdSeperateFiles :: FilePath -> Text -> CubeMapSelection
amdSeperateFiles dir ext = CubeMapSelection
    { selectionDirectory     = dir
    , selectionFiles         = matchFiles
    , selectionLevelAndSide  = matchLevelAndSide
    }
    where
    matchFiles f = (fpToString f) =~ ("^[[:alnum:]]*_m[[:digit:]]{1,2}_c[[:digit:]]{1,2}\\." ++unpack ext++"$")
    matchLevelAndSide f =
        let sub :: String
            sub = (fpToString f) =~ (asString "_m[[:digit:]]{1,2}_c[[:digit:]]{1,2}\\.")
            nums :: [Int]
            nums = (concatMap . map) read (sub =~ (asString "[[:digit:]]{1,2}") :: [[String]])
        in (nums!!0, toCubeSide $ nums !! 1)
    toCubeSide i = toList glFaceTargets !! i
amdSeperateFiles dir ext = CubeMapSelection
    { selectionDirectory     = dir
    , selectionFiles         = matchFiles
    , selectionLevelAndSide  = matchLevelAndSide
    }
    where
    matchFiles f = (fpToString f) =~ ("^[[:alnum:]]*_m[[:digit:]]{1,2}_c[[:digit:]]{1,2}\\." ++unpack ext++"$")
    matchLevelAndSide f =
        let sub :: String
            sub = (fpToString f) =~ (asString "_m[[:digit:]]{1,2}_c[[:digit:]]{1,2}\\.")
            nums :: [Int]
            nums = (concatMap . map) read (sub =~ (asString "[[:digit:]]{1,2}") :: [[String]])
        in (nums!!0, toCubeSide $ nums !! 1)
    toCubeSide i = toList glFaceTargets !! i