Engineering optical properties using layered metamaterials