From b60e4afae51cc368755ea810a407012c6fc23498 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:34:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- include/mbgl/shaders/mtl/line.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/mbgl/shaders/mtl/line.hpp b/include/mbgl/shaders/mtl/line.hpp index 10e25a41f..7370b5378 100644 --- a/include/mbgl/shaders/mtl/line.hpp +++ b/include/mbgl/shaders/mtl/line.hpp @@ -316,7 +316,6 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], )"; }; - template <> struct ShaderSource { static constexpr auto name = "LineSDFShader"; @@ -500,8 +499,8 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], }; // -//template <> -//struct ShaderSource { +// template <> +// struct ShaderSource { // static constexpr auto name = "LineGradientShader"; // static constexpr auto vertexMainFunction = "vertexMain"; // static constexpr auto fragmentMainFunction = "fragmentMain"; @@ -528,7 +527,7 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], // // static constexpr auto source = R"( // -//struct VertexStage { +// struct VertexStage { // short2 pos_normal [[attribute(0)]]; // uchar4 data [[attribute(1)]]; // float2 blur [[attribute(2)]]; @@ -538,7 +537,7 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], // float2 width [[attribute(6)]]; //}; // -//struct FragmentStage { +// struct FragmentStage { // float4 position [[position, invariant]]; // float2 width2; // float2 normal; @@ -550,7 +549,7 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], // // // -//FragmentStage vertex vertexMain(thread const VertexStage vertx [[stage_in]], +// FragmentStage vertex vertexMain(thread const VertexStage vertx [[stage_in]], // device const LineGradientUBO& line [[buffer(7)]], // device const LineGradientPropertiesUBO& props [[buffer(8)]], // device const LineGradientInterpolationUBO& interp [[buffer(9)]], @@ -560,8 +559,8 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], // const auto blur = valueFor(permutation.blur, props.blur, vertx.blur, interp.blur_t, expr); // const auto opacity = valueFor(permutation.opacity, props.opacity, vertx.opacity, interp.opacity_t, expr); // const auto gapwidth = valueFor(permutation.gapwidth, props.gapwidth, vertx.gapwidth, interp.gapwidth_t, expr) / 2; -// const auto offset = valueFor(permutation.offset, props.offset, vertx.offset, interp.offset_t, expr) * -1; -// const auto width = valueFor(permutation.width, props.width, vertx.width, interp.width_t, expr); +// const auto offset = valueFor(permutation.offset, props.offset, vertx.offset, interp.offset_t, expr) * +// -1; const auto width = valueFor(permutation.width, props.width, vertx.width, interp.width_t, expr); // // // the distance over which the line edge fades out. // // Retina devices need a smaller distance to avoid aliasing. @@ -581,7 +580,8 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], // // const float halfwidth = width / 2.0; // const float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0); -// const float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING); +// const float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : +// ANTIALIASING); // // // Scale the extrusion vector down to a normal and then up by the line width of this vertex. // const float2 dist = outset * a_extrude * LINE_NORMAL_SCALE; @@ -612,7 +612,7 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], // }; //} // -//half4 fragment fragmentMain(FragmentStage in [[stage_in]], +// half4 fragment fragmentMain(FragmentStage in [[stage_in]], // device const LineSDFUBO& line [[buffer(9)]], // device const LinePermutationUBO& permutation [[buffer(12)]], // texture2d image0 [[texture(0)]],