summaryrefslogtreecommitdiff
path: root/src/mbgl/programs
Commit message (Collapse)AuthorAgeFilesLines
* [core] Double maximum label width by reducing glyph precision.Chris Loer2018-03-221-2/+2
| | | | | Fixes issue #11507. Port of GL JS PR #6375.
* [core, ios, macos, android, node] Heatmap layer (#11046)Vladimir Agafonkin2018-02-157-1/+123
| | | | | Co-Authored-By: Konstantin Käfer <mail@kkaefer.com> Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com> Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
* [core] add maxzoom uniform for raster-dem tilesets (#11134)Molly Lloyd2018-02-141-0/+2
| | | | | | | | | | * add maxzoom uniform to support external tilesets * update git sha for gl-js * try and fix android crash * name default maxzoom constant
* [core] Account for overscaling in debug collision circles.Chris Loer2018-02-062-0/+2
| | | | | Fixes issue #11116. Port of GL JS issue $6041.
* [core] add raster-dem source type and hillshade layer type (#10642)Molly Lloyd2018-01-235-0/+122
|
* [core] Use separate shaders for background and clippingLauren Budorick2018-01-096-5/+172
|
* [core] Better align fill-extrusion vertex layoutLauren Budorick2017-12-202-9/+4
|
* [core] Cleanup in response to review comments.Chris Loer2017-11-171-85/+83
|
* [core] Update shaders/tests from GL JS.Chris Loer2017-11-176-37/+174
|
* Implement Expressions (#9439)Anand Thakker2017-11-081-40/+11
| | | Ports https://github.com/mapbox/mapbox-gl-js/pull/4777 (and its several follow-ups)
* [core] Align line vertex to 4-byte boundaryJohn Firebaugh2017-09-083-3/+4
| | | | 10 byte vertices are heavily penalized by common GL implementations.
* [core] Use separate attribute component for line normalsJohn Firebaugh2017-08-083-6/+9
| | | | Broadcom GPUs don't cope well with using the least significant bit for this.
* [core] No need for optional in map of VertexArraysJohn Firebaugh2017-07-123-10/+9
|
* [core] Remove segment.cppJohn Firebaugh2017-07-121-7/+0
|
* [core] Use a type alias for SegmentVectorJohn Firebaugh2017-07-121-4/+1
|
* [core] Per-segment-per-layer vertex arraysJohn Firebaugh2017-07-123-9/+22
| | | | Reduces rebinding, matches gl-js, and works around the buggy VAO implementation on PowerVR SGX544 GPUs.
* [core] Rework attribute binding (again)John Firebaugh2017-07-126-35/+108
| | | | | | | | | | These changes are necessary for programs whose set of active attributes is not fixed at compile time by a template parameter pack, but rather varies based on the generated shader text at runtime. In such cases, the attribute location of a given named attribute may vary between instances of the same Program. Previously, attribute bindings were implicitly associated with a location based on template parameter order, and -1 was used to indicate an inactive attribute. This left us unable to disable the appropriate attribute when it went from active to inactive. Now, the state tracker for bindings explicitly associates locations and state, and an empty optional is used to indicate an inactive attribute. In addition, a gl::VertexArray class is now exposed, allowing more flexibility in the relationship between Programs, Segments, and attribute bindings. In this commit, that relationship does not change, but the subsequent commit adjusts it to match gl-js, reduce rebinds, and work around buggy VAO implementations. VertexArray uses a pimpl idiom in order to support implementations that lack the VAO extension. In that case, all VertexArrays share global binding state, reflecting the platform reality in the absence of VAOs, while still providing a uniform API.
* [core] Update shaders.Chris Loer2017-07-122-1/+16
| | | | | Implements 'icon-pitch-alignment' (issue #9345) Fixes issue #9456 (map-aligned point label regression)
* [core] Added missing header includesBruno de Oliveira Abinader2017-07-121-0/+1
|
* [core] improve legibility of labels that follow linesAnsis Brammanis2017-07-114-137/+107
| | | | | | | | | | 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] Use fade texture in collision debug boxes so that they agree more ↵Chris Loer2017-07-113-2/+3
| | | | closely with symbol shaders.
* [core] Set "max_camera_distance" to 1.5 for viewport-aligned road labels.Chris Loer2017-07-111-1/+1
| | | | Viewport-aligned curved labels start to look very strange in the distance. Until we have a better system for projecting them, just prevent them from showing.
* [core] Pass pitch-scaling vertex attributes and uniforms to shaders.Chris Loer2017-07-116-9/+36
|
* [core] Improved label pitch-scaling: approximate collision box shapes based ↵Chris Loer2017-07-112-1/+7
| | | | on tile distance from camera.
* [core] Implement circle-pitch-alignment propertyChris Loer2017-07-063-2/+5
| | | | Closes issue #9349.
* [core] Enable property functions for line-width (#9250)Lauren Budorick2017-06-194-20/+20
|
* [core] Eliminate constant attribute bindingsJohn Firebaugh2017-06-142-6/+7
| | | | Rather than binding constant attributes that will never be used, just disable the attribute.
* [core] rename a_gap_width => a_gapwidth, u_gap_width => u_gapwidth to ↵Konstantin Käfer2017-06-142-2/+2
| | | | | | reflect naming in the shader not sure how this ever worked
* [core] Don't use "current" icon/text-size when bindingJohn Firebaugh2017-06-141-16/+5
| | | | | | The current value is not passed to `SymbolSizeBinder::uniformValues`, so we shouldn't check `currentValue.isConstant()` in `SymbolSizeBinder::attributeBindings`. If it were true, then we might end up using attribute bindings that are appropriate only for a constant property, but uniform bindings that are appropriate only for a source or composite function. Instead, just wait for a new bucket to be generated. This will happen automatically, since icon/text-size are layout properties.
* [core] Dynamic program compilation for data-driven propertiesJohn Firebaugh2017-06-135-28/+81
|
* [core] cleanup ProgramParametersKonstantin Käfer2017-06-133-10/+41
|
* [core] add constant DDS values as uniformsKonstantin Käfer2017-06-132-2/+2
|
* [core] add uniforms to DataDrivenPaintPropertysKonstantin Käfer2017-06-131-1/+13
|
* [core] Per-bucket icon atlasesJohn Firebaugh2017-06-136-18/+18
|
* Fix undefined memory access in getCoveringRanges() (#9227)Anand Thakker2017-06-091-3/+4
| | | | | | | | | | | | * Add simple unit tests for SymbolSizeBinder * Fix bug in symbol size uniform value calculation For camera functions we were setting the zoom levels in "covering ranges" to `[(zoom stop <= tile zoom), (zoom stop >= 1 + tile zoom)]`, but then evaluating the function at `[tile_zoom, tile_zoom + 1]`. * Check for it != end() before accessing it->first
* [core] Simplify and fix sprite atlas coordinate calculationsJohn Firebaugh2017-05-234-24/+24
| | | | | | | | * Always return image metrics exclusive of padding * Work with integer coordinates whenever possible * Eliminate redundant SpriteAtlasElement members * Fix asymmetric re-padding in getIconQuad when pixelRatio != 1 * Add explanatory comments
* [core] Move pattern coordinate division by texture size into shaderJohn Firebaugh2017-05-239-2/+14
| | | | This makes pattern usage more like icons, and will be necessary for data-driven *-pattern properties.
* [core] add error for non-virtual destructor deletes + add virtual dtorsKonstantin Käfer2017-05-181-3/+5
|
* [core] Remove obsolete modular arithmetic on atlas coordinatesJohn Firebaugh2017-05-172-3/+3
| | | | We switched to 16-bit coordinates in attributes in b0cb8715ed74678b4d0f05829fa71a590e41b2f6, so there's no longer any reason to require that they are divisible by four.
* [core] Unify {Paint,Layout,Light}PropertiesJohn Firebaugh2017-05-157-12/+15
|
* [core] Move renderer/* files into sub-folders (#8983)Asheem Mamoowala2017-05-121-1/+1
| | | Move renderer/* files into sub-folders
* [tidy] modernize-pass-by-valueBruno de Oliveira Abinader2017-05-123-5/+7
|
* [core] Move render-related sources out of style directory/namespaceJohn Firebaugh2017-05-035-18/+12
| | | | | | | | | | | | | | | | Moves the following to the renderer directory and out of the style namespace: * CascadeParameters * PropertyEvaluationParameters * UpdateParameters * PropertyEvaluator * DataDrivenPropertyEvaluator * CrossFadedPropertyEvaluator * PaintPropertyBinder * PaintProperyStatistics * PossiblyEvaluatedPropertyValue * TransitioningLight * EvaluatedLight
* [core] Render fill-extrusion layers (#8431)Lauren Budorick2017-04-278-9/+271
|
* [core] split off render layersIvo van Dongen2017-04-251-0/+1
|
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-066-94/+400
| | | | | | | | | | | | | | | | | | | | | | | | * 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] cache binary shaders on AndroidKonstantin Käfer2017-03-225-11/+226
|
* [core] Fix overspecialization of PaintPropertyBinder templateJohn Firebaugh2017-03-171-143/+38
| | | | | | | | | | | | | | | | | | PaintPropertyBinder and subclass templates were being instantiated for every unique attribute type (e.g. a_color, a_fill_color, a_halo_color) even though they behave identically for a given property value type (e.g. Color). To fix this, a unique type such as a_color no longer derives from gl::Attribute<...> -- instead it has an inner Type typedef, which should be used wherever neither a unique type nor attribute name is required. This reduces binary size substantially: VM SIZE FILE SIZE ++++++++++++++ GROWING ++++++++++++++ -------------- SHRINKING -------------- -2.0% -49.3Ki __TEXT,__text -49.3Ki -2.0% -3.1% -5.21Ki [None] -2.79Ki -1.6% -2.1% -4.12Ki __TEXT,__const -4.12Ki -2.1% -1.4% -4.04Ki __TEXT,__gcc_except_tab -4.04Ki -1.4% -19.3% -3.62Ki __DATA,__data -3.62Ki -19.3% -2.5% -1.65Ki __TEXT,__unwind_info -1.65Ki -2.5% -4.2% -8 __DATA,__mod_init_func 0 [ = ] -1.9% -68.0Ki TOTAL -65.6Ki -1.9%
* [core] Don't need to use normalized attributes anymoreJohn Firebaugh2017-03-171-5/+4
|
* [core] Extract and de-templatize several Program static methodsJohn Firebaugh2017-03-091-27/+4
|