rough calculations for direct lighting
fix whitespace