summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-08-06 22:12:15 -0700
committeryum <yum.food.vr@gmail.com>2025-08-06 22:28:53 -0700
commitf13c88295826d439c70cb9dfb4a9dd5d6ae46ff0 (patch)
treeb965fdbb9fa5f866963b36abf59e96847d737dc6 /pbr.cginc
parent4c41d7cd0f4db1c262371fbe6b4db13639d9fc7b (diff)
Switch to independent implementations of D/G terms
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);