export declare const SURFACE_VERT = "\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvarying vec3 vWorld;\nvoid main() {\n vUv = uv;\n vNormal = normalize(mat3(modelMatrix) * position);\n vWorld = (modelMatrix * vec4(position, 1.0)).xyz;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}"; export declare const SURFACE_FRAG: string; /** The same surface for a map tile: the tile's own program. */ export declare const TILE_FRAG: string; /** * A map tile's corners: one 0 to 1 grid for every tile, put on the sphere here from the tile's longitude and latitude range (`rect`: west, north, east, south, in radians) at `radius`. * `vUvG` is where the point is on the whole-Earth pictures. */ export declare const TILE_VERT = "\nuniform vec4 rect;\nuniform float radius;\nvarying vec2 vUv;\nvarying vec2 vUvG;\nvarying vec3 vNormal;\nvarying vec3 vWorld;\nvoid main() {\n vUv = uv;\n float lon = mix(rect.x, rect.z, uv.x);\n float lat = mix(rect.y, rect.w, uv.y);\n vec3 unit = vec3(cos(lat) * sin(lon), sin(lat), cos(lat) * cos(lon));\n vUvG = vec2((lon + 3.14159265358979) / 6.28318530717959, 0.5 - lat / 3.14159265358979);\n vNormal = normalize(mat3(modelMatrix) * unit);\n vec4 world = modelMatrix * vec4(unit * radius, 1.0);\n vWorld = world.xyz;\n gl_Position = projectionMatrix * viewMatrix * world;\n}"; export declare const CLOUD_FRAG = "\nuniform sampler2D cloudMap;\nuniform vec3 sunDir;\nuniform float shift;\nuniform float opacity;\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvoid main() {\n vec3 n = normalize(vNormal);\n float ndl = dot(n, sunDir);\n float c = texture2D(cloudMap, vec2(vUv.x + shift, vUv.y)).r;\n float a = smoothstep(0.28, 0.88, c) * opacity;\n float day = smoothstep(-0.10, 0.25, ndl);\n vec3 col = mix(vec3(0.015, 0.02, 0.04), vec3(1.0), day * (0.18 + 0.82 * pow(max(ndl, 0.0), 0.45)));\n col += vec3(0.55, 0.28, 0.14) * smoothstep(-0.14, 0.0, ndl) * (1.0 - smoothstep(0.0, 0.25, ndl)) * 0.35;\n gl_FragColor = vec4(col, a);\n}"; /** The Moon and other plain bodies: a picture (or a flat colour) lit by the Sun, with a trace of light on the dark side. */ export declare const BODY_FRAG = "\nuniform sampler2D map;\nuniform vec3 tint;\nuniform float textured;\nuniform float ambient;\nuniform vec3 sunDir;\nvarying vec2 vUv;\nvarying vec3 vNormal;\nvoid main() {\n vec3 n = normalize(vNormal);\n float ndl = dot(n, sunDir);\n vec3 albedo = textured > 0.5 ? texture2D(map, vUv).rgb : tint;\n float lit = smoothstep(-0.04, 0.12, ndl) * (0.10 + 0.95 * pow(max(ndl, 0.0), 0.6));\n gl_FragColor = vec4(albedo * (ambient + lit), 1.0);\n}"; /** A flat quad facing the camera: the Sun's disc and its glow. */ export declare const GLOW_VERT = "\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}"; export declare const GLOW_FRAG = "\nuniform vec3 tint;\nvarying vec2 vUv;\nvoid main() {\n float r = length(vUv - 0.5) * 2.0;\n float core = 1.0 - smoothstep(0.10, 0.14, r);\n float halo = pow(max(0.0, 1.0 - r), 2.5);\n vec3 col = mix(tint, vec3(1.0), core);\n gl_FragColor = vec4(col, clamp(core + halo * 0.85, 0.0, 1.0));\n}";