added shadow attenuation