summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
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;