Example embodiments include a lens having an IR-reflective coating that is selectively applied to form a variable infrared (IR) interaction pattern on the lens. The variable IR interaction pattern may vary in the manner it interacts with IR wavelengths, so as to provide a machine-readable code when the lens is illuminated by IR light. Accordingly, variable IR interaction patterns may be used to identify particular lenses. Accordingly, a glasses-style, modular, head-mountable device (HMD) may identify which of a number of different possible lenses are currently attached to the HMD, and update certain processes according to the lens or lenses is or are attached. For example, an HMD may calibrate an eye-tracking process according to the particular lens that is attached.