From 690f824533db02ecf9ac7e2a5672c0c84c5d1c1d Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 25 Dec 2024 20:30:14 -0800 Subject: Tweak clearcoat --- pbr.cginc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pbr.cginc') diff --git a/pbr.cginc b/pbr.cginc index c9b6e28..824647f 100644 --- a/pbr.cginc +++ b/pbr.cginc @@ -4,6 +4,7 @@ #include "filament_math.cginc" #include "globals.cginc" #include "interpolators.cginc" +#include "math.cginc" #include "MochieStandardBRDF.cginc" #include "poi.cginc" #include "tone.cginc" @@ -432,6 +433,7 @@ float4 getLitColor( /*smoothness=*/1 - cc_roughness, /*metallic=*/0, worldPos); + // Indirect specular { // TODO fold this into the full BRDF and apply the brightness corrections // described in the filament whitepaper: @@ -449,7 +451,7 @@ float4 getLitColor( LoH, h, Fc); - pbr.rgb += cc_term * cc_indirect_specular * cc_mask; + pbr.rgb += cc_term * (indirect_light.specular + indirect_light.diffuse) * cc_mask; } // Direct { -- cgit v1.2.3