Map

Map object computes the mapping coordinate projection from the given parameter. The object is compatible with all material mapping objects which use a 3D geometry to define the mapping function. Surface defined coordinates (vertex variable interpolation etc.) are not supported.

One important use of the Map object is to provide a consistent parametrization for randomized sampling. For example, a volumetric fog shader may change the sampling position sligthly to examine the surrounding volume better:

  volume properties
    vector variable pos
    vector variable mc
    vector variable delta
    delta = random(map coords)
    pos = add(coordinates, delta)
    mc = Map(pos)
    turbidity = Noise(mc)
    ...

This kind of fog density definition appears consistent for a moving camera, self-shadowing fog etc.