Skip to content

Commit

Permalink
add sobel
Browse files Browse the repository at this point in the history
  • Loading branch information
andev009 committed Sep 15, 2018
1 parent 4b22313 commit 21d3cee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/res/raw/sobel_fragment_shader.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ void main()
float leftBottoml = dot(leftBottomTextureColor.rgb, W);
float rightBottoml = dot(rightBottomTextureColor.rgb, W);

//水平方向
float hColor = leftl * -2.0 + rightl * 2.0 +
topl * 0 + bottoml * 0 +
leftTopl * -1.0 + rightTopl * 1.0 +
leftBottoml * -1.0 +rightBottoml * 1.0;

//垂直方向
float vColor = leftl * 0.0 + rightl * 0.0 +
topl * -2.0 + bottoml * 2.0 +
leftTopl * -1.0 + rightTopl * -1.0 +
Expand Down

0 comments on commit 21d3cee

Please sign in to comment.