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

port drawing fill-extrusions directly into the main framebuffer #13984

Closed
ansis opened this issue Feb 25, 2019 · 3 comments
Closed

port drawing fill-extrusions directly into the main framebuffer #13984

ansis opened this issue Feb 25, 2019 · 3 comments
Assignees
Labels
GL JS parity For feature parity with Mapbox GL JS

Comments

@ansis
Copy link
Contributor

ansis commented Feb 25, 2019

Fill-extrusions are currently drawing into a offscreen texture before being copied into the main framebuffer.

In mapbox/mapbox-gl-js#7821 -js switched to drawing fill-extrusions directly into the main framebuffer instead of drawing to an offscreen texture first. This was done for reasons that don’t apply to -native (antialiasing for custom layers) but it also improves performance by avoiding a full screen copy.

Most of these changes need to be ported to -native.

For a high level description of the changes see mapbox/mapbox-gl-js#7821

The main changes that need to be ported are:

  • drawing buildings directly into the main framebuffer
  • drawing semi-transparent buildings with two passes (depth only for the first pass, shading in the second pass)
  • only using the opaque pass for fills that are below all buildings
  • (maybe) optimizing stencil buffer usage

Let me know when someone picks this up! I can help explain things further

@ansis ansis added the GL JS parity For feature parity with Mapbox GL JS label Feb 25, 2019
@kkaefer
Copy link
Contributor

kkaefer commented Mar 19, 2019

Porting this blocks GL JS module updates in GL native due to shader changes.

@tristen
Copy link
Member

tristen commented Apr 5, 2019

Just flagging: I opened a ticket that this issue addresses in mapbox/mapbox-gl-js#8124. It's fixed in 0.54.0-beta.1 of Mapbox GL JS. On mobile, a fill-extrusion layer ignores the ordering of a fill layer ordered above it.

Preview

IMG_1585

Other geometries (like the white line string) is fine.

@kkaefer
Copy link
Contributor

kkaefer commented May 27, 2019

This was merged in #14526

@kkaefer kkaefer closed this as completed May 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GL JS parity For feature parity with Mapbox GL JS
Projects
None yet
Development

No branches or pull requests

3 participants