snapshot of librat doBRDF glue code (not enabled)