Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/shaders/raster.vertex.glsl from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 812 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/shaders/raster.vertex.glsl
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/shaders/raster.vertex.glsl
-
curl -L -o raster.vertex.glsl https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/shaders/raster.vertex.glsl
812 Bytes
| uniform mat4 u_matrix; | |
| uniform vec2 u_tl_parent; | |
| uniform float u_scale_parent; | |
| uniform float u_buffer_scale; | |
| attribute vec2 a_pos; | |
| attribute vec2 a_texture_pos; | |
| varying vec2 v_pos0; | |
| varying vec2 v_pos1; | |
| void main() { | |
| gl_Position = u_matrix * vec4(a_pos, 0, 1); | |
| // We are using Int16 for texture position coordinates to give us enough precision for | |
| // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer | |
| // as an arbitrarily high number to preserve adequate precision when rendering. | |
| // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates, | |
| // so math for modifying either is consistent. | |
| v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5; | |
| v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent; | |
| } | |