Improve diffraction code (60 fps!)