tangrams / tangram

WebGL map rendering engine for creative cartography
https://tangram.city
MIT License
2.22k stars 290 forks source link

Namespace built-in shader defines #693

Closed bcamper closed 5 years ago

bcamper commented 5 years ago

@hanbyul-here found that one of @patriciogonzalezvivo's old maps -- https://github.com/tangrams/WeatherOverTime -- was not working anymore due to a shader compilation error showing conflicting #define PI definitions.

It turns out a #define PI was added to Tangram's points vertex shader back when curved label support was added: https://github.com/tangrams/tangram/pull/484/files#diff-5c9ade004b24e8b556a6b8b8e9d3096fR24

To avoid these conflicts, we should namespace built-in shader defines with TANGRAM_. Most already do this, but this PR catches two that didn't.