declare const _default: "\n #include \"dynamicSkyAtmospherePS\"\n\n uniform dynSkyRotation: mat3x3f; // the rotation of the sky of the scene\n uniform dynSkyHaze: vec4f; // 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 fn dynamicSkyHazeColor(worldDir: vec3f) -> vec3f {\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 let turned = worldDir * uniform.dynSkyRotation;\n var dir = vec3f(-turned.x, turned.y, turned.z) / max(length(turned), 1e-6);\n dir.y = max(dir.y, 0.015);\n\n var ambient: vec3f;\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 fn dynamicSkyHazeAmount(cameraPos: vec3f, worldPos: vec3f) -> f32 {\n let b = uniform.dynSkyHaze.y;\n let h0 = cameraPos.y - uniform.dynSkyHaze.z;\n let h1 = worldPos.y - uniform.dynSkyHaze.z;\n let 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 let e0 = exp(-b * h0);\n var density = e0 * (1.0 - 0.5 * x);\n if (abs(x) >= 1e-3) {\n density = (e0 - exp(-b * h1)) / x;\n }\n\n return 1.0 - exp(-uniform.dynSkyHaze.x * density * distance(worldPos, cameraPos));\n }\n\n // a linear color seen through the haze\n fn dynamicSkyHaze(color: vec3f, cameraPos: vec3f, worldPos: vec3f) -> vec3f {\n let amount = dynamicSkyHazeAmount(cameraPos, worldPos);\n return mix(color, dynamicSkyHazeColor(worldPos - cameraPos), vec3f(amount));\n }\n"; export default _default;