Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-Apps.git / library / map / src / main / rust / shaders / fill.frag

fill.frag20 lines · 615 BRaw
1#version 450
2
3// Fill fragment: the layer colour. Blending is the pipeline's job — src-alpha over
4// one-minus-src-alpha — so the colour passes straight through, scaled by the per-tile
5// LOD cross-fade opacity (WS-D) so a finer tile ramps in over its coarse ancestor.
6
7layout(location = 0) out vec4 outColor;
8
9layout(push_constant) uniform Push {
10 mat4 tileToClip;
11 vec4 color;
12 vec4 line;
13 vec4 misc;
14 // x: per-tile opacity/morph factor (1.0 = fully present) for WS-D's LOD cross-fade.
15 vec4 morph;
16} push;
17
18void main() {
19 outColor = vec4(push.color.rgb, push.color.a * push.morph.x);
20}