light cosinelight_tweakedshadow(
	float intensity = 1;
	color lightcolor = 1; 
	float falloff = 2; // default: inverse square fall-off
	point lightfrom = point "shader" (0,0,0); // light position
	point shadowfrom = point "shader" (0,0,0); // light position for shadow
	vector dir = (0, -1, 0);
)
{
	illuminate(lightfrom, dir, PI/2) {
		float dist = length(L);
		Cl = intensity * lightcolor * pow(dist, -falloff); // fall-off
		Cl *= (L.dir) / (length(L) * length(dir)); // cosine term
		Cl *= transmission(Ps, shadowfrom); // ray traced shadow
	}
}
