From 7cdf39f51b47553af89c3de5b86d33ded4b5cdd2 Mon Sep 17 00:00:00 2001 From: yum Date: Fri, 8 Aug 2025 19:14:38 -0700 Subject: Add cloth lobe & IBL DFG LUTs - add monte carlo integrator to produce the luts - fix layer energy integration; should be multiplicative, not additive --- pbr.cginc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pbr.cginc') diff --git a/pbr.cginc b/pbr.cginc index 746de9c..806a52f 100644 --- a/pbr.cginc +++ b/pbr.cginc @@ -17,10 +17,14 @@ struct Pbr { float cc_roughness; float cc_strength; #endif +#if defined(_CLOTH_SHEEN) + float cl_strength; + float3 cl_color; +#endif }; #define MIN_PERCEPTUAL_ROUGHNESS 5e-2f -#define MIN_ROUGHNESS 2e-3f +#define MIN_ROUGHNESS 5e-3f // TODO consider normal filtering like filamented void propagateSmoothness(inout Pbr pbr) { @@ -66,6 +70,10 @@ Pbr getPbr(v2f i) { #if defined(_CLEARCOAT) pbr.cc_roughness = _Clearcoat_Roughness; pbr.cc_strength = _Clearcoat_Strength; +#endif +#if defined(_CLOTH_SHEEN) + pbr.cl_strength = _Cloth_Sheen_Strength; + pbr.cl_color = _Cloth_Sheen_Color; #endif propagateSmoothness(pbr); -- cgit v1.2.3