diff --git a/src/styles/points/points.js b/src/styles/points/points.js index aad9feb57..6288a4bd4 100755 --- a/src/styles/points/points.js +++ b/src/styles/points/points.js @@ -96,6 +96,11 @@ Object.assign(Points, { if (debugSettings.show_hidden_labels === true) { this.defines.TANGRAM_SHOW_HIDDEN_LABELS = true; } + + // Enable wireframe for debugging + if (debugSettings.wireframe === true) { + this.defines.TANGRAM_WIREFRAME = true; + } }, reset () { diff --git a/src/styles/points/points_fragment.glsl b/src/styles/points/points_fragment.glsl index ebcccc731..8ac9288d2 100755 --- a/src/styles/points/points_fragment.glsl +++ b/src/styles/points/points_fragment.glsl @@ -109,5 +109,15 @@ void main (void) { } #endif + // Make points more visible in wireframe debug mode + #ifdef TANGRAM_WIREFRAME + color = vec4(vec3(0.5), 1.); // use gray outline for textured points + #ifdef TANGRAM_HAS_SHADER_POINTS + if (u_point_type == TANGRAM_POINT_TYPE_SHADER) { + color = vec4(v_color.rgb, 1.); // use original vertex color outline for shader points + } + #endif + #endif + gl_FragColor = color; }