bugfix, only use the texture in layer 0 to apply material