An optical device for forming in use a distribution of a three-dimensional light field, said optical device comprising: an array of unit cells, wherein a unit cell in the array of unit cells is individually addressed in use for controlling an optical property of the unit cell; each unit cell in the array of unit cells comprising a stack (110; 130) including: at least one electrode (112, 124; 132; 202, 204) for receiving a control signal for controlling in use the optical property of the unit cell; and a resonance defining layer, comprising at least a phase change material, PCM, layer, wherein the resonance defining layer is patterned to define a geometric structure, wherein the geometric structure (114; 136) is dimensioned at least in a plane of the resonance defining layer for defining a wavelength-dependency of resonance of an incoming light beam in the plane of the resonance defining layer, wherein a dimension of the geometric structure (114; 136) in the plane of the resonance defining layer is defined by a diameter of a circular shape or by a length corresponding to a size of an edge of the geometric structure (114; 136), and wherein the dimension of the geometric structure (114; 136) is smaller than λ/2, wherein λ is a wavelength of light of the incoming light beam to be used with the unit cell; wherein the at least one electrode (112, 124; 132; 202, 204) is configured to cause in use a phase change of the phase change material between a first state and a second state based on receiving the control signal and wherein the phase change of the phase change material alters a wavelength-dependency of resonance in the plane of the resonance defining layer for controlling the optical property of the unit cell; wherein unit cells in the array of unit cells are separated such that the PCM layer of a unit cell is separated from the PCM layer in an adjacent unit cell. an array of unit cells, wherein a unit cell in the array of unit cells is individually addressed in use for controlling an optical property of the unit cell; each unit cell in the array of unit cells comprising a stack (110; 130) including: at least one electrode (112, 124; 132; 202, 204) for receiving a control signal for controlling in use the optical property of the unit cell; and a resonance defining layer, comprising at least a phase change material, PCM, layer, wherein the resonance defining layer is patterned to define a geometric structure, wherein the geometric structure (114; 136) is dimensioned at least in a plane of the resonance defining layer for defining a wavelength-dependency of resonance of an incoming light beam in the plane of the resonance defining layer, wherein a dimension of the geometric structure (114; 136) in the plane of the resonance defining layer is defined by a diameter of a circular shape or by a length corresponding to a size of an edge of the geometric structure (114; 136), and wherein the dimension of the geometric structure (114; 136) is smaller than λ/2, wherein λ is a wavelength of light of the incoming light beam to be used with the unit cell; wherein the at least one electrode (112, 124; 132; 202, 204) is configured to cause in use a phase change of the phase change material between a first state and a second state based on receiving the control signal and wherein the phase change of the phase change material alters a wavelength-dependency of resonance in the plane of the resonance defining layer for controlling the optical property of the unit cell; at least one electrode (112, 124; 132; 202, 204) for receiving a control signal for controlling in use the optical property of the unit cell; and a resonance defining layer, comprising at least a phase change material, PCM, layer, wherein the resonance defining layer is patterned to define a geometric structure, wherein the geometric structure (114; 136) is dimensioned at least in a plane of the resonance defining layer for defining a wavelength-dependency of resonance of an incoming light beam in the plane of the resonance defining layer, wherein a dimension of the geometric structure (114; 136) in the plane of the resonance defining layer is defined by a diameter of a circular shape or by a length corresponding to a size of an edge of the geometric structure (114; 136), and wherein the dimension of the geometric structure (114; 136) is smaller than λ/2, wherein λ is a wavelength of light of the incoming light beam to be used with the unit cell; wherein the at least one electrode (112, 124; 132; 202, 204) is configured to cause in use a phase change of the phase change material between a first state and a second state based on receiving the control signal and wherein the phase change of the phase change material alters a wavelength-dependency of resonance in the plane of the resonance defining layer for controlling the optical property of the unit cell; wherein unit cells in the array of unit cells are separated such that the PCM layer of a unit cell is separated from the PCM layer in an adjacent unit cell.