summaryrefslogtreecommitdiff
path: root/src/mbgl/shaders
Commit message (Collapse)AuthorAgeFilesLines
* [core] improve legibility of labels that follow linesAnsis Brammanis2017-07-113-187/+93
| | | | | | | | | | port https://github.com/mapbox/mapbox-gl-js/pull/4781 This improves legibility of labels that follow lines in pitched views. The previous approach used the limited information in the shader to calculate put the glyph in approximatelyright place. The new approach does this more accurately by doing it on the cpu where we have access to the entire line geometry.
* [core] Re-generate shaders.Chris Loer2017-07-113-89/+184
|
* [core] Implement circle-pitch-alignment propertyChris Loer2017-07-061-5/+23
| | | | Closes issue #9349.
* [core] Enable property functions for line-width (#9250)Lauren Budorick2017-06-193-12/+83
|
* [core] Dynamic program compilation for data-driven propertiesJohn Firebaugh2017-06-131-2/+2
|
* [core] cleanup ProgramParametersKonstantin Käfer2017-06-132-21/+2
|
* [core] add shader defines for enabling/disabling attributes/uniforms for DDSKonstantin Käfer2017-06-1312-32/+668
|
* [core] Reduce number of varyings to 8 or lessJohn Firebaugh2017-06-135-45/+46
| | | | For #pragmas, don't generate varyings for attributes that aren't used by the fragment shader. Pack other varyings more tightly.
* [core] Move pattern coordinate division by texture size into shaderJohn Firebaugh2017-05-235-10/+14
| | | | This makes pattern usage more like icons, and will be necessary for data-driven *-pattern properties.
* [core] Render fill-extrusion layers (#8431)Lauren Budorick2017-04-277-2/+299
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-063-27/+124
| | | | | | | | | | | | | | | | | | | | | | | | * Update gl-js and generate style code * Factor out packUint8Pair() helper function * Draft implementation of DDS for {text,icon}-size Ports https://github.com/mapbox/mapbox-gl-js/pull/4455 * Fix text-size/composite-function-line-placement test * Refactor to PaintPropertyBinders-like strategy * Dedupe gl::Program construction * Use exponential function base for interpolation * Dedupe coveringZoomStops method * Fixup tests * Fix CI errors (hidden within #if block)
* [core] Update mapbox-gl-js submoduleJohn Firebaugh2017-03-287-25/+25
| | | | Includes lowp ⇢ highp fix for shader color attributes / uniforms.
* [core] cache binary shaders on AndroidKonstantin Käfer2017-03-222-0/+16
|
* Merge branch 'release-ios-v3.5.0-android-v5.0.0'John Firebaugh2017-03-211-1/+1
|\
| * Increase precision of shader variable (#8423)Anand Thakker2017-03-151-1/+1
| | | | | | Fixes #7599
* | [core] Extract and de-templatize several Program static methodsJohn Firebaugh2017-03-092-0/+48
|/
* Pack min + max into one attribute :muscle:Molly Lloyd2017-03-0811-103/+100
| | | | | | | | Some devices supported by Mapbox GL provide only 8 vertex attributes; this change packs existing attributes to get us just under that limit. For properties using a composite function, pack the min and max values into a single attribute with two logical components instead of using two separate attributes and buffers. Special logic is included for color attributes, whose integer components must be packed into the available bits of floating-point attributes. (We don't have access to ivec types in GL ES 2.0.) For source functions, continue to bind just a one-component attribute even though the GLSL type is vec2 (or vec4 for colors). The type-checking done by gl::Attribute is relaxed slightly to accommodate this.
* [core] De-duplicate shader prelude sourceJohn Firebaugh2017-03-0815-923/+99
|
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-282-9/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939) * Add symbol dds attributes and adapt style code generation * Update to mapbox-gl-js/master * Refactor SymbolFeature as a subclass of GeometryTileFeature Prepares for enabling DDS on symbol paint properties by allowing the SymbolFeatures, which we keep around after constructing SymbolLayout, to be used in evaluating data-driven paint properties later in the layout process. * Draft approach for splitting icon/text paint properties The `Program` types are set up to bind GL attributes to each of the data-driven paint properties specified in the `PaintProperties` type provided. Since `SymbolPaintProperties` specifies both `Text*` and `Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph programs each attempt to bind roughly double the number of attributes that they actually need. This change addresses this by: - Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`. - The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter. - The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type. * check in generated style code * Populate paint buffers for symbol DDS properties * Address first round of review comments * Refactor VectorTile{Layer,Feature} to explicitly share data * Update submodule
* [core] remove gl.hpp include from shader headersKonstantin Käfer2017-02-2813-26/+0
|
* [core] Fix aliased text on mobile GPUsJohn Firebaugh2017-02-151-3/+3
| | | | | | Need highp precision for gamma values on mobile devices. lowp triggers aliasing artifacts at larger font sizes. Note that this change is a hand-edit to the generated shader sources, rather than pulling https://github.com/mapbox/mapbox-gl-js/pull/4275 and running the generator script. The reason for that is that the upstream shader now assumes support for DDS properties that gl-native does not yet support. Once that support lands in gl-native, we can regenerate the shader source.
* [core] Use cpp files for shader sourceJohn Firebaugh2017-02-0726-2011/+2206
|
* [core] Check in generated shader codeJohn Firebaugh2017-02-0713-0/+2180
One step toward eliminating the node/npm dependency for platforms other than node.