Comb-layered quartz is a type of unidirectional solidification texture found at the roofs of shallow silicic intrusions that are often associated spatially with Mo and W mineralisation. The texture consists of multiple layers of euhedral, prismatic quartz crystals (Type I) that have grown on subplanar aplite substrates. The layers are separated by porphyritic aplite containing equant phenocrysts of quartz (Type II), which resemble quartz typical of volcanic rocks and porphyry intrusions. At Logtung, Type I quartz within comb layers is zoned with respect to a number of trace elements, including Al and K. Concentrations of these elements as well as Mn, Ti, Ge, Rb and H are anomalous and much higher than found in Type II quartz from Logtung or in igneous quartz reported elsewhere. The two populations appear to have formed under different conditions. The Type II quartz phenocrysts almost certainly grew from a high-silica melt between 600 and 800°C (as β-quartz); in contrast, the morphology of Type I quartz is consistent with precipitation from a hydrothermal solution, possibly as α-quartz grown below 600°C. The bulk compositions of comb-layered rocks, as well as the aplite interlayers, are consistent with the hypothesis that these textures did not precipitate solely from a crystallising silicate melt. Instead, Type I quartz may have grown from pockets of exsolved magmatic fluid located between the magma and its crystallised border. The Type II quartz represents pre-existing phenocrysts in the underlying magma; this magma was quenched to aplite during fracturing/degassing events. Renewed and repeated formation and disruption of the pockets of exsolved aqueous fluid accounts for the rhythmic banding of the rocks.