Crusader Kings Royal Court expansion, with patch 1.5, brings a host of changes and updates to modding the game. One of those is implementing a rule to the base game that allows for same-sex marriages.
Coming with 1.5 is support for same-sex marriage, not only just in mods either but as a new game rule alongside the Same-Sex relations game rule so you can use it in un-modded games too. Paradox have updated a variety of AI logic and interactions and content to take that into account when playing.
Mods are of course able to implement this into their different worlds without it having to be a game rule, it can be based on different cultures or anything in the game world at all.
This is something that the developers are very happy to be able to put into the game and have support in the game rules for unmodded games too, it is something that a lot of the team and community wanted and they are glad it is finally going to be shipped in 1.5.
It is likely that the rule will be based on quite a lot of factors though. The marriage of any ruler had to be sanctified by the Pope, in the timeframe of CK III, and same-sex marriages are not something that would be acceptable. That means that it's likely going to take a lot of power for the ruler to be able to go disregard societal and religious norms and have a same-sex partner. Players can always expect consequences for it, though, no matter their ruler's power.