Skip to content

Use maskTexture name for parcoords regl setup #5904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/traces/parcoords/lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ module.exports = function(canvasGL, d) {
hiD: regl.prop('hiD'),
palette: paletteTexture,
contextColor: regl.prop('contextColor'),
mask: regl.prop('maskTexture'),
maskTexture: regl.prop('maskTexture'),
drwLayer: regl.prop('drwLayer'),
maskHeight: regl.prop('maskHeight')
},
Expand Down
4 changes: 2 additions & 2 deletions src/traces/parcoords/shaders/vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,
loA, hiA, loB, hiB, loC, hiC, loD, hiD;

uniform vec2 resolution, viewBoxPos, viewBoxSize;
uniform sampler2D mask, palette;
uniform float maskHeight;
uniform float drwLayer; // 0: context, 1: focus, 2: pick
uniform vec4 contextColor;
uniform sampler2D maskTexture, palette;

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