made wireframe shader more robust