Skip to content

Commit

Permalink
fix(shader): incorrect iteration index again
Browse files Browse the repository at this point in the history
  • Loading branch information
isHarryh committed Nov 24, 2024
1 parent dd231c9 commit 0d2e6b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/shaders/OutlineFragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ vec4[24] getSimpleNeighbors(vec2 unitLength) {
int i = 0;
for (int y = -2; y <= 2; y++) {
for (int x = -2; x <= 2; x++) {
if (y != 0 && x != 0) {
if (!(y == 0 && x == 0)) {
vec2 offset = vec2(x, y) * unitLength;
neighbors[i] = texture2D(u_texture, v_texCoords + offset);
i++;
}
}
}
Expand Down

0 comments on commit 0d2e6b6

Please sign in to comment.