I am employed as a software engineer in a company that grants shares and a sign on bonus. Do mortgage lenders in the UK take into consideration stock grants and annual sign on bonus (sign on bonus but given over 2 years for example) when lending? If yes, are they high street lenders or private brokers?
In short, no.
Anything that sits within volatile income (of which sign on bonuses, golden parachutes, stock grants, annual bonuses etc etc all most definitely are), lenders tend to discount because what they care about is your ability to make stable payments for long periods - none of which is impacted much by methods of bonus like this (if anything - it can often be a sign of instability, showing people jumping jobs often, working for risky, start up style companies with a high risk of failure or other higher risk employment actions etc).
If you get a large number of these types of payments you're generally better off aggressively saving the ones you get now and add to the initial deposit (to reduce your interest and payments later), and to be mindful of mortgage products that allow early payments so when you get them later you can aggressively pay down your mortgage.
If you want to have your cake and eat it and factor in all these volatile payments as the same as income, then sadly lenders have far too long a track record of these types of people blowing up and typically won't go near it.