Skip to content

Commit

Permalink
Remove useless multiplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
Swordfish90 committed Jul 29, 2024
1 parent a65ad87 commit 3949e73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/shaders/cut2/cut2_pass_0.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ lowp float softEdgeWeight(lowp float a, lowp float b, lowp float c, lowp float d
lowp float result = 0.0;
result += clamp(abs((2.0 * b - (a + c))) / abs(a - c), 0.0, 1.0);
result -= clamp(abs((2.0 * c - (d + b))) / abs(b - d), 0.0, 1.0);
return step(EDGE_MIN_VALUE, abs(b - c)) * clamp(result, -1.0, 1.0);
return clamp(result, -1.0, 1.0);
}

lowp float hardEdgeWeight(lowp vec2 gn, lowp vec2 gs) {
Expand Down
2 changes: 1 addition & 1 deletion src/shaders/cut3/cut3_pass_0.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ lowp float softEdgeWeight(lowp float a, lowp float b, lowp float c, lowp float d
lowp float result = 0.0;
result += clamp(abs((2.0 * b - (a + c))) / abs(a - c), 0.0, 1.0);
result -= clamp(abs((2.0 * c - (d + b))) / abs(b - d), 0.0, 1.0);
return step(EDGE_MIN_VALUE, abs(b - c)) * clamp(result, -1.0, 1.0);
return clamp(result, -1.0, 1.0);
}

void main() {
Expand Down

0 comments on commit 3949e73

Please sign in to comment.