Modified filter to use floats for calculations and only convert to half once everything is done