Fix native island material rendering

This commit is contained in:
que01 committed 2026-09-29 12:04:29 +08:00
1 parent b6d30787cd
commit c1277af16a
4 files changed
+28 -3

No files matched your search

+5
View File
@@ -194,6 +194,11 @@ MATERIALS = {
"native_lane_separator_yellow": {"kind": "solid", "name": "Native Lane Separator Yellow",
"color": (0.94, 0.58, 0.06), "roughness": 0.52,
"cesium": {"base_color": (0.94, 0.58, 0.06)}},
# Safety-island planting follows the neutral green-grey map fill and is
# intentionally opaque so it does not blend with the asphalt below.
"native_island_green": {"kind": "solid", "name": "Native Island Green",
"color": (0.0382, 0.4793, 0.1441), "roughness": 0.92,
"cesium": {"base_color": (0.0382, 0.4793, 0.1441)}},
}
+5 -1
View File
@@ -44,8 +44,12 @@ def assemble(native_road_dir, projector, collection, material_layers):
case_material_name = case.get("material", material_name)
case_material = _material(material_layers, case_material_name)
suffix = "_" + str(case["match"]) if "match" in case else ""
# Split cases may be inset overlays (for example the green
# planting inside a grey safety-island base). Keep the geometry
# unchanged, but lift matched overlays slightly to avoid z-fighting.
case_z = z_by_material_layer[material_name] + (0.001 if "match" in case else 0.0)
count += roads.assemble_geojson_layer(
source_path, source + suffix, projector, collection, case_material,
z_by_material_layer[material_name], _split_filter(split, case))
case_z, _split_filter(split, case))
counts[source] = count
return counts