Skip to content

Commit

Permalink
interpolation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hageldave committed May 22, 2017
1 parent dd73055 commit 7f3ca0e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ public int interpolateARGB(final float xNormalized, final float yNormalized){

private static int interpolateColors(final int c00, final int c01, final int c10, final int c11, final float mx, final float my){
return Pixel.argb_fast/*_bounded*/(
blend( blend(Pixel.a(c00), Pixel.a(c10), mx), blend(Pixel.a(c10), Pixel.a(c01), mx), my),
blend( blend(Pixel.r(c00), Pixel.r(c10), mx), blend(Pixel.r(c10), Pixel.r(c01), mx), my),
blend( blend(Pixel.g(c00), Pixel.g(c10), mx), blend(Pixel.g(c10), Pixel.g(c01), mx), my),
blend( blend(Pixel.b(c00), Pixel.b(c10), mx), blend(Pixel.b(c10), Pixel.b(c01), mx), my) );
blend( blend(Pixel.a(c00), Pixel.a(c10), mx), blend(Pixel.a(c01), Pixel.a(c11), mx), my),
blend( blend(Pixel.r(c00), Pixel.r(c10), mx), blend(Pixel.r(c01), Pixel.r(c11), mx), my),
blend( blend(Pixel.g(c00), Pixel.g(c10), mx), blend(Pixel.g(c01), Pixel.g(c11), mx), my),
blend( blend(Pixel.b(c00), Pixel.b(c10), mx), blend(Pixel.b(c01), Pixel.b(c11), mx), my) );
}

private static int blend(final int channel1, final int channel2, final float m){
Expand Down

0 comments on commit 7f3ca0e

Please sign in to comment.