Angle-domain common-image gathers (ADCIGs) play an important role for migration quality control and velocity analysis. ADCIGs can be constructed by using optical flow to compute propagation directions of seismic waves, which originate and propagate from source and receiver locations. When upgoing and downgoing waves interfere with each other, the optical flow method can generate incorrect propagation angles and produce problematic ADCIGs. To overcome this problem, separating upgoing and downgoing waves is required. The challenge is that separating the wavefields often requires huge memory to store all the snapshots of the propagating 3D wavefields. We have developed a computationally efficient algorithm to separate the wavefields into upgoing and downgoing waves by storing only one additional snapshot of the wavefields at a single time step. Applying the optical flow method on the separated downgoing wavefield produces improved ADCIGs; the improvements are well-verified by tests on synthetic and field data sets.