Open TomClabault opened 1 week ago
Maybe that actually makes sense to do things this way if we're calling
bsdfEvaluate()
with a light direction that comes frombsdfSample()
?
renderer which use this library https://github.com/nvpro-samples/vk_gltf_renderer/blob/master/shaders/rt_common.h
bsdfEvaluate()
seems to evaluate only one lobe at a time.https://github.com/nvpro-samples/nvpro_core/blob/master/nvvkhl/shaders/bsdf_functions.h#L887
From an efficiency standpoint, I wonder how that compares to the usual approach of evaluating all lobes for the given pair of directions as I've seen in most renderers.
Maybe that actually makes sense to do things this way if we're calling
bsdfEvaluate()
with a light direction that comes frombsdfSample()
? ThebsdfEvaluate()
then ensures the evaluation of a lobe with a proper incident light direction matching the distribution of that lobe whereas evaluating the other lobes with that same sampled direction may not end up contributing much (although this depends on the lobe. The diffuse lobe may actually benefit from almost any sampled direction so maybe that lobe should always be evaluated?)This is not really an issue with the implementation but rather a discussion, trying to learn from the best ;)