summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-08-08 19:14:38 -0700
committeryum <yum.food.vr@gmail.com>2025-08-08 19:14:38 -0700
commit7cdf39f51b47553af89c3de5b86d33ded4b5cdd2 (patch)
tree47fdf40b13ada0ea52b545b941b0acc29066e448 /pbr.cginc
parent310dbc3a5393635e08faf78ddf47c57a37524d4b (diff)
Add cloth lobe & IBL DFG LUTs
- add monte carlo integrator to produce the luts - fix layer energy integration; should be multiplicative, not additive
Diffstat (limited to 'pbr.cginc')
-rw-r--r--pbr.cginc10
1 files changed, 9 insertions, 1 deletions
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) {
@@ -67,6 +71,10 @@ Pbr getPbr(v2f i) {
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);
return pbr;