Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Fix layers rendering after fill-extrusion #15065

Merged
merged 2 commits into from
Jul 9, 2019
Merged

Conversation

astojilj
Copy link
Contributor

@astojilj astojilj commented Jul 7, 2019

This fixes following issues:

  • Fix some false passing combinations/fill-extrusion-translucent--XXXX tests.
  • Fix and enable other, failing but ignored, combinations/fill-extrusion-translucent--XXXX and combinations/XXXX--fill-extrusion tests.
  • Fix rendering of layers that are on top of fill-extrusion layers.

state.getProjMatrix(nearClippedProjMatrix, 100) caused that tests with size 64x64 were not
rendering fill extrusions: far plane calculated as 96.9 and near plane set to 100 was the cause.

Near plane is changed from hardcoded 100 to depend on state.getCameraToCenterDistance() - producing similar value but one that follows max zoom.

This caused that e.g. combinations/fill-extrusion-translucent--fill-opaque was falsely passing as only fill-opaque layer got rendered.

combinations/fill-extrusion-translucent--XXXX tests expose regression #14844 (comment) in #14844, #14779.

Fix (opaquePassCutoff, is3D) is ported from mapbox/mapbox-gl-js#7821

Fixes: #14844, #14779, #15039

@astojilj astojilj self-assigned this Jul 7, 2019
@astojilj astojilj added GL JS parity For feature parity with Mapbox GL JS high priority labels Jul 7, 2019
@astojilj astojilj requested a review from ansis July 7, 2019 11:38
src/mbgl/renderer/render_layer.hpp Show resolved Hide resolved
src/mbgl/renderer/render_orchestrator.cpp Outdated Show resolved Hide resolved
"render-tests/combinations/fill-translucent--fill-extrusion-translucent": "needs investigation",
"render-tests/combinations/line-translucent--fill-extrusion-translucent": "needs investigation",
"render-tests/combinations/raster-translucent--fill-extrusion-translucent": "needs investigation",
"render-tests/combinations/symbol-translucent--fill-extrusion-translucent": "needs investigation",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@friedbunny friedbunny added this to the release-picklejuice milestone Jul 8, 2019
@friedbunny friedbunny added Core The cross-platform C++ core, aka mbgl needs changelog Indicates PR needs a changelog entry prior to merging. rendering labels Jul 8, 2019
@astojilj astojilj added needs backport Indicates PR needs to be cherrypicked into a previous release branch. regression labels Jul 9, 2019
@astojilj
Copy link
Contributor Author

astojilj commented Jul 9, 2019

"needs backport" added because of this comment:

@mapbox/maps-ios @mapbox/maps-android, we should also release patches of iOS 5.0, 5.1 and Android 8.0, 8.1 when this is fixed.

@tobrun
Copy link
Member

tobrun commented Jul 9, 2019

"needs backport" added because of this comment:

@mapbox/maps-ios @mapbox/maps-android, we should also release patches of iOS 5.0, 5.1 and Android 8.0, 8.1 when this is fixed.

Concretely this means cherry picking changes to release-nectar and release-oolong branches

Copy link
Contributor

@pozdnyakov pozdnyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % optional nit

src/mbgl/renderer/render_layer.hpp Show resolved Hide resolved
src/mbgl/renderer/render_orchestrator.cpp Outdated Show resolved Hide resolved
This fixes following issues:
* Fix some false passing combinations/fill-extrusion-translucent--XXXX tests
* Fix and enable other, failing but ignored, combinations/fill-extrusion-translucent--XXXX tests
* Fix rendering of layers that are on top of fill-extrusion layers

state.getProjMatrix(nearClippedProjMatrix, 100) caused that tests with size 64x64 were not
rendering fill extrusions: far plane calculated as 96.9 and near plane set to 100 was the cause.
near plane is changed from hardcoded 100 to depend on state.getCameraToCenterDistance() - producing
similar value but one that follows max zoom.

This caused that e.g. combinations/fill-extrusion-translucent--fill-opaque was falsely passing as
only fill-opaque layer got rendered.

combinations/fill-extrusion-translucent--XXXX tests expose regression #14844 (comment) in #14844, #14779.

Fix (opaquePassCutoff, is3D) is ported from mapbox/mapbox-gl-js#7821

Fixes: #14844, #14779, #15039
@astojilj astojilj requested a review from 1ec5 as a code owner July 9, 2019 11:28
@astojilj astojilj requested a review from a team July 9, 2019 11:28
@astojilj astojilj merged commit 286bc66 into master Jul 9, 2019
@tmpsantos tmpsantos deleted the astojilj-opaquePassCutOff branch July 9, 2019 15:17
@chloekraw chloekraw added the bug label Jul 10, 2019
@friedbunny friedbunny removed the needs changelog Indicates PR needs a changelog entry prior to merging. label Jul 14, 2019
astojilj added a commit that referenced this pull request Jul 19, 2019
astojilj added a commit that referenced this pull request Jul 19, 2019
Change in 3ffc14a
was a typo while addresssing review nit: while it didn't affect render tests it doesn't work properly in all cases.

Fixes: #14844, #14779, #15039
astojilj added a commit to mapbox/mapbox-gl-js that referenced this pull request Jul 19, 2019
Our combinations fill-extrusion render tests mostly combine fill extrusion with one other layer.
This just serves for verifying it using more layers.
It doesn't expose any particular issue - serves for verifying mapbox/mapbox-gl-native#15065
astojilj added a commit that referenced this pull request Jul 19, 2019
Change in 3ffc14a
was a typo while addresssing review nit: while it didn't affect render tests it doesn't work properly in all cases.

Fixes: #14844, #14779, #15039
astojilj added a commit that referenced this pull request Jul 19, 2019
astojilj added a commit that referenced this pull request Jul 19, 2019
Change in 3ffc14a
was a typo while addresssing review nit: while it didn't affect render tests it doesn't work properly in all cases.

Fixes: #14844, #14779, #15039
astojilj added a commit that referenced this pull request Jul 19, 2019
astojilj added a commit that referenced this pull request Jul 19, 2019
astojilj added a commit to mapbox/mapbox-gl-js that referenced this pull request Jul 19, 2019
Our combinations fill-extrusion render tests mostly combine fill extrusion with one other layer.
This just serves for verifying it using more layers.
It doesn't expose any particular issue - serves for verifying mapbox/mapbox-gl-native#15065
astojilj added a commit that referenced this pull request Jul 23, 2019
Change in 3ffc14a
was a typo while addresssing review nit: while it didn't affect render tests it doesn't work properly in all cases.

Fixes: #14844, #14779, #15039
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl GL JS parity For feature parity with Mapbox GL JS high priority needs backport Indicates PR needs to be cherrypicked into a previous release branch. regression rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BC break: circle layer is drawn in different z-index
7 participants