Detection of visual borders is an essential function for transforming the visual scene into perceivable boundaries. Avian predators, for example, are able to recognize complex textured borders of conspicuous prey. It has been suggested that the process of border perception begins as early as in the retina through a class of ganglion cell, the local edge detector (LED), which responds selectively to luminance edges. But what neuronal circuitry is used to accomplish this, and can this circuitry also be used to detect complex textured borders? Here we use patch-clamp electrophysiology to show that selectivity to luminance edges in the LED is accomplished by surround-originated feedback inhibition that suppresses excitation via GABAa and GABAc receptors. Furthermore, we find that excitatory circuitry has several characteristics that facilitate independent responses of individual bipolar cells to features as small as one-eighth the size of the LED's receptive field. This enables the LED to respond to areas of texture even if they contain no net luminance change. We observed that feedback inhibition is similarly activated by small features, which in turn causes excitation not only to respond selectively to luminance edges, but also to boundaries of luminance-neutral texture in synthetic and natural scenes, as well as a noise-suppression function suggested by modeling. We also characterized direct feedforward inhibition to the LED, and found it to be cospatial with excitation, glycinergic, and sensitive to small features as well. These characteristics enable the suppression of spikes during rapid luminance shifts, encoding an "edge in time". Our results suggest mechanisms by which three kinds of edges can be encoded by the retina and transmitted through a specialized channel to higher visual areas in the brain.