summaryrefslogtreecommitdiffstats
path: root/math.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'math.cginc')
-rwxr-xr-xmath.cginc3
1 files changed, 2 insertions, 1 deletions
diff --git a/math.cginc b/math.cginc
index 5803be5..fa38553 100755
--- a/math.cginc
+++ b/math.cginc
@@ -166,7 +166,8 @@ float3 domain_warp_procedural(float3 uvw, float strength,
float g = 1;
for (uint ii = 0; ii < octaves; ++ii) {
- noise += value_noise3(uvw + noise * strength) * g;
+ float3 vnoise = value_noise3(uvw + (noise * 2.0 - 1.0) * strength);
+ noise += vnoise * g;
uvw *= lacunarity;
g *= gain;
}