fix calculation of distance from plane to origin

fix calculation of distance from plane to origin
Merge pull request #1593 from sxop/next

fix calculation of distance from plane to origin
Support grayscale PNGs
Merge pull request #1594 from glassechidna/support-grayscale

Support grayscale PNGs
Merge branch 'next' of https://github.com/blackberry/GamePlay