I have been playing around with the BSDF library lately and ran into a confusing issue. I am trying to use the SDevalBSDF function to get reflectance from the material for a given pair of incoming and outgoing vectors. Elsewhere in the BSDF code (e.g. in loadBSDF), the cieY variable holds this information. However after my call to SDevalBSDF the cieY value of the SDdata variable I passed in, is clearly not reflectance. The values are all greater than 1 and in some cases are extremely large (i.e. 10^3 or 10^4).
The BSDF files I have been trying behave as expected in the actual viewer, and I have confirmed that all the geometric info (i.e. surface normal and ‘up’, as well as transforming the in and out vectors to the BSDF reference frame) is correct. also tried multiplying by the solid angle of the pair using SDsizeBSDF but that results in reflectances that are too small.
Can someone enlighten me on what I am missing?