try {
final float[] data = heightMaps.get(heightMaps.size() - 1);
final int size = heightMapSizes.get(heightMapSizes.size() - 1);
final Image normalImage = NormalMapUtil.constructNormalMap(data, size, scale.getY() / heightMax,
scale.getX(), scale.getZ());
return new ImageTextureSource(tileSize, normalImage, heightMapSizes);
} catch (final Exception e) {
e.printStackTrace();
}
}
return null;