Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/shaders/heatmap.fragment.glsl from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/shaders/heatmap.fragment.glsl
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/shaders/heatmap.fragment.glsl
-
curl -L -o heatmap.fragment.glsl https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/shaders/heatmap.fragment.glsl
555 Bytes
| uniform highp float u_intensity; | |
| varying vec2 v_extrude; | |
| // Gaussian kernel coefficient: 1 / sqrt(2 * PI) | |
| void main() { | |
| // Kernel density estimation with a Gaussian kernel of size 5x5 | |
| float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude); | |
| float val = weight * u_intensity * GAUSS_COEF * exp(d); | |
| gl_FragColor = vec4(val, 1.0, 1.0, 1.0); | |
| gl_FragColor = vec4(1.0); | |
| } | |