Fix layers rendering after fill-extrusion
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 https://github.com/mapbox/mapbox-gl-native/issues/14844#issuecomment-503600034 in #14844, #14779. Fix (opaquePassCutoff, is3D) is ported from https://github.com/mapbox/mapbox-gl-js/pull/7821 Fixes: #14844, #14779, #15039
This commit is contained in:
@@ -121,7 +121,7 @@ void RenderTile::prepare(const SourcePrepareParameters& parameters) {
|
||||
}
|
||||
|
||||
// Calculate two matrices for this tile: matrix is the standard tile matrix; nearClippedMatrix
|
||||
// clips the near plane to 100 to save depth buffer precision
|
||||
// has near plane moved further, to enhance depth buffer precision
|
||||
const auto& transform = parameters.transform;
|
||||
transform.state.matrixFor(matrix, id);
|
||||
transform.state.matrixFor(nearClippedMatrix, id);
|
||||
|
||||
Reference in New Issue
Block a user