Skip to content

Commit

Permalink
Fix glsl-tk mangling the sboel pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Feb 29, 2024
1 parent a150217 commit 87bfb38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/sobel.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void main(){
vec4 topRight = texture(previous_pass, vec2(uv.x + sobelSizeH, uv.y + sobelSizeV));
vec4 bottomLeft = texture(previous_pass, vec2(uv.x - sobelSizeH, uv.y - sobelSizeV));
vec4 bottomRight = texture(previous_pass, vec2(uv.x + sobelSizeH, uv.y - sobelSizeV));
vec4 sx = -topLeft - 2 * left - bottomLeft + topRight + 2 * right + bottomRight;
vec4 sy = -topLeft - 2 * top - topRight + bottomLeft + 2 * bottom + bottomRight;
vec4 sx = -topLeft + -2 * left + -bottomLeft + topRight + 2 * right + bottomRight;
vec4 sy = -topLeft + -2 * top + -topRight + bottomLeft + 2 * bottom + bottomRight;
color = sqrt(sx * sx + sy * sy);
}

0 comments on commit 87bfb38

Please sign in to comment.