void AnalyticalBRDFIntegral_Order2( float _NdotV, float _roughness, out float _F0term, out float _ambientTerm ) {
float x = _NdotV;
float y = _roughness;
float x2 = x*x;
float x3 = x2*x;
float y2 = y*y;
float y3 = y2*y;
_F0term = Math.Min( 1.0f, 3.2341316749472577f * x - 2.373272450906272f * x2 + 1.0643192106211778f * y - 4.840084966583103f * x * y + 4.174411960036787f * x2 * y - 0.38184478124695787f * y2 + 1.3304731349921781f * x * y2 - 1.779774293647103f * x2 * y2 );
_ambientTerm = Math.Max( 0.0f, 1 - 3.10644824089575f * x + 2.2442720252458033f * x2 - 1.5631045930597178f * y + 5.286682741799993f * x * y - 4.013072795013668f * x2 * y + 0.8078765587702772f * y2 - 2.9710821881549427f * x * y2 + 2.3561138954372183f * x2 * y2 );
}