Domain Warping Formulas
Mathematical formulas showing how each warp mode transforms coordinates.
Simple Warp
Single-pass domain warping using the warp noise layer.
W(p) = N_warp((p + O) × S)
p' = p + W(p) × strength
result = N_base(p')
Where:
p= input position (uv coordinates)O= (offset_x, offset_y)S= scaleN_warp= warp noise functionN_base= base noise functionstrength= warp_strength
Effect: The warp noise pushes and pulls the base noise sampling coordinates, creating smooth flowing distortions.
Dual Warp
Two sequential warp passes applied one after another.
W₁(p) = N_warp((p + O₁) × S₁)
p' = p + W₁(p) × strength
W₂(p') = N_warp((p' + O₂) × S₂)
p'' = p' + W₂(p') × n_strength
result = N_base(p'')
Where:
O₁= (offset_x, offset_y)S₁= scaleO₂= (n_offset_x, n_offset_y)S₂= n_scalen_strength= secondary warp strength
Effect: Compound distortions where the second warp adds detail within the first warp's flow. Use different scales for primary (large flows) and secondary (fine detail).
Chained Warp
The warp noise itself is warped before being used to distort the base noise.
W_pre(p) = N_warp((p + O₁) × S₁)
p_warp = (p + O₂) + W_pre(p) × n_strength
W(p) = N_warp(p_warp × S₂)
p' = p + W(p) × strength
result = N_base(p')
Where:
O₁= (offset_x, offset_y) - pre-warp offsetS₁= scale - pre-warp scaleO₂= (n_offset_x, n_offset_y) - main warp offsetS₂= n_scale - main warp scalen_strength= how much pre-warp distorts main warp
Effect: Creates extremely organic patterns where the warp itself has internal structure. The warp varies across space, producing natural marble veining and flowing liquid effects.
Parameter Summary
Common to all modes:
warp_strength- Overall warp intensityoffset_x, offset_y- Primary warp offsetscale- Primary warp scale/frequency
Dual & Chained modes:
n_offset_x, n_offset_y- Secondary warp offsetn_scale- Secondary warp scale/frequencyn_strength- Secondary warp intensity
Key Difference:
-
Dual: Warps are applied sequentially to the base noise coordinates
base_noise(warp1(warp2(uv))) -
Chained: First warp distorts the second warp, then result distorts base noise
base_noise(warp2(uv + warp1(uv)))