@magduf has the correct answer. The Sun optical mouse used dual photodiodes and had two grids in the mousepad. One blue, one red. The filters on the photo diodes allowed one to see both x & y grid lines and the other to see only the red stripes. Then based on their signalling you could extract a motion vector. The upside was no ball to pick up dirt and clog sensors, the downside was you needed the mousepad with the lines etched on it. You would also get less reliable results if the mouse pad was not in the expected orientation with the mouse.
Still I really enjoyed that mouse. It had excellent tactile feedback on the buttons as well.
It was a single IR LED and four sensors as I recall. They had some Sun workstations (used mostly for circuit simulations) in mid-90's at the university where my mother used to work. I was in the middle school at the time and very interested in anything electronics. Still am. Blue LEDs went mainstream few years later.
Still I really enjoyed that mouse. It had excellent tactile feedback on the buttons as well.