diff options
author | Lauren Budorick <lauren@mapbox.com> | 2017-07-26 13:18:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-26 13:18:47 -0700 |
commit | a8ef2af353de195648578bf0d753703cb6f34905 (patch) | |
tree | b6afc3efd568b0310c9e6287d4c0c9c78bee5baf /src/mbgl/shaders/preludes.cpp | |
parent | c5a5b4083795107b7df7bab39b461568a3861dba (diff) | |
download | qtlocation-mapboxgl-a8ef2af353de195648578bf0d753703cb6f34905.tar.gz |
[core][android][macos][ios] Implement property functions for line-join, text-justify, text-anchor (#9583)
Diffstat (limited to 'src/mbgl/shaders/preludes.cpp')
-rw-r--r-- | src/mbgl/shaders/preludes.cpp | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/mbgl/shaders/preludes.cpp b/src/mbgl/shaders/preludes.cpp index 95fa624e8d..feb185a684 100644 --- a/src/mbgl/shaders/preludes.cpp +++ b/src/mbgl/shaders/preludes.cpp @@ -24,25 +24,6 @@ precision highp float; #endif -float evaluate_zoom_function_1(const vec4 values, const float t) { - if (t < 1.0) { - return mix(values[0], values[1], t); - } else if (t < 2.0) { - return mix(values[1], values[2], t - 1.0); - } else { - return mix(values[2], values[3], t - 2.0); - } -} -vec4 evaluate_zoom_function_4(const vec4 value0, const vec4 value1, const vec4 value2, const vec4 value3, const float t) { - if (t < 1.0) { - return mix(value0, value1, t); - } else if (t < 2.0) { - return mix(value1, value2, t - 1.0); - } else { - return mix(value2, value3, t - 2.0); - } -} - // Unpack a pair of values that have been packed into a single float. // The packed values are assumed to be 8-bit unsigned integers, and are // packed like so: @@ -54,8 +35,8 @@ vec2 unpack_float(const float packedValue) { } -// To minimize the number of attributes needed in the mapbox-gl-native shaders, -// we encode a 4-component color into a pair of floats (i.e. a vec2) as follows: +// To minimize the number of attributes needed, we encode a 4-component +// color into a pair of floats (i.e. a vec2) as follows: // [ floor(color.r * 255) * 256 + color.g * 255, // floor(color.b * 255) * 256 + color.g * 255 ] vec4 decode_color(const vec2 encodedColor) { |