Made textures readable for raycasting