Commit bb67675
[MAPSPERF-250] Raster layer: add property raster-allow-draping (#16270)
This PR addresses MAPSPERF-250.
**Context**
During draping of raster layers, emissive color cannot be fully
recovered. TWC wants consistent shading between draped/non-draped render
modes therefore we suggested to use raster-elevation and
raster-elevation-reference to take the layers out of draping and render
individually.
More information as well as cost of fully preserving emissive color can
be found here: https://mapbox.atlassian.net/browse/MAPSPERF-250
**Changes**
To improve ergonomics (not requiring two properties to be set by hand)
this PR introduces paint property `raster-allow-draping=false`. It
prevents a raster layer from being draped in case of globe/terrain. This
is done by implicitly applying a small`raster-elevation` value as well
as setting `raster-elevation-reference=ground` in case terrain is
enabled.
https://github.com/user-attachments/assets/0e0325b4-9f8a-4178-9eb2-b41326d0757f
- Add property `raster-allow-draping` (default: true) which can be used
to take raster layer out of draping by setting to false
- Disable depth writes for layers following terrain to avoid z fighting.
- Render test `globe-allow-draping-false`
~~~
Public: Add experimental raster-allow-draping property
~~~
cc @mapbox/maps-ios
cc @mapbox/gl-js
cc @mapbox/gl-native
cc @mapbox/maps-android
GitOrigin-RevId: 80d32dbc6615ef718770796a204ff7aabbed974f1 parent 16d2286 commit bb67675
8 files changed
Lines changed: 282 additions & 0 deletions
File tree
- extension-compose
- api
- Release
- src/main/java/com/mapbox/maps/extension/compose/style/layers/generated
- extension-style-app/src/androidTest/java/com/mapbox/maps/testapp/style/layers/generated
- extension-style
- api
- Release
- src
- main/java/com/mapbox/maps/extension/style/layers/generated
- test/java/com/mapbox/maps/extension/style/layers/generated
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3504 | 3504 | | |
3505 | 3505 | | |
3506 | 3506 | | |
| 3507 | + | |
3507 | 3508 | | |
3508 | 3509 | | |
3509 | 3510 | | |
| |||
3535 | 3536 | | |
3536 | 3537 | | |
3537 | 3538 | | |
| 3539 | + | |
3538 | 3540 | | |
3539 | 3541 | | |
3540 | 3542 | | |
| |||
3566 | 3568 | | |
3567 | 3569 | | |
3568 | 3570 | | |
| 3571 | + | |
3569 | 3572 | | |
3570 | 3573 | | |
3571 | 3574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2934 | 2934 | | |
2935 | 2935 | | |
2936 | 2936 | | |
| 2937 | + | |
2937 | 2938 | | |
2938 | 2939 | | |
2939 | 2940 | | |
| |||
2965 | 2966 | | |
2966 | 2967 | | |
2967 | 2968 | | |
| 2969 | + | |
2968 | 2970 | | |
2969 | 2971 | | |
2970 | 2972 | | |
| |||
Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4476 | 4476 | | |
4477 | 4477 | | |
4478 | 4478 | | |
| 4479 | + | |
| 4480 | + | |
4479 | 4481 | | |
4480 | 4482 | | |
4481 | 4483 | | |
| |||
4522 | 4524 | | |
4523 | 4525 | | |
4524 | 4526 | | |
| 4527 | + | |
| 4528 | + | |
4525 | 4529 | | |
4526 | 4530 | | |
4527 | 4531 | | |
| |||
4578 | 4582 | | |
4579 | 4583 | | |
4580 | 4584 | | |
| 4585 | + | |
| 4586 | + | |
4581 | 4587 | | |
4582 | 4588 | | |
4583 | 4589 | | |
| |||
4628 | 4634 | | |
4629 | 4635 | | |
4630 | 4636 | | |
| 4637 | + | |
| 4638 | + | |
4631 | 4639 | | |
4632 | 4640 | | |
4633 | 4641 | | |
| |||
4669 | 4677 | | |
4670 | 4678 | | |
4671 | 4679 | | |
| 4680 | + | |
| 4681 | + | |
4672 | 4682 | | |
4673 | 4683 | | |
4674 | 4684 | | |
| |||
4713 | 4723 | | |
4714 | 4724 | | |
4715 | 4725 | | |
| 4726 | + | |
| 4727 | + | |
4716 | 4728 | | |
4717 | 4729 | | |
4718 | 4730 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3658 | 3658 | | |
3659 | 3659 | | |
3660 | 3660 | | |
| 3661 | + | |
| 3662 | + | |
3661 | 3663 | | |
3662 | 3664 | | |
3663 | 3665 | | |
| |||
3706 | 3708 | | |
3707 | 3709 | | |
3708 | 3710 | | |
| 3711 | + | |
| 3712 | + | |
3709 | 3713 | | |
3710 | 3714 | | |
3711 | 3715 | | |
| |||
3767 | 3771 | | |
3768 | 3772 | | |
3769 | 3773 | | |
| 3774 | + | |
| 3775 | + | |
3770 | 3776 | | |
3771 | 3777 | | |
3772 | 3778 | | |
| |||
3811 | 3817 | | |
3812 | 3818 | | |
3813 | 3819 | | |
| 3820 | + | |
| 3821 | + | |
3814 | 3822 | | |
3815 | 3823 | | |
3816 | 3824 | | |
| |||
3867 | 3875 | | |
3868 | 3876 | | |
3869 | 3877 | | |
| 3878 | + | |
3870 | 3879 | | |
3871 | 3880 | | |
3872 | 3881 | | |
| |||
0 commit comments