Skip to content

Commit a268ac0

Browse files
committed
minimized if statements
1 parent 44dff05 commit a268ac0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

shaders/pick.glsl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ vec2 splitFloat(float v) {
1919
}
2020

2121
void main() {
22-
if (kill > 0.0) discard;
23-
24-
if (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)) discard;
22+
if ((kill > 0.0) ||
23+
(outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;
2524

2625
vec2 ux = splitFloat(planeCoordinate.x / shape.x);
2726
vec2 uy = splitFloat(planeCoordinate.y / shape.y);

0 commit comments

Comments
 (0)