I am currently implementing a uniform sampling of a hemisphere.
Since my hemisphere is oriented around a specific vector N, whatever the sampling algorithm used (uniform/cosine weighted/stratified/...) I must either: 1) sample on the whole sphere and discard any sample outside my N-aligned hemisphere (rejection) or b) sample on the Y+ aligned hemisphere and bring the sampled vector to my N-aligned hemisphere by matrix multiplication.
This at least is all I have found on any resource I could find about the topic.
My question is pretty trivial: why can't I just sample on the Y+ hemisphere and flip the sampled vector if it doesn't lie inside my N-algned hemisphere?
I understand I am surely missing something obvious here because any book outlines only the two solutions above, but still, intuitively, I can't understand why flipping a sampled vector is "wrong", since it will then lie inside my hemisphere. Moreover, I obtain undistinguishable results by following either solutions or by flipping.
You can certainly sample from the hemisphere with positive $y$ (or alternatively from the entire sphere) and invert the vector if it's not in your hemisphere.
Of course this works only because you're sampling uniformly. Since you also mention other distributions, I could imagine that the reason the texts you metnion don't do it this way is that they want a method that's more generally applicable.