Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / map / src / main / rust / shaders / symbol.vert
symbol.vert22 lines · 768 BRaw
| 1 | #version 450 |
| 2 | |
| 3 | // Symbol vertex: label quads are tessellated per frame at the frame's text size, |
| 4 | // so positions arrive tile-local and final — no extrusion math. The only job is |
| 5 | // the tile-to-clip transform plus UV passthrough. |
| 6 | |
| 7 | layout(location = 0) in vec2 inPosition; |
| 8 | layout(location = 1) in vec2 inUv; |
| 9 | layout(location = 0) out vec2 outUv; |
| 10 | layout(push_constant) uniform Push { |
| 11 | mat4 tileToClip; |
| 12 | vec4 color; |
| 13 | // x: text size in px per em (unused here - baked at tessellation), y: halo |
| 14 | // width in px, z/w: atlas texel size (1/W,1/H) for edge smoothing. |
| 15 | vec4 line; |
| 16 | // x: tile span in px (unused here), yzw: halo color rgb. |
| 17 | vec4 misc; |
| 18 | } push; |
| 19 | void main() { |
| 20 | outUv = inUv; |
| 21 | gl_Position = push.tileToClip * vec4(inPosition, 0.0, 1.0); |
| 22 | } |