Skip to content

Commit

Permalink
Swap h and v components in sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
ole committed Feb 17, 2015
1 parent e35454d commit 714b397
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 2015-02-10-gpu-accelerated-machine-vision.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ void main()
float bottomIntensity = texture2D(inputImageTexture, bottomTextureCoordinate).r;
float topIntensity = texture2D(inputImageTexture, topTextureCoordinate).r;
float h = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity;
float v = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity;
float h = -bottomLeftIntensity - 2.0 * leftIntensity - topLeftIntensity + bottomRightIntensity + 2.0 * rightIntensity + topRightIntensity;
float v = -topLeftIntensity - 2.0 * topIntensity - topRightIntensity + bottomLeftIntensity + 2.0 * bottomIntensity + bottomRightIntensity;
float mag = length(vec2(h, v));
gl_FragColor = vec4(vec3(mag), 1.0);
Expand Down

0 comments on commit 714b397

Please sign in to comment.