OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
light cosinelight_rts%emit{1}
param	float	intensity	1		%read{5,5} %write{2147483647,-1}
param	color	lightcolor	1 1 1		%read{5,5} %write{2147483647,-1}
param	float	falloff	2		%read{6,6} %write{2147483647,-1}
param	point	from	0 0 0		%read{2,16} %write{0,0} %derivs %initexpr
param	vector	dir	0 -1 0		%read{2,12} %write{2147483647,-1}
global	point	Ps	%read{16,16} %write{2147483647,-1} %derivs
global	vector	L	%read{4,11} %write{2147483647,-1}
global	color	Cl	%read{15,17} %write{8,17}
local	float	___291_dist	%read{7,7} %write{4,4}
const	string	$const1	"shader"		%read{0,0} %write{2147483647,-1}
const	float	$const3	0		%read{0,0} %write{2147483647,-1}
temp	int	$tmp1	%read{3,3} %write{2,2}
const	float	$const4	3.1415927		%read{1,1} %write{2147483647,-1}
temp	float	$tmp2	%read{2,2} %write{1,1}
const	float	$const6	2		%read{1,1} %write{2147483647,-1}
temp	color	$tmp3	%read{8,8} %write{5,5}
temp	float	$tmp4	%read{8,8} %write{7,7}
temp	float	$tmp5	%read{7,7} %write{6,6}
temp	float	$tmp6	%read{10,10} %write{9,9}
temp	float	$tmp7	%read{14,14} %write{10,10}
temp	float	$tmp8	%read{13,13} %write{11,11}
temp	float	$tmp9	%read{13,13} %write{12,12}
temp	float	$tmp10	%read{14,14} %write{13,13}
temp	float	$tmp11	%read{15,15} %write{14,14}
temp	color	$tmp12	%read{17,17} %write{16,16}
code from
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:15
#     vector dir = vector(0, -1, 0)
	point		from $const1 $const3 $const3 $const3 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl"} %line{15} %argrw{"wrrrr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:19
#         float dist = length(L);
	div		$tmp2 $const4 $const6 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl"} %line{19} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:24
# }
	emit		$tmp1 from dir $tmp2 	%line{24} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:19
#         float dist = length(L);
	if		$tmp1 18 18 	%line{19} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:20
# 	Cl = intensity * lightcolor * pow(dist, -falloff);   /* fall-off */
	length		___291_dist L 	%line{20} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:21
#         Cl *= -dot(L,dir) / (length(L) * length(dir));   /* cosine term */
	mul		$tmp3 intensity lightcolor 	%line{21} %argrw{"wrr"}
	neg		$tmp5 falloff 	%argrw{"wr"}
	pow		$tmp4 ___291_dist $tmp5 	%argrw{"wrr"}
	mul		Cl $tmp3 $tmp4 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:22
# 	Cl *= transmission(Ps, from);   /* ray traced shadow */
	dot		$tmp6 L dir 	%line{22} %argrw{"wrr"}
	neg		$tmp7 $tmp6 	%argrw{"wr"}
	length		$tmp8 L 	%argrw{"wr"}
	length		$tmp9 dir 	%argrw{"wr"}
	mul		$tmp10 $tmp8 $tmp9 	%argrw{"wrr"}
	div		$tmp11 $tmp7 $tmp10 	%argrw{"wrr"}
	mul		Cl Cl $tmp11 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\cosinelight_rts.osl:23
#     }
	transmission	$tmp12 Ps from 	%line{23} %argrw{"wrr"} %argderivs{1,2}
	mul		Cl Cl $tmp12 	%argrw{"wrr"}
	end
