Fixed a bug in average textures introduced during colour refactoring.
Merge branch 'hotfix/average_texture'