For normalization purposes, how to extract a BRDF function from an ad-hoc piece of pixel shading code ?  If we have a shader function like:float4 MyShadingFunction(float3 incomingLightDirection, float incomingRadiance){    float4 lightContributionToPixelColor;    // ...    // several complicated formulas (to which we have access)    // ...    return lightContributionToPixelColor;}What is the procedure to translate the complicated formulas into a BRDF function f that can then be mathematically integrated ?  For example to use f in an expression such as:
How to extract a BRDF from a shader
shader;brdf