implemented custom texture filtering