diff --git a/assets/shaders/OutlineFragment.glsl b/assets/shaders/OutlineFragment.glsl index 38e3200..1dee55d 100644 --- a/assets/shaders/OutlineFragment.glsl +++ b/assets/shaders/OutlineFragment.glsl @@ -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++; } } }