Added support for monochrome 3D textures and fixed scalar multiplication bug