diff options
Diffstat (limited to 'brdf.cginc')
| -rwxr-xr-x | brdf.cginc | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -42,7 +42,7 @@ float3 F_Schlick(float LoH, float3 f0, float f90) { // The `max(1e-4, _)` and `min(4096, _)` are hand picked to minimize the issue // of bloom making specular highlights flash as the camera moves. float D_GGX(float roughness, float NoH) { - float r2 = max(1e-4, roughness * roughness); + float r2 = roughness * roughness; float NoH2 = NoH * NoH; float NoH4 = NoH2 * NoH2; @@ -50,7 +50,8 @@ float D_GGX(float roughness, float NoH) { float r2_plus_k = r2 + k; float denom = NoH4 * r2_plus_k * r2_plus_k; - return min(4096, r2 / denom); + //return min(4096, r2 / denom); + return r2 / denom; } // Hammon "PBR Diffuse Lighting for GGX+Smith Microsurfaces" @@ -144,8 +145,6 @@ float4 brdf(Pbr pbr, LightData data, out BrdfData bd) { diffuse += direct_diffuse; } - return float4(specular + diffuse, 1); - // Indirect #if !defined(FURNACE_TEST_DIRECT) && (defined(FORWARD_BASE_PASS) || defined(OUTLINES_PASS)) { |
