Fix NaNs breaking shadows.