Skip to content

Commit ab75fbd

Browse files
authored
Merge pull request #5904 from plotly/parcoords-regl-maskTexture-sampler
Use maskTexture name for parcoords regl setup
2 parents ba471e4 + 72e7f2d commit ab75fbd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/traces/parcoords/lines.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ module.exports = function(canvasGL, d) {
351351
hiD: regl.prop('hiD'),
352352
palette: paletteTexture,
353353
contextColor: regl.prop('contextColor'),
354-
mask: regl.prop('maskTexture'),
354+
maskTexture: regl.prop('maskTexture'),
355355
drwLayer: regl.prop('drwLayer'),
356356
maskHeight: regl.prop('maskHeight')
357357
},

src/traces/parcoords/shaders/vertex.glsl

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,
1111
loA, hiA, loB, hiB, loC, hiC, loD, hiD;
1212

1313
uniform vec2 resolution, viewBoxPos, viewBoxSize;
14-
uniform sampler2D mask, palette;
1514
uniform float maskHeight;
1615
uniform float drwLayer; // 0: context, 1: focus, 2: pick
1716
uniform vec4 contextColor;
17+
uniform sampler2D maskTexture, palette;
1818

1919
bool isPick = (drwLayer > 1.5);
2020
bool isContext = (drwLayer < 0.5);
@@ -76,7 +76,7 @@ bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {
7676
for(int j = 0; j < 4; ++j) {
7777
for(int k = 0; k < 4; ++k) {
7878
if(0 == iMod(
79-
int(255.0 * texture2D(mask,
79+
int(255.0 * texture2D(maskTexture,
8080
vec2(
8181
(float(i * 2 + j / 2) + 0.5) / 8.0,
8282
(pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight

0 commit comments

Comments
 (0)