Fixed bug when supplying NULL palettes to the shader.