Vector2 EnvBRDFApprox(float Roughness,float NoV){ //# [ Lazarov 2013, "Getting More Physical in Call of Duty: Black Ops II" ] //# Adaptation to fit our G term. Vector4 c0 = Vector4(-1, -0.0275, -0.572, 0.022); Vector4 c1 = Vector4(1, 0.0425, 1.04, -0.04); Vector4 r = c0 * (Roughness) + c1; float a004 = min(r.x * r.x, pow(2, -9.28 * NoV)) * r.x + r.y; Vector2 AB = Vector2(-1.04, 1.04)*(a004) + Vector2(r.z, r.w); return AB; }