Object boundaries in the natural environment are often defined by changes in luminance; in other cases, however, there may be no difference in average luminance across the boundary, which is instead defined by more subtle 'second-order' cues, such as changes in the contrast of a fine-grained texture. The detection of luminance boundaries may be readily explained in terms of visual cortical neurons, which compute the linear sum of the excitatory and inhibitory inputs to different parts of their receptive field. The detection of second-order stimuli is less well understood, but is thought to involve a separate nonlinear processing stream, in which boundary detectors would receive inputs from many smaller subunits. To address this, we have examined the properties of cortical neurons which respond to both first- and second-order stimuli. We show that the inputs to these neurons are also oriented, but with no fixed orientational relationship to the neurons they subserve. Our results suggest a flexible mechanism by which the visual cortex can detect object boundaries regardless of whether they are defined by luminance or texture.