/** EAC vertex shader — passes the face-local UV and the face's atlas tile region. */ export declare const eacVertexShader = "\nattribute vec4 faceRegion;\nvarying vec2 vUv;\nvarying vec4 vFaceRegion;\n\nvoid main() {\n vUv = uv;\n vFaceRegion = faceRegion;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"; /** * EAC fragment shader. The equi-angular (tan) correction must be applied in each * cube face's LOCAL 0..1 space, not in atlas space — so `vUv` is the face-local * coordinate and `vFaceRegion` (xy = tile origin, zw = tile size) maps the * corrected coordinate into the face's tile in the 3x2 atlas. The face edges * (uv 0 and 1) map to themselves and the centre stays centred, so face * orientation is preserved while interior samples are redistributed correctly. */ export declare const eacFragmentShader = "\nuniform sampler2D map;\nvarying vec2 vUv;\nvarying vec4 vFaceRegion;\n\nconst float PI = 3.14159265359;\n\nvoid main() {\n // Equi-angular correction in face-local space: 0..1 -> -1..1 -> tan -> 0..1.\n vec2 ndc = vUv * 2.0 - 1.0;\n ndc = tan(ndc * PI / 4.0);\n vec2 faceUv = clamp(ndc * 0.5 + 0.5, 0.0, 1.0);\n\n // Map the corrected face-local UV into this face's atlas tile.\n vec2 atlasUv = vFaceRegion.xy + faceUv * vFaceRegion.zw;\n\n gl_FragColor = texture2D(map, atlasUv);\n}\n"; //# sourceMappingURL=eac.glsl.d.ts.map