...
In the simple example above, outColor is assigned the buffer that was allocated corresponding to the private enumeration value k_resultRGB
, which matches the position of that output in the parameter table. We (So long as the output parameters are at the beginning of the parameter table, reuse of this enumeration is valid for this purpose.) We assume the style
variable was a uniform RtInt
input value, so there is only one value for all the points in the shading context. Meanwhile, the inputColor
and inputFloat
variable were varying instead of uniform, so they are pointers to an array of RtColorRGB
values and array of RtFloat
values respectively, one for each shaded point in the shading context.
...