# Extract BRDF given a node tree of shaders?

With a node tree of shaders, how can I "extract" the resultant BRDF?

Ideally, I wish I could compute an analytical formula from the node tree: BRDF($$x$$, $$\omega_i$$, $$\omega_o$$), but I understand this might be too utopian. Alternatively, can I feed in a bunch of $$x$$, $$\omega_i$$, $$\omega_o$$ and get the BRDF values? This would suffice my task too.

Right now, I am doing this "the brute force way": I turn off multi-bounce and keep direct illumination only, render a LOT of .exr images using different $$\omega_i$$ and $$\omega_o$$ configurations, and finally assemble them into an empirical BRDF. This is just toooooo expensive.

If there's no solution to this problem, what if my node tree is really simple? Like a mixture of a glossy and a diffuse shaders? How do I get the underlying analytical/empirical BRDF?