summaryrefslogtreecommitdiffstats
path: root/ssfd.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'ssfd.cginc')
-rw-r--r--ssfd.cginc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssfd.cginc b/ssfd.cginc
index 1eec6d7..cc7d304 100644
--- a/ssfd.cginc
+++ b/ssfd.cginc
@@ -3,6 +3,7 @@
#include "globals.cginc"
+#if defined(_SSFD)
float ssfd(float2 uv, float scale, float max_fwidth, float2 uv_offset, texture3D noise)
{
//float uv_fw = fwidth(uv.x) + fwidth(uv.y);
@@ -32,7 +33,6 @@ float ssfd(float2 uv, float scale, float max_fwidth, float2 uv_offset, texture3D
// log_2(factor) is 4.
// Divide original by 16.
float fw_factor = uv_fw / max_fwidth;
- // log_b(x) = log_a(x) / log_a(b)
float fractal_level = log2(fw_factor) / log2(bayer_res);
float fractal_level_floor = floor(fractal_level);
float fractal_remainder = fractal_level - fractal_level_floor;
@@ -52,6 +52,7 @@ float ssfd(float2 uv, float scale, float max_fwidth, float2 uv_offset, texture3D
return dither;
}
+#endif // _SSFD
#endif // __SSFD_INC