sj_radio is a set of shaders that can be used to exchange data between different objects while rendering.
With data, we mean one of the standard mental ray types: boolean, color, integer, scalar, vector.
It all works like a radio: there is a broadcaster (sj_radio_broadcast) than can send signals (of the listed types)
on a given frequency, and several receivers (sj_radio_*) that can "listen" on that frequency.
Signals can be sent only top-down along the raytracing tree. For instance a material shader can emit a color on a given frequency,
that can be received from all the shaders (light, texture, materials) that will be evaluated because of the material.
sj_radio_broadcast can send up to 10 signals for each of the standard types.
After sending the signals, the Color parameter is evaluated.
On the other end you can have the receivers (sj_radio_boolean, sj_radio_color, sj_radio_integer, sj_radio_scalar, sj_radio_vector).
Each of them has a default value, that is returned if the Frequency is off or if no signal was found for that Frequency.
Else, if a signal is detected for the selected Frequency, the associated value is returned.
In this example for instance, there are 3 reflecting grids. The orange color of the large grid is driven by sj_radio_color.
Its default is orange, which is returned when no sj_radio_broadcast if found climbing up the raytracing tree, for instance for the eye rays.
Each of the small grids has a reflecting lambert material. However, before evaluating the material, each of them sends out a color signal on
the frequency #1 (red, blu and green left to right).
Upon receiving a reflection ray, the orange grid checks for frequancy #1, and since it finds a signal, the default color is replaced by the received one and then reflected.
In the second example, se use the shaders to render a proper cast shadow pass on the grid.
The spot light has the shadow check driven by sj_radio_boolean.
The grid material is the difference between the lambert evaluated turning the light shadow check off and turning it on.