export declare const heightVertexShader = "\n varying vec2 vUv;\n varying vec3 vWorldPosition;\n uniform float uHeight;\n uniform sampler2D map;\n\n void main() {\n vUv = uv;\n vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n vWorldPosition = worldPosition.xyz;\n float h = texture2D(map, vUv).a * uHeight;\n // gl_Position = projectionMatrix * viewMatrix * vec4(worldPosition.x, worldPosition.y, h, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position.x, position.y, position.z, 1.0);\n }\n"; export declare const heightFragmentShader = "\n uniform sampler2D map;\n uniform float granularity;\n uniform float threshold;\n uniform vec2 uRange;\n varying vec2 vUv;\n varying vec3 vWorldPosition;\n uniform float uOpacity;\n uniform bool isPixel;\n\n \nvec4 createPixelGraphEffect(sampler2D map, vec2 vUv, float granularity, float threshold, vec2 range, vec3 worldPos) {\n vec2 pixelSize = vec2(1.0) / granularity;\n vec2 cell = floor(vUv / pixelSize);\n vec2 cellUv = fract(vUv / pixelSize);\n\n vec4 texColor = texture2D(map, (cell + 0.5) * pixelSize);\n\n vec2 pointCenter = vec2(0.5, 0.5);\n vec2 rotatedUv = cellUv - pointCenter;\n vec2 rotated = vec2(\n (rotatedUv.x - rotatedUv.y) * 0.7071067811865476,\n (rotatedUv.x + rotatedUv.y) * 0.7071067811865476\n );\n\n float dist = abs(rotated.x) + abs(rotated.y);\n\n float intensity = (texColor.r + texColor.g + texColor.b) / 3.0;\n float pointSize = 0.3 * smoothstep(0.0, threshold, intensity);\n\n if (dist > pointSize || intensity < 0.05) {\n discard;\n }\n\n return texColor;\n}\n\n\n void main() {\n vec4 texColor = isPixel ? \n createPixelGraphEffect(map, vUv, granularity, threshold, uRange, vWorldPosition) : \n texture2D(map, vUv);\n \n float a = texColor.a * uOpacity;\n gl_FragColor = texColor;\n gl_FragColor.a = min(a, 1.0); \n\n // if(vWorldPosition.x < uRange.x || vWorldPosition.x > uRange.y || \n // vWorldPosition.z < uRange.x || vWorldPosition.z > uRange.y) {\n // discard;\n // }\n }\n";