Skip to content

Commit bf9a0ea

Browse files
committed
removed obsolete box uniform
Signed-off-by: Tim Deubler <[email protected]>
1 parent 9a6ee17 commit bf9a0ea

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

packages/display/src/displays/webgl/buffer/createBuffer.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,9 @@ const createBuffer = (
311311
geoBuffer.pass = PASS.ALPHA;
312312
geoBuffer.blend = true;
313313
}
314-
315-
geoBuffer.addUniform('u_size', [shared.width, toPixel, shared.height, toPixel]);
314+
if (type == 'Rect') {
315+
geoBuffer.addUniform('u_size', [shared.width, toPixel, shared.height, toPixel]);
316+
}
316317
geoBuffer.addUniform('u_rotation', shared.rotation * TO_RAD);
317318
}
318319

@@ -429,10 +430,8 @@ const createBuffer = (
429430
geoBuffer.zIndex = zIndex;
430431
geoBuffer.zLayer = typeof zLayer == 'number' ? Math.ceil(zLayer) : null;
431432

432-
if (geoBuffer.clip == UNDEF) {
433-
// scissoring is slow. we can skip if source data is already clipped on tile edges.
434-
geoBuffer.clip = !tile.clipped || layer.getMargin() > 0 || hasAlphaColor;
435-
}
433+
// scissoring is slow. we can skip if source data is already clipped on tile edges.
434+
geoBuffer.clip ??= !tile.clipped || layer.getMargin() > 0 || hasAlphaColor;
436435
}
437436
}
438437
}

packages/display/src/displays/webgl/glsl/box_vertex.glsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ attribute highp vec3 a_point;
88

99
uniform float u_scale;
1010

11-
uniform vec4 u_size;
1211
uniform mat4 u_matrix;
1312
uniform mat4 u_inverseMatrix;
1413
uniform float u_strokeWidth;

0 commit comments

Comments
 (0)