implementations of photo-consistency