summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filamented.cginc3
1 files changed, 2 insertions, 1 deletions
diff --git a/filamented.cginc b/filamented.cginc
index 63552c2..c760b79 100644
--- a/filamented.cginc
+++ b/filamented.cginc
@@ -1,6 +1,7 @@
#ifndef __FILAMENTED_INC
#define __FILAMENTED_INC
+#include "data.cginc"
#include "globals.cginc"
#include "math.cginc"
@@ -220,7 +221,7 @@ half3 Unity_GlossyEnvironment_local (UNITY_ARGS_TEXCUBE(tex), half4 hdr, Unity_G
// Workaround for issue where objects are blurrier than they should be
// due to specular AA.
float roughnessAdjustment = 1-perceptualRoughness;
- roughnessAdjustment = 1e-6f * roughnessAdjustment * roughnessAdjustment;
+ roughnessAdjustment = MIN_PERCEPTUAL_ROUGHNESS * roughnessAdjustment * roughnessAdjustment;
perceptualRoughness = perceptualRoughness - roughnessAdjustment;
// Unity derivation