[core] Fix symbol rendering under opaque fill layers
This commit is contained in:
@@ -105,7 +105,6 @@
|
||||
"render-tests/feature-state/composite-expression": "https://github.com/mapbox/mapbox-gl-native/issues/12613",
|
||||
"render-tests/feature-state/data-expression": "https://github.com/mapbox/mapbox-gl-native/issues/12613",
|
||||
"render-tests/feature-state/vector-source": "https://github.com/mapbox/mapbox-gl-native/issues/12613",
|
||||
"render-tests/fill-opacity/opaque-fill-over-symbol-layer": "skip - port https://github.com/mapbox/mapbox-gl-js/pull/7612",
|
||||
"render-tests/text-variable-anchor/pitched-rotated-debug": "https://github.com/mapbox/mapbox-gl-native/issues/14211",
|
||||
"render-tests/text-variable-anchor/rotated-offset": "https://github.com/mapbox/mapbox-gl-native/issues/14211",
|
||||
"render-tests/text-variable-anchor/remember-last-placement": "skip - fails on gl-native, as symbol index is not functional at static map mode - needs issue",
|
||||
|
||||
@@ -139,7 +139,6 @@ void drawIcon(const DrawFn& draw,
|
||||
bucket.icon,
|
||||
iconSegments,
|
||||
bucket.iconSizeBinder,
|
||||
values,
|
||||
bucketPaintProperties.iconBinders,
|
||||
paintPropertyValues,
|
||||
SymbolSDFIconProgram::TextureBindings{
|
||||
@@ -154,7 +153,6 @@ void drawIcon(const DrawFn& draw,
|
||||
bucket.icon,
|
||||
iconSegments,
|
||||
bucket.iconSizeBinder,
|
||||
values,
|
||||
bucketPaintProperties.iconBinders,
|
||||
paintPropertyValues,
|
||||
SymbolSDFIconProgram::TextureBindings{
|
||||
@@ -168,7 +166,6 @@ void drawIcon(const DrawFn& draw,
|
||||
bucket.icon,
|
||||
iconSegments,
|
||||
bucket.iconSizeBinder,
|
||||
values,
|
||||
bucketPaintProperties.iconBinders,
|
||||
paintPropertyValues,
|
||||
SymbolIconProgram::TextureBindings{
|
||||
@@ -206,7 +203,6 @@ void drawText(const DrawFn& draw,
|
||||
bucket.text,
|
||||
textSegments,
|
||||
bucket.textSizeBinder,
|
||||
values,
|
||||
bucketPaintProperties.textBinders,
|
||||
paintPropertyValues,
|
||||
SymbolSDFTextProgram::TextureBindings{
|
||||
@@ -221,7 +217,6 @@ void drawText(const DrawFn& draw,
|
||||
bucket.text,
|
||||
textSegments,
|
||||
bucket.textSizeBinder,
|
||||
values,
|
||||
bucketPaintProperties.textBinders,
|
||||
paintPropertyValues,
|
||||
SymbolSDFTextProgram::TextureBindings{
|
||||
@@ -293,7 +288,6 @@ void RenderSymbolLayer::render(PaintParameters& parameters) {
|
||||
const auto& buffers,
|
||||
auto& segments,
|
||||
const auto& symbolSizeBinder,
|
||||
const SymbolPropertyValues& values_,
|
||||
const auto& binders,
|
||||
const auto& paintProperties,
|
||||
const auto& textureBindings,
|
||||
@@ -322,9 +316,7 @@ void RenderSymbolLayer::render(PaintParameters& parameters) {
|
||||
parameters.context,
|
||||
*parameters.renderPass,
|
||||
gfx::Triangles(),
|
||||
values_.pitchAlignment == AlignmentType::Map
|
||||
? parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly)
|
||||
: gfx::DepthMode::disabled(),
|
||||
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
|
||||
gfx::StencilMode::disabled(),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
@@ -341,9 +333,7 @@ void RenderSymbolLayer::render(PaintParameters& parameters) {
|
||||
parameters.context,
|
||||
*parameters.renderPass,
|
||||
gfx::Triangles(),
|
||||
values_.pitchAlignment == AlignmentType::Map
|
||||
? parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly)
|
||||
: gfx::DepthMode::disabled(),
|
||||
parameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
|
||||
gfx::StencilMode::disabled(),
|
||||
parameters.colorModeForRenderPass(),
|
||||
gfx::CullFaceMode::disabled(),
|
||||
|
||||
@@ -70,9 +70,8 @@ mat4 PaintParameters::matrixForTile(const UnwrappedTileID& tileID, bool aligned)
|
||||
}
|
||||
|
||||
gfx::DepthMode PaintParameters::depthModeForSublayer(uint8_t n, gfx::DepthMaskType mask) const {
|
||||
float nearDepth = ((1 + currentLayer) * numSublayers + n) * depthEpsilon;
|
||||
float farDepth = nearDepth + depthRangeSize;
|
||||
return gfx::DepthMode { gfx::DepthFunctionType::LessEqual, mask, { nearDepth, farDepth } };
|
||||
float depth = depthRangeSize + ((1 + currentLayer) * numSublayers + n) * depthEpsilon;
|
||||
return gfx::DepthMode { gfx::DepthFunctionType::LessEqual, mask, { depth, depth } };
|
||||
}
|
||||
|
||||
gfx::DepthMode PaintParameters::depthModeFor3D() const {
|
||||
|
||||
Reference in New Issue
Block a user