The Sampler texture is a utility for building shader networks. It is capable of extracting a variety of information for each point on a surface.
The Sampler texture provides information about various aspects of the shaded points such as position, normal, bump normal, reflection/refraction vectors and UVW coordinates. It can be used either for world position passes or normal passes. It also extracts information about the scene, converting the gathered information into RGB data for use in compositing.
It can be also used to drive a material channel to achieve various effects. This can provide more render passes with information that can allow more possibilities to editing during the compositing process.