Open dmnsgn opened 5 years ago
Possible implementations
Urho3d
vec3 BurleyDiffuse(vec3 diffuseColor, float roughness, float NdotV, float NdotL, float VdotH) { float energyBias = mix(roughness, 0.0, 0.5); float energyFactor = mix(roughness, 1.0, 1.0 / 1.51); float fd90 = energyBias + 2.0 * VdotH * VdotH * roughness; float f0 = 1.0; float lightScatter = f0 + (fd90 - f0) * pow(1.0 - NdotL, 5.0); float viewScatter = f0 + (fd90 - f0) * pow(1.0 - NdotV, 5.0); return diffuseColor * lightScatter * viewScatter * energyFactor; }
Filament
float Fd_Burley(float NoV, float NoL, float LoH, float roughness) { float f90 = 0.5 + 2.0 * roughness * LoH * LoH; float lightScatter = F_Schlick(NoL, 1.0, f90); float viewScatter = F_Schlick(NoV, 1.0, f90); return lightScatter * viewScatter * (1.0 / PI); }
Possible implementations
Urho3d
Filament