diff options
Diffstat (limited to 'brdf.cginc')
| -rw-r--r-- | brdf.cginc | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -55,6 +55,7 @@ float G_GGXSmith(float roughness, float NoL, float NoV) { return rcp(denom); } +#if defined(_CLOTH_SHEEN) // Estevez "Production Friendly Microfacet Sheen BRDF" // Equation 2. // The original equation is: @@ -113,6 +114,7 @@ float G_Cloth(float roughness, float LoH) { // Apply terminator softening (equation 4). return pow(lambda, 1.0f + 2.0f * pow(one_minus_LoH, 8)); } +#endif float4 brdf(Pbr pbr, LightData data) { float3 specular = 0; @@ -134,7 +136,7 @@ float4 brdf(Pbr pbr, LightData data) { #endif // Direct - if (true) { + { float remainder = 1.0f; #if defined(_CLEARCOAT) @@ -180,7 +182,7 @@ float4 brdf(Pbr pbr, LightData data) { // Indirect #if defined(FORWARD_BASE_PASS) - if (true) { + { float remainder = 1.0f; float2 dfg_uv = float2(data.common.NoV, pbr.roughness); @@ -212,7 +214,7 @@ float4 brdf(Pbr pbr, LightData data) { // For energy conservation with the diffuse term, we use the view-dependent Fresnel. float3 F = F_Schlick(data.common.NoV, f0_spec, 1.0f); remainder *= (1.0f - F); - + // Diffuse is Lambertian, which is pre-integrated into the SH diffuse probe float3 indirect_diffuse = pbr.albedo.xyz * data.indirect.diffuse * remainder * (1.0 - pbr.metallic); diffuse += indirect_diffuse; |
