Board Thread:Episode Discussions/@comment-25787298-20160519120227/@comment-1512913-20160523003509

The way I see it, Hagoromo got mostly a share of Kaguya's power post-chakra fruit consumption (Sharingan), while Hamura inherited mostly Kaguya's pre-chakra fruit power (Byakugan) and by unknown means, they evolved Sharingan into Rinnegan and Byakugan into Tenseigan eventually.