Skip to content

Commit e4d279d

Browse files
Can BakiskanCan Bakiskan
authored andcommitted
projector: draw transparent sprites correctly
1 parent 785be16 commit e4d279d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tensorboard/plugins/projector/vz_projector/scatterPlotVisualizerSprites.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ function createFragmentShader() {
122122
// Coordinates of the vertex within the entire sprite image.
123123
vec2 coords =
124124
(gl_PointCoord + xyIndex) / vec2(spritesPerRow, spritesPerColumn);
125+
if (texture2D(spriteTexture, coords).a==0.0) {
126+
discard;
127+
}
125128
gl_FragColor = vec4(vColor, 1.0) * texture2D(spriteTexture, coords);
126129
} else {
127130
bool inside = point_in_unit_circle(gl_PointCoord);

0 commit comments

Comments
 (0)