A star filter is a physical or digital light filter that creates a star-like visual effect out of a light source. The effect turns a light source or other highlights in an image into a star-shaped element, with light seemingly striking out of a central source.
A star filter creates a star pattern using a very fine diffraction grating embedded in the filter, or sometimes by the use of prisms in the filter. The number of stars varies by the construction of the filter, as does the number of points each star has.
A similar effect is achieved by photographing bright lights through a window screen with vertical and horizontal wires. The angles of the bars of the cross depend on the orientation of the screen relative to the camera.
In amateur astrophotography, a Bahtinov mask can be used to focus small astronomical telescopes accurately. Light from a bright point such as an isolated bright star reaching different quadrants of the primary mirror or lens is first passed through grilles at three different orientations. Half of the mask generates a narrow "X" shape from four diffraction spikes; the other half generates a straight line from two spikes. Changing the focus causes the shapes to move with respect to each other, as shown in the illustration. When the line passes exactly through the middle of the "X", the telescope is in focus and the mask can then be removed.