[core] Move pattern coordinate division by texture size into shader

This makes pattern usage more like icons, and will be necessary for data-driven *-pattern properties.
This commit is contained in:
John Firebaugh
2017-05-17 18:19:48 -07:00
parent 72b13cef6a
commit 71c8f6aa10
20 changed files with 36 additions and 18 deletions

View File

@@ -51,7 +51,7 @@ Values makeValues(const bool isText,
values.translateAnchor,
state) },
uniforms::u_extrude_scale::Value{ extrudeScale },
uniforms::u_texsize::Value{ std::array<float, 2> {{ float(texsize.width), float(texsize.height) }} },
uniforms::u_texsize::Value{ texsize },
uniforms::u_zoom::Value{ float(state.getZoom()) },
uniforms::u_rotate_with_map::Value{ values.rotationAlignment == AlignmentType::Map },
uniforms::u_texture::Value{ 0 },