Fix SW lighting 
Merge pull request #302 from raven02/lightsw-fix

Fix SW lighting