Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Experiment with doing texture lookup rounding explicitly in the icon …
Browse files Browse the repository at this point in the history
…fragment shader.
  • Loading branch information
ChrisLoer committed Mar 23, 2017
1 parent 01405cb commit 925c79e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/mbgl/shaders/symbol_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ varying vec2 v_fade_tex;
void main() {
float floored_x = float(int(v_tex.x * 2048.0))/2048.0;
float floored_y = float(int(v_tex.y * 2048.0))/2048.0;
vec2 floored_tex = vec2(floored_x, floored_y);
lowp float alpha = texture2D(u_fadetexture, v_fade_tex).a * opacity;
gl_FragColor = texture2D(u_texture, v_tex) * alpha;
gl_FragColor = texture2D(u_texture, floored_tex) * alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor = vec4(1.0);
Expand Down

0 comments on commit 925c79e

Please sign in to comment.