All V-Ray-related classes and functions are defined in a separate namespace, the VR:: namespace. See the notes in the V-Ray support classes section.
The V-Ray Image Sampling API represents the way V-Ray constructs the final rendered image.
class OutputRegionSampler
class OutputRegion
class ImageFunction
class ImageFilter
class FragmentList
class Fragment
class FragmentManager
Additional topics:
V-Ray Shading SDK additional classes
The V-Ray Image Sampling API is concerned with how the final rendered image is constructed.
The central concept to the image sampling API is the image sampler, which is represented by an instance of class OutputRegionSampler. This class has a single method, sampleRegion() which is responsible for rendering a given region (bucket) of the final image. The bucket is passed to the image sampler as an instance of class OutputRegion.
V-Ray comes with several default image samplers - a fixed, adaptive dmc and adaptive subdivison samplers. Along with their specific parameters, they require an image function that will be sampled. This is represented by an instance of class ImageFunction. In addition, the image samplers take as a parameter an instance of class ImageFilter. The task of the image samplers is to sample the ImageFunction in some suitable way, filter it with the ImageFilter, compute the final pixel values and pass those values to the OutputRegion.
The image sampler has no information about the format in which the final image is stored; instead it operates on individual image samples, represented by instances of class FragmentList. The FragmentList is a list of Fragments, which store information about the specific image sample (color, transparency, z-depth etc). The OutputRegion provides methods for generating new FragmentLists for use by the image sampler and for storing the final pixel FragmentLists into the image buffer. The default image samplers pass a FragmentList to the ImageFunction, which must fill it with Fragments with the appropriate values for the specific image sample. The reason there are multiple Fragments in a single FragmentList is because it may be convenient to separate the individual sub-samples in a pixel into different groups, for example based on which object was shaded to produce the samples.
Also, the image sampler has no information about the kind of information stored in the Fragments. It is the responsibility of the ImageFunction, in conjunction with the scene shaders, to fill the appropriate information. Shaders have access to the Fragments for the current FragmentList (image sample) that is being computed by the ImageFunction through methods of class VRayContext. Thus they can store any kind of information supported by the OutputRegion.