Fixed lighting with better algorithm