summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'pbr.cginc')
-rw-r--r--pbr.cginc3
1 files changed, 3 insertions, 0 deletions
diff --git a/pbr.cginc b/pbr.cginc
index b297a0f..7167929 100644
--- a/pbr.cginc
+++ b/pbr.cginc
@@ -14,6 +14,9 @@ struct Pbr {
float metallic;
};
+#define MIN_PERCEPTUAL_ROUGHNESS 5e-2f
+#define MIN_ROUGHNESS 2e-3f
+
// TODO consider normal filtering like filamented
void propagateSmoothness(inout Pbr pbr) {
pbr.roughness_perceptual = max(MIN_PERCEPTUAL_ROUGHNESS, 1.0f - pbr.smoothness);