Skip to content

Commit 0a1a17a

Browse files
endankegithub-actions[bot]
authored andcommitted
Add tests for emissive lines in shadows
GitOrigin-RevId: a5ff35b094ee61cd86f2245cc80b3909a6f46d2f
1 parent 517fe49 commit 0a1a17a

10 files changed

Lines changed: 2194 additions & 0 deletions

File tree

52.4 KB
Loading

test/integration/render-tests/lighting-3d-mode/shadow/line-emissive-in-shadows/3d-intersections-default-light-order/style.json

Lines changed: 645 additions & 0 deletions
Large diffs are not rendered by default.
53.8 KB
Loading

test/integration/render-tests/lighting-3d-mode/shadow/line-emissive-in-shadows/3d-intersections-half-emission/style.json

Lines changed: 647 additions & 0 deletions
Large diffs are not rendered by default.
53.9 KB
Loading

test/integration/render-tests/lighting-3d-mode/shadow/line-emissive-in-shadows/3d-intersections/style.json

Lines changed: 646 additions & 0 deletions
Large diffs are not rendered by default.
53.9 KB
Loading
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"height": 512,
6+
"allowed": 0.00025
7+
}
8+
},
9+
"lights": [
10+
{
11+
"type": "ambient",
12+
"id": "environment",
13+
"properties": {
14+
"intensity": 0.1
15+
}
16+
},
17+
{
18+
"type": "directional",
19+
"id": "sun_light",
20+
"properties": {
21+
"intensity": 0.2,
22+
"cast-shadows": true,
23+
"shadow-intensity": 1.0,
24+
"shadow-draw-before-layer": "route"
25+
}
26+
}
27+
],
28+
"sources": {
29+
"mapbox": {
30+
"type": "vector",
31+
"maxzoom": 16,
32+
"tiles": [
33+
"local://tiles/{z}-{x}-{y}.mvt"
34+
]
35+
},
36+
"routeLine": {
37+
"type": "geojson",
38+
"lineMetrics": true,
39+
"data": {
40+
"type": "FeatureCollection",
41+
"features": [
42+
{
43+
"type": "Feature",
44+
"properties": {},
45+
"geometry": {
46+
"coordinates": [
47+
[
48+
-74.01353809183067,
49+
40.71571768191035
50+
],
51+
[
52+
-74.01179608924573,
53+
40.71612412610099
54+
],
55+
[
56+
-74.01344510236835,
57+
40.71649532729748
58+
]
59+
],
60+
"type": "LineString"
61+
}
62+
}
63+
]
64+
}
65+
}
66+
},
67+
"pitch": 36.50,
68+
"zoom": 17.00,
69+
"bearing": 20,
70+
"center": [
71+
-74.0125,
72+
40.7158
73+
],
74+
"layers": [
75+
{
76+
"id": "background",
77+
"type": "background",
78+
"paint": {
79+
"background-color": "lightgray"
80+
}
81+
},
82+
{
83+
"id": "land",
84+
"type": "fill",
85+
"source": "mapbox",
86+
"source-layer": "water",
87+
"paint": {
88+
"fill-color": "lightblue"
89+
}
90+
},
91+
{
92+
"id": "road",
93+
"type": "line",
94+
"source": "mapbox",
95+
"source-layer": "road",
96+
"paint": {
97+
"line-color": "lightyellow",
98+
"line-width": 10,
99+
"line-emissive-strength": 1.0
100+
}
101+
},
102+
{
103+
"id": "route",
104+
"type": "line",
105+
"source": "routeLine",
106+
"layout": {
107+
"line-elevation-reference": "hd-road-markup",
108+
"line-z-offset": 0.01
109+
},
110+
"paint": {
111+
"line-color": "lightblue",
112+
"line-width": 20,
113+
"line-emissive-strength": 1.0
114+
}
115+
},
116+
{
117+
"id": "extrusion",
118+
"type": "fill-extrusion",
119+
"source": "mapbox",
120+
"source-layer": "building",
121+
"paint": {
122+
"fill-extrusion-color": "white",
123+
"fill-extrusion-height": ["get", "height"]
124+
}
125+
}
126+
]
127+
}
55 KB
Loading
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"height": 512,
6+
"allowed": 0.00025
7+
}
8+
},
9+
"lights": [
10+
{
11+
"type": "ambient",
12+
"id": "environment",
13+
"properties": {
14+
"intensity": 0.1
15+
}
16+
},
17+
{
18+
"type": "directional",
19+
"id": "sun_light",
20+
"properties": {
21+
"intensity": 0.2,
22+
"cast-shadows": true,
23+
"shadow-intensity": 1.0,
24+
"shadow-draw-before-layer": "route"
25+
}
26+
}
27+
],
28+
"sources": {
29+
"mapbox": {
30+
"type": "vector",
31+
"maxzoom": 16,
32+
"tiles": [
33+
"local://tiles/{z}-{x}-{y}.mvt"
34+
]
35+
},
36+
"routeLine": {
37+
"type": "geojson",
38+
"lineMetrics": true,
39+
"data": {
40+
"type": "FeatureCollection",
41+
"features": [
42+
{
43+
"type": "Feature",
44+
"properties": {},
45+
"geometry": {
46+
"coordinates": [
47+
[
48+
-74.01353809183067,
49+
40.71571768191035
50+
],
51+
[
52+
-74.01179608924573,
53+
40.71612412610099
54+
],
55+
[
56+
-74.01344510236835,
57+
40.71649532729748
58+
]
59+
],
60+
"type": "LineString"
61+
}
62+
}
63+
]
64+
}
65+
}
66+
},
67+
"pitch": 36.50,
68+
"zoom": 17.00,
69+
"bearing": 20,
70+
"center": [
71+
-74.0125,
72+
40.7158
73+
],
74+
"layers": [
75+
{
76+
"id": "background",
77+
"type": "background",
78+
"paint": {
79+
"background-color": "lightgray"
80+
}
81+
},
82+
{
83+
"id": "land",
84+
"type": "fill",
85+
"source": "mapbox",
86+
"source-layer": "water",
87+
"paint": {
88+
"fill-color": "lightblue"
89+
}
90+
},
91+
{
92+
"id": "road",
93+
"type": "line",
94+
"source": "mapbox",
95+
"source-layer": "road",
96+
"paint": {
97+
"line-color": "lightyellow",
98+
"line-width": 10,
99+
"line-emissive-strength": 1.0
100+
}
101+
},
102+
{
103+
"id": "route",
104+
"type": "line",
105+
"source": "routeLine",
106+
"layout": {
107+
"line-elevation-reference": "hd-road-markup",
108+
"line-z-offset": 0.01
109+
},
110+
"paint": {
111+
"line-trim-offset": [0.0, 0.1],
112+
"line-trim-fade-range": [0.05, 0.0],
113+
"line-color": "lightblue",
114+
"line-width": 20,
115+
"line-emissive-strength": 1.0
116+
}
117+
},
118+
{
119+
"id": "extrusion",
120+
"type": "fill-extrusion",
121+
"source": "mapbox",
122+
"source-layer": "building",
123+
"paint": {
124+
"fill-extrusion-color": "white",
125+
"fill-extrusion-height": ["get", "height"]
126+
}
127+
}
128+
]
129+
}

0 commit comments

Comments
 (0)