{
  "version": 1,
  "name": "Endless Sunrise",
  "parameters": {
    "Scene": 0.4,
    "Sensitivity": 0.82,
    "Motion": 0.35,
    "Hue": 0.56,
    "Opacity": 1,
    "Intensity": 0,
    "Size": 0.12,
    "Deformation": 0.26,
    "Glow": 0,
    "Trails": 0,
    "ShaderMix": 1,
    "Shader01": 0.7263157894736845,
    "Shader02": 0.42203389830508475,
    "Shader03": 0.3,
    "Shader04": 0.79,
    "Shader05": 0.62,
    "Shader06": 0.76,
    "Shader07": 0.64,
    "Shader08": 0.42,
    "Shader09": 0.22344322344322345,
    "Shader10": 0.76,
    "Shader11": 0.73,
    "Shader12": 0.77,
    "Shader13": 0.52,
    "Shader14": 0.66
  },
  "decoration": {
    "label": "",
    "backdrop": "Studio3D",
    "previewQuality": "Full",
    "scene3D": {
      "version": 1,
      "kind": "Terrain",
      "camera": {
        "yaw": 23,
        "pitch": 2,
        "roll": 0,
        "zoom": 0.34,
        "fieldOfView": 52
      },
      "motion": {
        "mode": "Flythrough",
        "grid": "Quarter",
        "syncToTrack": true,
        "tempo": 120,
        "distancePerBeat": 1.1
      },
      "terrain": {
        "endless": true,
        "seed": 916,
        "grid": 33,
        "frequency": 1.25,
        "relief": 0.085,
        "roughness": 0.4,
        "ridge": 0.26,
        "waterLevel": 1,
        "showWater": true,
        "lowColor": -14797239,
        "highColor": -14205084,
        "waterColor": -14255190,
        "material": {
          "enabled": false,
          "snowEnabled": false
        }
      },
      "sky": {
        "enabled": true,
        "topColor": -13727831,
        "horizonColor": -5061132
      }
    },
    "shader": {
      "name": "Endless Sunrise • Ocean Daylight",
      "slots": [
        {
          "number": 1,
          "label": "Horizon placement",
          "minimum": 0.38,
          "maximum": 0.57,
          "defaultValue": 0.7263157894736845
        },
        {
          "number": 2,
          "label": "Sun position",
          "minimum": 0.21,
          "maximum": 0.8,
          "defaultValue": 0.42203389830508475
        },
        {
          "number": 3,
          "label": "Sun warmth",
          "minimum": 0.0,
          "maximum": 1.0,
          "defaultValue": 0.3
        },
        {
          "number": 4,
          "label": "Cloud layers",
          "minimum": 0.0,
          "maximum": 1.0,
          "defaultValue": 0.79
        },
        {
          "number": 5,
          "label": "Wave strength",
          "minimum": 0.32,
          "maximum": 1.49,
          "defaultValue": 0.62
        },
        {
          "number": 6,
          "label": "Sun glitter",
          "minimum": 0.0,
          "maximum": 1.8,
          "defaultValue": 0.76
        },
        {
          "number": 7,
          "label": "Water tint",
          "minimum": 0.0,
          "maximum": 1.0,
          "defaultValue": 0.64
        },
        {
          "number": 8,
          "label": "Distance haze",
          "minimum": 0.018,
          "maximum": 0.13,
          "defaultValue": 0.42
        },
        {
          "number": 9,
          "label": "Wave seed",
          "minimum": 1,
          "maximum": 4096,
          "defaultValue": 0.22344322344322345
        },
        {
          "number": 10,
          "label": "Whitecap foam",
          "minimum": 0.0,
          "maximum": 2.25,
          "defaultValue": 0.76
        },
        {
          "number": 11,
          "label": "Bass swell",
          "minimum": 0.0,
          "maximum": 1.3,
          "defaultValue": 0.73
        },
        {
          "number": 12,
          "label": "Beat whitecaps",
          "minimum": 0.0,
          "maximum": 1.4,
          "defaultValue": 0.77
        },
        {
          "number": 13,
          "label": "Audio sensitivity",
          "minimum": 0.0,
          "maximum": 1,
          "defaultValue": 0.52
        },
        {
          "number": 14,
          "label": "Beat glitter",
          "minimum": 0.0,
          "maximum": 1.3,
          "defaultValue": 0.66
        }
      ],
      "hlsl": "/*\n    Endless Sunrise combines the shared Project-Z ocean with a single-pass daylight material.\n    The spectrum, crest compression and lighting design were adapted from Garrett Gunnell's Water:\n    https://github.com/GarrettGunnell/Water/tree/1673a12e796c5745aea6fa26eda53261da8efa80\n    See Assets/Shaders/FFTWater.shader and Assets/Shaders/FFTWater.compute.\n    This preset evaluates discrete directional waves directly in world space.\n\n    MIT License\n    Copyright (c) 2023 Garrett Gunnell\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n*/\n\nfloat3 SunriseRay(float2 uv, float aspect, float pitch)\n{\n    const float tangent = 0.48773259;\n    float2 lens = (uv * float2(2.0, -2.0) + float2(-1.0, 1.0)) * float2(aspect, 1.0) * tangent;\n    float sp;\n    float cp;\n    sincos(pitch, sp, cp);\n    return normalize(float3(lens.x, lens.y * cp - sp, cp + lens.y * sp));\n}\n\nfloat SunriseHash(float2 id)\n{\n    float3 p = frac(float3(id.xyx) * float3(0.1031, 0.1173, 0.1379));\n    p += dot(p, p.yzx + 19.19);\n    return frac((p.x + p.z) * p.y);\n}\n\nfloat SunriseNoise(float2 xy)\n{\n    float2 cell = floor(xy);\n    float2 blend = frac(xy);\n    blend = blend * blend * (3.0 - 2.0 * blend);\n    float a = lerp(SunriseHash(cell), SunriseHash(cell + float2(1, 0)), blend.x);\n    float b = lerp(SunriseHash(cell + float2(0, 1)), SunriseHash(cell + 1.0), blend.x);\n    return lerp(a, b, blend.y);\n}\n\n// Analytic derivatives of the same seeded value noise, used for small wind ripples.\nfloat2 WindSlope(float2 xy)\n{\n    float2 cell = floor(xy);\n    float2 t = frac(xy);\n    float2 f = t * t * (3.0 - 2.0 * t);\n    float2 df = 6.0 * t * (1.0 - t);\n    float a = SunriseHash(cell);\n    float b = SunriseHash(cell + float2(1, 0));\n    float c = SunriseHash(cell + float2(0, 1));\n    float d = SunriseHash(cell + 1.0);\n    return df * float2(lerp(b - a, d - c, f.y), lerp(c - a, d - b, f.x));\n}\n\nfloat2 Octave(float2 xy)\n{\n    return float2(1.67 * xy.x - 1.29 * xy.y, 1.29 * xy.x + 1.67 * xy.y) + float2(13.7, -3.4);\n}\n\nfloat DayCloud(float2 xy)\n{\n    float coverage = 0.49 * SunriseNoise(xy);\n    xy = Octave(xy);\n    coverage += 0.25 * SunriseNoise(xy);\n    xy = Octave(xy);\n    coverage += 0.14 * SunriseNoise(xy);\n    xy = Octave(xy);\n    coverage += 0.077 * SunriseNoise(xy);\n    xy = Octave(xy);\n    return coverage + 0.043 * SunriseNoise(xy);\n}\n\nfloat3 DayAir(float3 ray, float3 sun)\n{\n    float height = saturate(ray.y);\n    float skyDensity = 1.0 - exp2(-7.7 * height);\n    float azimuth = saturate(0.55 + ray.x * 0.62);\n    float3 blue = lerp(float3(0.049, 0.202, 0.439), float3(0.020, 0.103, 0.294), azimuth);\n    float3 pale = float3(0.440, 0.515, 0.572);\n    float3 air = lerp(pale, blue, skyDensity);\n    float forwardScatter = pow(saturate(dot(ray, sun)), 17.0) * exp2(-1.9 * height);\n    return air + float3(0.15, 0.121, 0.077) * forwardScatter * (0.34 + 0.66 * Macro03);\n}\n\nfloat3 DaySky(float3 ray, float3 sun)\n{\n    float height = max(0.0, ray.y);\n    float2 cloudXZ = ray.xz / (0.084 + height);\n    cloudXZ = cloudXZ * float2(0.86, 1.13) + float2(62.37, -25.82) + float2(0.0034, -0.0022) * Time;\n    float layer = DayCloud(cloudXZ);\n    float upperWisps = SunriseNoise(Octave(cloudXZ * 0.79) + float2(-41.5, 8.6));\n    layer += smoothstep(0.12, 0.44, height) * (upperWisps - 0.40) * 0.16;\n    float cutoff = lerp(0.67, 0.405, Macro04);\n    float billow = smoothstep(cutoff - 0.045, cutoff + 0.15, layer);\n    float brightness = smoothstep(cutoff - 0.02, cutoff + 0.21, layer);\n    float heightVisibility = smoothstep(0.017, 0.234, height);\n    float diffuseSun = pow(saturate(dot(ray, sun)), 3.7);\n    float3 cloud = lerp(float3(0.25, 0.35, 0.43), float3(0.73, 0.81, 0.86), brightness);\n    cloud += float3(0.10, 0.093, 0.075) * diffuseSun;\n    return lerp(DayAir(ray, sun), cloud, billow * heightVisibility * 0.94);\n}\n\nfloat3 SunriseDisplay(float3 linearColor)\n{\n    linearColor = max(0.0, linearColor);\n    float3 compressed = linearColor * (2.51 * linearColor + 0.03) /\n        (linearColor * (2.43 * linearColor + 0.59) + 0.14);\n    return pow(saturate(compressed), 0.45454545);\n}\n\nstruct OceanState\n{\n    float2 slope;\n    float height;\n    float3 chop;\n    float unresolved;\n};\n\nfloat3 OceanSwells(float2 xy, float seconds, float energy)\n{\n    const float2 d0 = float2(0.954, 0.300);\n    const float2 d1 = float2(0.412, 0.911);\n    const float2 d2 = float2(-0.513, 0.858);\n    const float2 d3 = float2(0.769, -0.639);\n    const float4 k = float4(1.83, 2.63, 3.52, 4.54);\n    const float4 height = float4(0.103, 0.077, 0.049, 0.034);\n    float4 phase = k * float4(dot(xy, d0), dot(xy, d1), dot(xy, d2), dot(xy, d3))\n        - sqrt(k * 9.81) * seconds + float4(1.27, 3.37, 4.82, 0.14);\n    float4 s;\n    float4 c;\n    sincos(phase, s, c);\n    float4 sh = s + 0.17 * (s * s - 0.5);\n    float4 g = height * k * c * (1.0 + 0.34 * s) * energy;\n    return float3(d0 * g.x + d1 * g.y + d2 * g.z + d3 * g.w, dot(height, sh) * energy);\n}\n\nvoid OceanBand(inout OceanState o, float2 direction, float2 xy, float2 dx, float2 dy, float waveNumber,\n    float height, float seconds, float phaseOffset, float sharpness, float energy)\n{\n    float overlap = waveNumber * max(abs(dot(dx, direction)), abs(dot(dy, direction)));\n    float visible = 1.0 - smoothstep(0.57, 2.15, overlap);\n    float phase = dot(xy, direction) * waveNumber - sqrt(waveNumber * 9.81) * seconds + phaseOffset;\n    float s;\n    float c;\n    sincos(phase, s, c);\n    float amplitude = height * visible * energy;\n    float gradient = amplitude * waveNumber * c * (1.0 + 2.0 * sharpness * s);\n    o.slope += direction * gradient;\n    o.height += amplitude * (s + sharpness * (s * s - 0.5));\n    o.chop += float3(direction.x * direction.x, direction.y * direction.y, direction.x * direction.y)\n        * (amplitude * waveNumber * (s + sharpness * (s * s - 0.5)));\n    o.unresolved += height * waveNumber * (1.0 - visible);\n}\n\nOceanState OceanSurface(float2 world, float2 dx, float2 dy, float seconds, float energy)\n{\n    float2 patch = world * 0.29 + float2(Macro09 * 0.073, Macro09 * 0.123);\n    float a = SunriseNoise(patch + float2(29.13, -8.29));\n    float b = SunriseNoise(patch * 1.19 + float2(-12.19, 65.17));\n    float2 chop = world + float2(a - 0.5, b - 0.5) * 0.38;\n    OceanState o = (OceanState)0;\n    OceanBand(o, float2( 0.954,  0.300), world, dx, dy,   1.83, 0.1030, seconds, 1.27, 0.17, energy);\n    OceanBand(o, float2( 0.412,  0.911), world, dx, dy,   2.63, 0.0770, seconds, 3.37, 0.17, energy);\n    OceanBand(o, float2(-0.513,  0.858), world, dx, dy,   3.52, 0.0490, seconds, 4.82, 0.17, energy);\n    OceanBand(o, float2( 0.769, -0.639), world, dx, dy,   4.54, 0.0340, seconds, 0.14, 0.17, energy);\n    energy *= 0.74 + 0.51 * a;\n    OceanBand(o, float2(-0.772,  0.635), chop, dx, dy,    6.28, 0.0260, seconds, 3.12, 0.19, energy);\n    OceanBand(o, float2(-0.104,  0.995), chop, dx, dy,    7.91, 0.0200, seconds, 5.45, 0.16, energy);\n    OceanBand(o, float2( 0.907,  0.421), chop, dx, dy,   10.73, 0.0130, seconds, 1.69, 0.18, energy);\n    OceanBand(o, float2( 0.337,  0.942), chop, dx, dy,   15.01, 0.0080, seconds, 4.62, 0.16, energy);\n    OceanBand(o, float2(-0.631, -0.776), chop, dx, dy,   19.93, 0.0066, seconds, 2.78, 0.12, energy);\n    OceanBand(o, float2( 0.733,  0.680), chop, dx, dy,   27.27, 0.0033, seconds, 5.02, 0.10, energy);\n    OceanBand(o, float2(-0.267,  0.964), chop, dx, dy,   41.61, 0.0023, seconds, 0.79, 0.09, energy);\n    OceanBand(o, float2( 0.986,  0.167), chop, dx, dy,   58.17, 0.0014, seconds, 3.64, 0.08, energy);\n    OceanBand(o, float2(-0.572,  0.820), chop, dx, dy,   88.83, 0.0008, seconds, 0.19, 0.05, energy);\n    OceanBand(o, float2( 0.641,  0.767), chop, dx, dy,  137.79, 0.0004, seconds, 4.16, 0.04, energy);\n    return o;\n}\n\n// Two trust-limited height-field projections preserve continuous image-space flow\n// through the steepest modeled crests, where a full Newton step can jump roots.\nfloat SoftDisplacement(float shift, float radius)\n{\n    return radius * shift * rsqrt(radius * radius + shift * shift);\n}\n\nfloat OceanDistance(float2 origin, float2 path, float rayY, float eyeHeight, float seconds, float energy, float surge)\n{\n    float plane = min(95.0, eyeHeight / max(-rayY, 0.0084));\n    float footprintWeight = smoothstep(0.027, 0.143, -rayY);\n    float rate = max(0.193, -rayY);\n    float radius = min(plane * 0.21, 0.53 + 0.24 * saturate(surge));\n    float3 first = OceanSwells(origin + path * plane, seconds, energy);\n    float shift = SoftDisplacement(-first.z / rate, radius) * footprintWeight;\n    float3 second = OceanSwells(origin + path * (plane + shift * 0.55), seconds, energy);\n    float resolved = SoftDisplacement(-second.z / rate, radius) * footprintWeight;\n    return plane + lerp(shift, resolved, 0.62);\n}\n\n// Gunnell's horizontal compression determinant, here from analytic directional bands.\nfloat OceanFoam(OceanState ocean, float2 world, float footprint, float distance, float breaking)\n{\n    float3 crush = ocean.chop * 1.25;\n    float jacobian = (1.0 - crush.x) * (1.0 - crush.y) - crush.z * crush.z;\n    float compression = 1.0 - jacobian;\n    float roughCrest = smoothstep(0.035, 0.24, ocean.height + 0.11 * length(ocean.slope));\n    float overhang = smoothstep(0.22, 0.69, compression);\n    float2 cells = world * 16.8 + ocean.slope * 2.1;\n    float web = SunriseNoise(cells * float2(0.71, 1.34));\n    float fine = SunriseNoise(Octave(cells) * 1.56);\n    float flecks = SunriseNoise(Octave(cells * 2.40) + float2(23.9, -12.6));\n    float bubbleWeb = smoothstep(0.21, 0.77, 0.33 * web + 0.36 * fine + 0.31 * flecks);\n    float bubbles = lerp(0.29 + 0.71 * bubbleWeb, 0.66, saturate(footprint * 44.0));\n    float mat = overhang * roughCrest * (0.60 + 0.40 * web);\n    float foam = smoothstep(0.137, 0.510, mat * Macro10 * (1.0 + breaking));\n    return foam * bubbles * exp2(-0.022 * distance);\n}\n\n// The Beckmann Smith rational approximation and rough-water Fresnel follow Gunnell's fragment model.\nfloat SmithBeckmann(float cosine, float roughness)\n{\n    cosine = clamp(cosine, 0.001, 0.9999);\n    float a = cosine / (roughness * sqrt(1.0 - cosine * cosine));\n    float a2 = a * a;\n    return a < 1.6 ? (1.0 - 1.259 * a + 0.396 * a2) / (3.535 * a + 2.181 * a2) : 0.0;\n}\n\nfloat WaterFresnel(float facing, float roughness)\n{\n    const float r = 0.02006;\n    float grazing = pow(1.0 - saturate(facing), 5.0 * exp(-2.69 * roughness));\n    return r + (1.0 - r) * grazing / (1.0 + 22.7 * pow(roughness, 1.5));\n}\n\nfloat3 OceanGlint(float3 normal, float3 eye, float3 sun, float roughness, float foam)\n{\n    float3 halfway = normalize(eye + sun);\n    float nh = max(dot(normal, halfway), 0.001);\n    float nv = saturate(dot(normal, eye));\n    float nl = saturate(dot(normal, sun));\n    float3 east = normalize(cross(normal, float3(0.215, 0.0, 0.977)));\n    float3 west = cross(east, normal);\n    float ax = roughness * 0.68;\n    float az = roughness * 1.08 + foam * 0.035;\n    float2 tangent = float2(dot(east, halfway) / ax, dot(west, halfway) / az) / nh;\n    float nh2 = nh * nh;\n    float distribution = exp(-dot(tangent, tangent)) / max(0.00001, 3.14159265 * ax * az * nh2 * nh2);\n    float visibility = rcp(1.0 + SmithBeckmann(nv, roughness) + SmithBeckmann(nl, roughness));\n    float reflectance = WaterFresnel(dot(halfway, eye), roughness * 0.64);\n    float shine = min(22.0, distribution * visibility * reflectance * nl / max(0.075, 4.0 * sun.y));\n    float3 white = lerp(float3(1.0, 0.97, 0.90), float3(1.0, 0.90, 0.71), Macro03 * 0.36);\n    return white * shine * Macro06;\n}\n\nfloat4 Visualize(float2 uv)\n{\n    float4 native = SampleSource(uv);\n    float aspect = TexelSize.y / max(TexelSize.x, 0.000001);\n    float pitch = atan((1.0 - 2.0 * Macro01) * 0.48773259);\n    float3 ray = SunriseRay(uv, aspect, pitch);\n    float3 sun = SunriseRay(float2(Macro02, Macro01 - 0.205), aspect, pitch);\n    const float2 right = float2(0.92050485, -0.39073113);\n    const float2 forward = float2(-0.39073113, -0.92050485);\n    float travel = Time * clamp(Tempo, 20.0, 400.0) * (1.1 / 60.0);\n    float2 origin = forward * (travel - 14.85);\n    float2 path = right * ray.x + forward * ray.z;\n    float eyeHeight = 0.79;\n    float plane = min(95.0, eyeHeight / max(-ray.y, 0.0084));\n    float2 uncorr = origin + path * plane;\n    float2 dx = ddx(uncorr);\n    float2 dy = ddy(uncorr);\n    float footprint = max(length(dx), length(dy));\n    [branch]\n    if (ray.y >= 0.0)\n    {\n        float3 sky = DaySky(ray, sun);\n        float arc = max(0.0, 2.0 * (1.0 - dot(ray, sun)));\n        float disc = 1.0 - smoothstep(0.00014, 0.00041, arc);\n        float hazeSun = exp2(-910.0 * arc);\n        sky += float3(1.0, 0.98, 0.92) * (3.8 * disc + 0.71 * hazeSun);\n        return float4(SunriseDisplay(sky), native.a);\n    }\n\n    float seconds = Time * 0.79;\n    // Sustained sub-bass builds the swells. Drum onsets punch the crests and then recede.\n    float audioGain = lerp(0.58, 1.62, saturate(Macro13));\n    float bassLift = smoothstep(0.16, 0.69, AudioLow * audioGain);\n    float hit = smoothstep(0.14, 0.76, AudioBeat * audioGain);\n    float surge = (0.78 * bassLift + 0.73 * hit) * Macro11;\n    float breaking = (0.20 * bassLift + 0.96 * hit) * Macro12;\n    float glitter = 1.0 + (0.12 * bassLift + 0.62 * hit) * Macro14;\n    float energy = Macro05 * (0.91 + surge);\n    float distance = OceanDistance(origin, path, ray.y, eyeHeight, seconds, energy, surge);\n    float2 world = origin + path * distance;\n    // A conservative footprint absorbs additional stretch from the height projection.\n    float warpFootprint = 1.03 + 0.61 * saturate(abs(distance - plane) * 2.1);\n    footprint *= warpFootprint;\n    OceanState ocean = OceanSurface(world, dx * warpFootprint, dy * warpFootprint, seconds, energy);\n    float foam = OceanFoam(ocean, world, footprint, distance, breaking);\n    float2 slopes = ocean.slope / (1.0 + 0.40 * abs(ocean.chop.xy));\n    float slowMip = 1.0 - smoothstep(0.35, 1.46, footprint * 24.0);\n    float fastMip = 1.0 - smoothstep(0.28, 1.24, footprint * 53.0);\n    float2 breeze = float2(0.21, -0.12) * seconds;\n    float2 micro = WindSlope(world * float2(24.0, 34.0) + breeze) * (0.092 * slowMip);\n    float2 shear = WindSlope(Octave(world * 27.0) - breeze * 2.24) * (0.082 * fastMip);\n    slopes += (micro + float2(0.803 * shear.x + 0.596 * shear.y, -0.596 * shear.x + 0.803 * shear.y))\n        * (0.81 + 0.36 * (1.0 - foam));\n    float3 normal = normalize(float3(-dot(slopes, right), 1.0, -dot(slopes, forward)));\n    float3 eye = -ray;\n    float viewingCosine = dot(normal, eye);\n    float facing = saturate(0.5 * (viewingCosine + sqrt(viewingCosine * viewingCosine + 0.0016)));\n    float sunFacing = saturate(dot(normal, sun));\n    float unresolved = saturate(ocean.unresolved) * 0.098;\n    float roughness = 0.109 + unresolved + foam * 0.025;\n    float fresnel = WaterFresnel(facing, roughness);\n    float3 reflection = reflect(ray, normal);\n    // Integrate a rough sky lobe around the water horizon instead of clipping a ray to it.\n    float elevation = reflection.y;\n    float lobeRadius = 0.095 + roughness * 0.36;\n    float skyVisibility = smoothstep(-0.39, 0.25, elevation);\n    float skyElevation = 0.5 * (elevation + sqrt(elevation * elevation + lobeRadius * lobeRadius));\n    float3 skyRay = normalize(float3(reflection.x, skyElevation, reflection.z));\n    float3 deep = lerp(float3(0.032, 0.058, 0.077), float3(0.022, 0.070, 0.082), Macro07);\n    float foreground = smoothstep(0.045, 0.34, -ray.y);\n    deep += float3(0.053, 0.033, 0.022) * foreground;\n    float3 skyReflection = lerp(deep, DayAir(skyRay, sun), skyVisibility);\n\n    float backlit = pow(saturate(dot(ray, sun)), 4.0);\n    float crest = saturate(max(0.0, ocean.height) * 3.2);\n    float shadow = 0.74 + 0.44 * sunFacing + 0.20 * facing;\n    float3 scattering = float3(0.020, 0.105, 0.115) * crest * backlit * (0.8 - 0.43 * sunFacing);\n    float3 water = (deep * shadow + scattering) * (1.0 - fresnel) + skyReflection * fresnel;\n    water *= 0.90 + 0.28 * saturate(dot(native.rgb, float3(0.22, 0.66, 0.12)) * 3.2);\n    water += OceanGlint(normal, eye, sun, roughness, foam) * glitter;\n    float distantGlint = pow(saturate(dot(reflection, sun)), 310.0) * skyVisibility * (1.0 - foam);\n    water += float3(1.0, 0.973, 0.923) * distantGlint * fresnel * Macro06 * 1.40 * glitter;\n    float3 froth = lerp(float3(0.25, 0.34, 0.37), float3(0.58, 0.66, 0.68), sunFacing);\n    water = lerp(water, froth, foam);\n\n    float3 horizon = DayAir(normalize(float3(ray.x, 0.0, ray.z)), sun);\n    float haze = 1.0 - exp2(-distance * Macro08);\n    water = lerp(water, horizon, haze * haze);\n    return float4(SunriseDisplay(water), native.a);\n}\n"
    }
  }
}
