Repository navigation
Conversation
|
Would it make more sense to call the layer type |
|
Here's a rough list of what needs to happen before this can be merged into master:
|
bc9a507 to
7c8607f
Compare
|
We could move the preparation step for terrain textures to the beginning of a frame to improve rendering performance. Right now, the workflow of a frame is like this:
When binding a framebuffer and rendering operations on it, the GPU has to restore the contents of the framebuffer. The driver can optimize that when we do a clear as the first drawing operation (since that discards the contents of the framebuffer). Therefore, drawing to the main framebuffer, then binding a different framebuffer, and rebinding the main framebuffer triggers a framebuffer load on the first draw call. Instead, we could do all operations that require binding a separate framebuffer (computing the preprocessed textures) as the first thing when rendering a frame (i.e. before calling clear on the main framebuffer) and have the following order:
|
add7681 to
3efe4a8
Compare
kkaefer
left a comment
There was a problem hiding this comment.
It looks like there is still a lot of code for supporting the openness visualization that we can remove.
| }, | ||
| { | ||
| "message": "layers[12].type: expected one of [fill, line, symbol, circle, fill-extrusion, raster, background], invalid found", | ||
| "message": "layers[12].type: expected one of [fill, line, symbol, circle, fill-extrusion, raster, terrain, background], invalid found", |
| 'fill-extrusion': require('./style_layer/fill_extrusion_style_layer'), | ||
| 'line': require('./style_layer/line_style_layer'), | ||
| 'symbol': require('./style_layer/symbol_style_layer') | ||
| 'symbol': require('./style_layer/symbol_style_layer'), |
| this._backfillDEM(tile); | ||
| } else { | ||
| this._source.fire('data', {dataType: 'source', tile: tile, coord: tile.coord}); | ||
| } |
There was a problem hiding this comment.
Can we leave the call to this._source.fire('data', {dataType: 'source', tile: tile, coord: tile.coord}); at the root and just call backfillDEM additionally? backfillDEM calls the same function.
| gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color; | ||
| } else { | ||
| gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0); | ||
| } |
There was a problem hiding this comment.
Before we merge this, we should remove all unused modes.
| array.emplaceBack(this._tileCoords[2].x, this._tileCoords[2].y, maxInt16, maxInt16); | ||
| array.emplaceBack(this._tileCoords[1].x, this._tileCoords[1].y, EXTENT, 0); | ||
| array.emplaceBack(this._tileCoords[3].x, this._tileCoords[3].y, 0, EXTENT); | ||
| array.emplaceBack(this._tileCoords[2].x, this._tileCoords[2].y, EXTENT, EXTENT); |
There was a problem hiding this comment.
Can we factor out this change into a separate PR that we can merge beforehand? I think it makes sense to have this as a separate change since it affects to many parts of the code that are unrelated to hillshading.
There was a problem hiding this comment.
yep – these changes are in #4770 and mapbox/mapbox-gl-native#9153, but they're blocked until text-pitch changes are merged into native
| case 1: | ||
| _xMax = _xMin + 1; | ||
| break; | ||
| } |
There was a problem hiding this comment.
This could break if dx < -1 or > 1
|
We'd likely need something like mapbox/mapbox-gl-native#9415 to prevent flickering from overlapping parent/child tiles. |
add terrain layer type and associated required files build out DEM pyramid fix setter+getter read buffer process array buffer into texture attempt to draw offscreen texture for terrain-prepare shader calcs use framebuffer to gemerate terrain texture try to render ⛰️ rebase to use monorepo use browser canvas obj begin terrain-raster source scaffolding create DEM from raster source praise be!!! raster is a go 🙏
lint er
linty lint
more ☀️ tweaks
…eighboring tile data try using clipped extents to reduce seam flashes fix strategy for minimizing seams... sorrrrta works
…late slope and NEAREST interpolation"
clean up a lil and lint
clean up dead code and fix some accidental changes terrain --> hillshade: rename layer type clean up and revert accidental changes
3efe4a8 to
c29d7b2
Compare
|
this work is now tracked at #5286 |
still very very rough here. will update this ticket soon w the to-do list before this is ready for review.
🗻
Launch Checklist