Implement cube mapping.

Closes #307