diff options
| author | yum <yum.food.vr@gmail.com> | 2025-06-15 21:25:07 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-06-15 21:25:07 -0700 |
| commit | 43edeb7da548690b26ed9e73226e83eb073ff430 (patch) | |
| tree | 284772aca5214462f5a7c74406338058af93f7e3 /yum_brdf.cginc | |
| parent | 478cb4e07622488915132c8de2f52dc5c19bb6c0 (diff) | |
brdf tweaks
Diffstat (limited to 'yum_brdf.cginc')
| -rw-r--r-- | yum_brdf.cginc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yum_brdf.cginc b/yum_brdf.cginc index cd97865..170451d 100644 --- a/yum_brdf.cginc +++ b/yum_brdf.cginc @@ -35,7 +35,8 @@ float3 specularLobe(YumPbr pbr, float f0, return (D * V) * F; #else // Fresnel - const float3 F = F_Schlick(f0, LoH); + float f90 = 0.5 + 2.0 * pbr.roughness * LoH * LoH; + const float3 F = F_Schlick(f0, f90, LoH); // Normal distribution function float D = D_GGX(pbr.roughness, NoH, h); // Geometric shadowing @@ -115,7 +116,7 @@ float4 YumBRDF(v2f i, const YumLighting light, YumPbr pbr) { const float3 E = specularDFG(dfg, f0); const float3 energy_compensation = energyCompensation(dfg, f0); - float3 Fd = pbr.albedo / PI; + float3 Fd = pbr.albedo * Fd_Burley(pbr.roughness, NoV, NoL, LoH); Fd *= (1.0 - pbr.metallic) * light.attenuation * pbr.ao; float3 Fr = specularLobe(pbr, f0, h, LoH, NoH, NoV, NoL_wrapped_s) * pbr.ao * PI * light.attenuation; |
