I have written a simple RenderMan shader to implement the BRDF representation presented in Non-linear approximation of reflectance functions, by Lafortune et al. at SIGGRAPH 97.
This shader has been altered again as of October 27, 2000 because the correction of two days before was itself in error.
This shader has been altered as of October 25, 2000 because it contained a fundamental error. The lobes should be multiplied by the cosine of the incident angle, as is the Lambertian component. This is because the BRDF formulation requires irradiance, whereas RenderMan shaders are formulated in terms of radiance.
This shader has been altered as of January 24, 2000 for consistency with the paper referenced above. The sign of the Cx term has been reversed; the original shader code was inconsistent with the published paper.
Here is an approximate replication of the hero image from that
This image was generated with Blue Moon Rendering Tools 18.104.22.168 on a 400 MHz Pentium II running Windows/NT 4.0. I used 300 shots of radiosity, which distributed 99.41% of the indirect energy; there are minor meshing artifacts visible. The image is corrected for a monitor gamma of 2.2; Mac and SGI users probably will see it as rather washed out.
The RIB file that generated the image is also available. The shader is used both on the right-hand sphere and on the metal plate in the foreground.The shader is intended as a simple implementation to use as a guide; no claims are made as to its efficiency or generality. It does, however, include a per-pixel color transformation. Since there are nonlinear elements in the representation (the exponents), it is impossible to perform the color transformation as a pre-process.