Commit Graph

10 Commits

Author SHA1 Message Date
Ansis Brammanis
79c986a04c fix shader generation script
the main fix is switching from ifdef -> ifndef

The rest of the changes just make a cleaner diff.
2017-06-16 16:10:29 -07:00
Konstantin Käfer
2cbc3d3332 [core] add shader defines for enabling/disabling attributes/uniforms for DDS 2017-06-13 12:21:50 -07:00
John Firebaugh
31bf6719fc [core] Reduce number of varyings to 8 or less
For #pragmas, don't generate varyings for attributes that aren't used by the fragment shader. Pack other varyings more tightly.
2017-06-13 08:41:39 -07:00
Lauren Budorick
f6e79d7073 [core] Render fill-extrusion layers (#8431) 2017-04-27 15:56:55 -07:00
Molly Lloyd
692f5e0a9f Pack min + max into one attribute 💪
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.
2017-03-08 15:23:25 -08:00
John Firebaugh
b83b14feb0 [core] De-duplicate shader prelude source 2017-03-08 13:49:24 -08:00
Konstantin Käfer
c3ed1f51ca [core] remove gl.hpp include from shader headers 2017-02-28 18:28:41 -08:00
John Firebaugh
94a3c272ff [core] Update gl-js; fix $id filters with GeoJSON source 2017-02-08 19:07:53 -06:00
John Firebaugh
74eb8b3609 [core] Use cpp files for shader source 2017-02-07 11:27:36 -06:00
John Firebaugh
9f2f7ddd12 [core] Check in generated shader code
One step toward eliminating the node/npm dependency for platforms other than node.
2017-02-07 11:27:36 -06:00