{
  "format": "field",
  "version": 1,
  "meta": {
    "name": "Mokume-Gane Folded Metal",
    "author": "Infinite",
    "description": "Japanese mokume-gane diffusion-bonded copper, bronze, and brushed silver woodgrain strata carved into topographic contour rings with anisotropic sheen.",
    "domain": "pixel"
  },
  "device": {
    "code": "# Mokume-Gane Folded Metal (Field Pixel)\nparam float strata_freq = 14.0 [6.0, 28.0];\nparam float warp_depth = 1.65 [0.5, 3.0];\nparam float sheen = 0.45 [0.1, 0.9];\n\np = vec2((uv.x - 0.5) * aspect, uv.y - 0.5);\n\nwx = sin(p.y * 4.2 + t * 0.25) * 0.35 + cos(p.x * 3.1 - p.y * 2.7) * 0.25;\nwy = cos(p.x * 4.6 - t * 0.20) * 0.35 + sin(p.y * 3.4 + p.x * 2.2) * 0.25;\nq = p + vec2(wx, wy) * warp_depth * 0.32;\n\nr = length(q) * 2.2 + 0.45 * sin(q.x * 6.5 + q.y * 4.0) + 0.25 * cos(q.y * 9.0 - q.x * 5.0);\nband = fract(r * strata_freq * 0.25);\n\ncDark = vec3(0.165, 0.114, 0.098);\ncCopper = vec3(0.549, 0.290, 0.196);\ncBronze = vec3(0.431, 0.396, 0.259);\ncSilver = vec3(0.784, 0.792, 0.773);\n\nt1 = smoothstep(0.08, 0.22, band);\nt2 = smoothstep(0.38, 0.52, band);\nt3 = smoothstep(0.72, 0.86, band);\n\nmetal = mix(cDark, cCopper, t1);\nmetal = mix(metal, cBronze, t2);\nmetal = mix(metal, cSilver, t3);\n\nspec = pow(max(0.0, cos(p.x * 3.5 + p.y * 2.0 + wx * 2.5)), 4.0) * sheen;\ncol = clamp(metal + vec3(0.95, 0.88, 0.78) * spec, 0.0, 1.0);\n",
    "params": {
      "strata_freq": 14.0,
      "warp_depth": 1.65,
      "sheen": 0.45
    }
  }
}