added mac specific
fixed light attenuation