declare const _default: "\n #include \"dynamicSkyAtmospherePS\"\n\n uniform mat3 dynSkyRotation; // the rotation of the sky of the scene\n uniform vec4 dynSkyHaze; // x: density at the base height, y: one over the height of the haze, z: base height\n\n // the color of the haze in a world space direction - the sky behind it, without the sun disc,\n // the stars and the moon\n vec3 dynamicSkyHazeColor(vec3 worldDir) {\n\n // to the space of the sky, turned by its rotation and with X flipped. Below the horizon,\n // where the daylight model has no answer, the haze takes the color of the sky just above it\n vec3 dir = worldDir * dynSkyRotation;\n dir = vec3(-dir.x, dir.y, dir.z) / max(length(dir), 1e-6);\n dir.y = max(dir.y, 0.015);\n\n vec3 ambient;\n return dynamicSkyBase(normalize(dir), ambient);\n }\n\n // the fraction of a surface hidden by the haze, from its position and the position of the camera\n float dynamicSkyHazeAmount(vec3 cameraPos, vec3 worldPos) {\n float b = dynSkyHaze.y;\n float h0 = cameraPos.y - dynSkyHaze.z;\n float h1 = worldPos.y - dynSkyHaze.z;\n float x = b * (h1 - h0);\n\n // the mean density along the ray, which falls off exponentially with the height, from the\n // integral of the density - and its limit along a level ray\n float e0 = exp(-b * h0);\n float density = abs(x) < 1e-3 ? e0 * (1.0 - 0.5 * x) : (e0 - exp(-b * h1)) / x;\n\n return 1.0 - exp(-dynSkyHaze.x * density * distance(worldPos, cameraPos));\n }\n\n // a linear color seen through the haze\n vec3 dynamicSkyHaze(vec3 color, vec3 cameraPos, vec3 worldPos) {\n float amount = dynamicSkyHazeAmount(cameraPos, worldPos);\n return mix(color, dynamicSkyHazeColor(worldPos - cameraPos), amount);\n }\n"; export default _default;