diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-05-25 09:15:27 -0700 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2017-07-11 09:10:23 -0700 |
commit | 8c23f14a9f47bc3e2d687ed25561b586643348f5 (patch) | |
tree | 5f789457e8fb1f4ba93eca7608bcd86826ec5c44 /src/mbgl | |
parent | f8402e20425cee6cbad2a28809bce17ac46c1379 (diff) | |
download | qtlocation-mapboxgl-8c23f14a9f47bc3e2d687ed25561b586643348f5.tar.gz |
[core] Use fade texture in collision debug boxes so that they agree more closely with symbol shaders.
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/programs/collision_box_program.hpp | 3 | ||||
-rw-r--r-- | src/mbgl/programs/symbol_program.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/programs/uniforms.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/renderer/painters/painter_symbol.cpp | 3 |
4 files changed, 5 insertions, 3 deletions
diff --git a/src/mbgl/programs/collision_box_program.hpp b/src/mbgl/programs/collision_box_program.hpp index 3b4260bb78..ba99e0c087 100644 --- a/src/mbgl/programs/collision_box_program.hpp +++ b/src/mbgl/programs/collision_box_program.hpp @@ -33,7 +33,8 @@ class CollisionBoxProgram : public Program< uniforms::u_maxzoom, uniforms::u_collision_y_stretch, uniforms::u_camera_to_center_distance, - uniforms::u_pitch>, + uniforms::u_pitch, + uniforms::u_fadetexture>, style::Properties<>> { public: diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp index c38ed04a1e..130e556b46 100644 --- a/src/mbgl/programs/symbol_program.hpp +++ b/src/mbgl/programs/symbol_program.hpp @@ -31,7 +31,6 @@ class TransformState; namespace uniforms { MBGL_DEFINE_UNIFORM_SCALAR(bool, u_rotate_with_map); MBGL_DEFINE_UNIFORM_SCALAR(gl::TextureUnit, u_texture); -MBGL_DEFINE_UNIFORM_SCALAR(gl::TextureUnit, u_fadetexture); MBGL_DEFINE_UNIFORM_SCALAR(float, u_aspect_ratio); MBGL_DEFINE_UNIFORM_SCALAR(bool, u_is_halo); MBGL_DEFINE_UNIFORM_SCALAR(float, u_gamma_scale); diff --git a/src/mbgl/programs/uniforms.hpp b/src/mbgl/programs/uniforms.hpp index 8d606dcf08..861f3271c9 100644 --- a/src/mbgl/programs/uniforms.hpp +++ b/src/mbgl/programs/uniforms.hpp @@ -51,6 +51,7 @@ MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pixel_coord_lower); MBGL_DEFINE_UNIFORM_SCALAR(float, u_mix); MBGL_DEFINE_UNIFORM_SCALAR(gl::TextureUnit, u_image); +MBGL_DEFINE_UNIFORM_SCALAR(gl::TextureUnit, u_fadetexture); MBGL_DEFINE_UNIFORM_SCALAR(float, u_scale_a); MBGL_DEFINE_UNIFORM_SCALAR(float, u_scale_b); MBGL_DEFINE_UNIFORM_SCALAR(float, u_tile_units_to_pixels); diff --git a/src/mbgl/renderer/painters/painter_symbol.cpp b/src/mbgl/renderer/painters/painter_symbol.cpp index c358d78b80..dc80f096f4 100644 --- a/src/mbgl/renderer/painters/painter_symbol.cpp +++ b/src/mbgl/renderer/painters/painter_symbol.cpp @@ -154,7 +154,8 @@ void Painter::renderSymbol(PaintParameters& parameters, uniforms::u_maxzoom::Value{ float((tile.id.canonical.z + 1) * 10) }, uniforms::u_collision_y_stretch::Value{ tile.tile.yStretch() }, uniforms::u_camera_to_center_distance::Value{ state.getCameraToCenterDistance() }, - uniforms::u_pitch::Value{ state.getPitch() } + uniforms::u_pitch::Value{ state.getPitch() }, + uniforms::u_fadetexture::Value{ 1 } }, *bucket.collisionBox.vertexBuffer, *bucket.collisionBox.indexBuffer, |