Fix trailing whitespaces (#3205)
See https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#trailing-whitespace
This commit is contained in:
@@ -167,7 +167,7 @@ layout(location = 2) out vec2 frag_position;
|
||||
|
||||
void main() {
|
||||
const FillOutlineDrawableUBO drawable = drawableVector.drawable_ubo[constant.ubo_index];
|
||||
|
||||
|
||||
#if !defined(HAS_UNIFORM_u_outline_color)
|
||||
frag_color = vec4(unpack_mix_color(in_color, drawable.outline_color_t));
|
||||
#endif
|
||||
@@ -331,9 +331,9 @@ void main() {
|
||||
frag_opacity = unpack_mix_float(in_opacity, drawable.opacity_t);
|
||||
#endif
|
||||
|
||||
const vec2 pattern_tl_a = frag_pattern_from.xy;
|
||||
const vec2 pattern_br_a = frag_pattern_from.zw;
|
||||
const vec2 pattern_tl_b = frag_pattern_to.xy;
|
||||
const vec2 pattern_tl_a = frag_pattern_from.xy;
|
||||
const vec2 pattern_br_a = frag_pattern_from.zw;
|
||||
const vec2 pattern_tl_b = frag_pattern_to.xy;
|
||||
const vec2 pattern_br_b = frag_pattern_to.zw;
|
||||
|
||||
const float pixelRatio = paintParams.pixel_ratio;
|
||||
@@ -543,9 +543,9 @@ void main() {
|
||||
frag_opacity = unpack_mix_float(in_opacity, drawable.opacity_t);
|
||||
#endif
|
||||
|
||||
const vec2 pattern_tl_a = frag_pattern_from.xy;
|
||||
const vec2 pattern_br_a = frag_pattern_from.zw;
|
||||
const vec2 pattern_tl_b = frag_pattern_to.xy;
|
||||
const vec2 pattern_tl_a = frag_pattern_from.xy;
|
||||
const vec2 pattern_br_a = frag_pattern_from.zw;
|
||||
const vec2 pattern_tl_b = frag_pattern_to.xy;
|
||||
const vec2 pattern_br_b = frag_pattern_to.zw;
|
||||
|
||||
const float pixelRatio = paintParams.pixel_ratio;
|
||||
|
||||
@@ -306,7 +306,7 @@ void main() {
|
||||
const vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0
|
||||
? vec2(in_position) // extrusion top
|
||||
: vec2(edgedistance, z * drawable.height_factor); // extrusion side
|
||||
|
||||
|
||||
vec4 lighting = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
float directional = clamp(dot(normal / 16383.0, props.light_position_base.xyz), 0.0, 1.0);
|
||||
directional = mix((1.0 - props.light_intensity), max((0.5 + props.light_intensity), 1.0), directional);
|
||||
|
||||
@@ -129,7 +129,7 @@ void main() {
|
||||
#else
|
||||
const lowp float offset = props.offset * -1.0;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAS_UNIFORM_u_width
|
||||
mediump float width = unpack_mix_float(in_width, drawable.width_t);
|
||||
#else
|
||||
@@ -232,7 +232,7 @@ void main() {
|
||||
#else
|
||||
lowp float blur = frag_blur;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAS_UNIFORM_u_opacity
|
||||
lowp float opacity = props.opacity;
|
||||
#else
|
||||
@@ -356,7 +356,7 @@ void main() {
|
||||
#else
|
||||
const lowp float offset = props.offset * -1.0;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAS_UNIFORM_u_width
|
||||
mediump float width = unpack_mix_float(in_width, drawable.width_t);
|
||||
#else
|
||||
@@ -453,7 +453,7 @@ void main() {
|
||||
#else
|
||||
lowp float blur = frag_blur;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAS_UNIFORM_u_opacity
|
||||
lowp float opacity = props.opacity;
|
||||
#else
|
||||
@@ -597,7 +597,7 @@ void main() {
|
||||
#else
|
||||
const lowp float offset = props.offset * -1.0;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAS_UNIFORM_u_width
|
||||
mediump float width = unpack_mix_float(in_width, drawable.width_t);
|
||||
#else
|
||||
@@ -723,14 +723,14 @@ void main() {
|
||||
return;
|
||||
#endif
|
||||
|
||||
const LinePatternTilePropertiesUBO tileProps = tilePropsVector.tile_props_ubo[constant.ubo_index];
|
||||
const LinePatternTilePropertiesUBO tileProps = tilePropsVector.tile_props_ubo[constant.ubo_index];
|
||||
|
||||
#ifdef HAS_UNIFORM_u_blur
|
||||
const lowp float blur = props.blur;
|
||||
#else
|
||||
const lowp float blur = frag_blur;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAS_UNIFORM_u_opacity
|
||||
const lowp float opacity = props.opacity;
|
||||
#else
|
||||
@@ -1065,7 +1065,7 @@ void main() {
|
||||
#else
|
||||
const lowp float blur = frag_blur;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAS_UNIFORM_u_opacity
|
||||
const lowp float opacity = props.opacity;
|
||||
#else
|
||||
|
||||
@@ -24,7 +24,7 @@ struct ShaderSource<BuiltIn::SymbolIconShader, gfx::Backend::Type::Vulkan> {
|
||||
static const std::array<TextureInfo, 1> textures;
|
||||
|
||||
static constexpr auto vertex = SYMBOL_SHADER_COMMON R"(
|
||||
|
||||
|
||||
layout(location = 0) in ivec4 in_pos_offset;
|
||||
layout(location = 1) in uvec4 in_data;
|
||||
layout(location = 2) in ivec4 in_pixeloffset;
|
||||
@@ -33,7 +33,7 @@ layout(location = 4) in float in_fade_opacity;
|
||||
|
||||
#if !defined(HAS_UNIFORM_u_opacity)
|
||||
layout(location = 5) in vec2 in_opacity;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
layout(push_constant) uniform Constants {
|
||||
int ubo_index;
|
||||
@@ -129,7 +129,7 @@ void main() {
|
||||
const vec2 posOffset = a_offset * max(a_minFontScale, fontScale) / 32.0 + a_pxoffset / 16.0;
|
||||
gl_Position = drawable.coord_matrix * vec4(pos0 + rotation_matrix * posOffset, 0.0, 1.0);
|
||||
applySurfaceTransform();
|
||||
|
||||
|
||||
const vec2 raw_fade_opacity = unpack_opacity(in_fade_opacity);
|
||||
const float fade_change = raw_fade_opacity[1] > 0.5 ? paintParams.symbol_fade_change : -paintParams.symbol_fade_change;
|
||||
const float fade_opacity = max(0.0, min(1.0, raw_fade_opacity[0] + fade_change));
|
||||
@@ -211,7 +211,7 @@ struct ShaderSource<BuiltIn::SymbolSDFIconShader, gfx::Backend::Type::Vulkan> {
|
||||
static const std::array<TextureInfo, 1> textures;
|
||||
|
||||
static constexpr auto vertex = SYMBOL_SHADER_COMMON R"(
|
||||
|
||||
|
||||
layout(location = 0) in ivec4 in_pos_offset;
|
||||
layout(location = 1) in uvec4 in_data;
|
||||
layout(location = 2) in ivec4 in_pixeloffset;
|
||||
@@ -236,7 +236,7 @@ layout(location = 8) in vec2 in_halo_width;
|
||||
|
||||
#if !defined(HAS_UNIFORM_u_halo_blur)
|
||||
layout(location = 9) in vec2 in_halo_blur;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
layout(push_constant) uniform Constants {
|
||||
int ubo_index;
|
||||
@@ -505,7 +505,7 @@ struct ShaderSource<BuiltIn::SymbolTextAndIconShader, gfx::Backend::Type::Vulkan
|
||||
static const std::array<TextureInfo, 2> textures;
|
||||
|
||||
static constexpr auto vertex = SYMBOL_SHADER_COMMON R"(
|
||||
|
||||
|
||||
#define SDF 1.0
|
||||
#define ICON 0.0
|
||||
|
||||
@@ -532,7 +532,7 @@ layout(location = 7) in vec2 in_halo_width;
|
||||
|
||||
#if !defined(HAS_UNIFORM_u_halo_blur)
|
||||
layout(location = 8) in vec2 in_halo_blur;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
layout(push_constant) uniform Constants {
|
||||
int ubo_index;
|
||||
@@ -657,13 +657,13 @@ void main() {
|
||||
const vec2 pos0 = projected_pos.xy / projected_pos.w + rotation_matrix * pos_rot;
|
||||
gl_Position = drawable.coord_matrix * vec4(pos0, 0.0, 1.0);
|
||||
applySurfaceTransform();
|
||||
|
||||
|
||||
const vec2 raw_fade_opacity = unpack_opacity(in_fade_opacity);
|
||||
const float fade_change = raw_fade_opacity[1] > 0.5 ? paintParams.symbol_fade_change : -paintParams.symbol_fade_change;
|
||||
|
||||
const bool is_icon = (is_sdf == ICON);
|
||||
frag_is_icon = int(is_icon);
|
||||
|
||||
|
||||
frag_tex = a_tex / (is_icon ? drawable.texsize_icon : drawable.texsize);
|
||||
frag_fade_opacity = max(0.0, min(1.0, raw_fade_opacity[0] + fade_change));
|
||||
frag_font_scale = fontScale;
|
||||
|
||||
@@ -26,7 +26,7 @@ struct ShaderSource<BuiltIn::WideVectorShader, gfx::Backend::Type::Vulkan> {
|
||||
|
||||
/** Expressions are used to change values like width and opacity over zoom levels. **/
|
||||
#define WKSExpStops 8
|
||||
|
||||
|
||||
// Line Joins
|
||||
// These are assumed to match WideVectorLineJoinType
|
||||
#define WKSVertexLineJoinMiter 0
|
||||
@@ -117,7 +117,7 @@ vec3 viewPos(const mat4 &mat, vec3 vec) {
|
||||
|
||||
float2 screenPos_MVP(const Uniforms &u, float3 viewPos) {
|
||||
const float4 p4 = float4(viewPos, 1.0);
|
||||
|
||||
|
||||
// Use the MVP matrix
|
||||
const float4 s = u.mvpMatrix * p4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user