Added light mask
merge with thaer's code