OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
light shadowspot%emit{1}
param	float	intensity	1		%read{31,31} %write{2147483647,-1}
param	color	lightcolor	1 1 1		%read{32,32} %write{2147483647,-1}
param	point	from	0 0 0		%read{8,29} %write{0,0} %derivs %initexpr
param	point	to	0 0 1		%read{8,9} %write{1,1} %initexpr
param	float	coneangle	0		%read{12,15} %write{4,4} %initexpr
param	float	conedeltaangle	0		%read{13,13} %write{7,7} %initexpr
param	float	beamdistribution	2		%read{21,21} %write{2147483647,-1}
param	string	shadowname	""		%read{26,29} %write{2147483647,-1}
param	float	samples	1		%read{28,28} %write{2147483647,-1}
param	float	width	0		%read{29,29} %write{2147483647,-1}
global	point	Ps	%read{29,29} %write{2147483647,-1} %derivs
global	vector	L	%read{17,22} %write{2147483647,-1}
global	color	Cl	%read{2147483647,-1} %write{32,32}
local	vector	A	%read{15,17} %write{11,11}
local	float	cosoutside	%read{24,24} %write{12,12}
local	float	cosinside	%read{24,24} %write{14,14}
local	float	attenuation	%read{25,31} %write{23,30}
local	float	cosangle	%read{21,24} %write{20,20}
const	string	$const1	"shader"		%read{0,1} %write{2147483647,-1}
const	float	$const3	0		%read{0,1} %write{2147483647,-1}
const	float	$const5	1		%read{1,1} %write{2147483647,-1}
const	float	$const7	30		%read{4,4} %write{2147483647,-1}
const	string	$const8	"radians"		%read{2,5} %write{2147483647,-1}
const	float	$const9	3.1415927		%read{3,6} %write{2147483647,-1}
const	float	$const10	180		%read{3,6} %write{2147483647,-1}
temp	float	$tmp1	%read{4,4} %write{3,3}
const	float	$const12	5		%read{7,7} %write{2147483647,-1}
temp	float	$tmp2	%read{7,7} %write{6,6}
temp	vector	$tmp3	%read{11,11} %write{8,8}
temp	float	$tmp4	%read{11,11} %write{10,10}
temp	vector	$tmp5	%read{10,10} %write{9,9}
temp	float	$tmp6	%read{14,14} %write{13,13}
temp	int	$tmp7	%read{16,16} %write{15,15}
temp	float	$tmp8	%read{18,18} %write{17,17}
temp	float	$tmp9	%read{20,20} %write{18,18}
temp	float	$tmp10	%read{20,20} %write{19,19}
temp	float	$tmp11	%read{23,23} %write{21,21}
temp	float	$tmp12	%read{23,23} %write{22,22}
temp	float	$tmp13	%read{25,25} %write{24,24}
const	string	$const13	""		%read{26,26} %write{2147483647,-1}
temp	int	$tmp14	%read{27,27} %write{26,26}
temp	float	$tmp15	%read{30,30} %write{29,29}
const	string	$const14	"traceset"		%read{29,29} %write{2147483647,-1}
const	string	$const15	"mindist"		%read{29,29} %write{2147483647,-1}
const	float	$const16	-1		%read{29,29} %write{2147483647,-1}
const	string	$const17	"samples"		%read{29,29} %write{2147483647,-1}
temp	int	$tmp16	%read{29,29} %write{28,28}
const	string	$const18	"blur"		%read{29,29} %write{2147483647,-1}
temp	float	$tmp17	%read{32,32} %write{31,31}
code from
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:6
# 	point   to		= point ("shader",0,0,1),
	point		from $const1 $const3 $const3 $const3 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl"} %line{6} %argrw{"wrrrr"}
code to
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:7
# 	float	coneangle	= radians(30),
	point		to $const1 $const3 $const3 $const5 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl"} %line{7} %argrw{"wrrrr"}
code coneangle
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:8
# 	float   conedeltaangle	= radians(5),
	functioncall	$const8 5 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl"} %line{8} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:88
# vector degrees (vector x) { return x*(180.0/M_PI); }
	div		$tmp1 $const9 $const10 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{88} %argrw{"wrr"}
	mul		coneangle $const7 $tmp1 	%argrw{"wrr"}
code conedeltaangle
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:9
# 	float   beamdistribution= 2,
	functioncall	$const8 8 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl"} %line{9} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:88
# normal degrees (normal x) { return x*(180.0/M_PI); }
	div		$tmp2 $const9 $const10 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{88} %argrw{"wrr"}
	mul		conedeltaangle $const12 $tmp2 	%argrw{"wrr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:16
# 	float	cosoutside= cos(coneangle),
	sub		$tmp3 to from 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl"} %line{16} %argrw{"wrr"}
	sub		$tmp5 to from 	%argrw{"wrr"}
	length		$tmp4 $tmp5 	%argrw{"wr"}
	div		A $tmp3 $tmp4 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:17
# 			cosinside = cos(coneangle-conedeltaangle);
	cos		cosoutside coneangle 	%line{17} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:18
# 	float	attenuation, 	/* falloff from center of illumination cone */
	sub		$tmp6 coneangle conedeltaangle 	%line{18} %argrw{"wrr"}
	cos		cosinside $tmp6 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:29
# }
	emit		$tmp7 from A coneangle 	%line{29} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:22
# 		cosangle = - dot(L,A) / length(L);	/* A is already normalized */
	if		$tmp7 33 33 	%line{22} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:23
# 		attenuation = pow(cosangle, beamdistribution) / dot(L,L);
	dot		$tmp8 L A 	%line{23} %argrw{"wrr"}
	neg		$tmp9 $tmp8 	%argrw{"wr"}
	length		$tmp10 L 	%argrw{"wr"}
	div		cosangle $tmp9 $tmp10 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:24
# 		attenuation *= smoothstep( cosoutside, cosinside, cosangle );
	pow		$tmp11 cosangle beamdistribution 	%line{24} %argrw{"wrr"}
	dot		$tmp12 L L 	%argrw{"wrr"}
	div		attenuation $tmp11 $tmp12 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:25
# 		if( shadowname != "" )
	smoothstep	$tmp13 cosoutside cosinside cosangle 	%line{25} %argrw{"wrrr"}
	mul		attenuation attenuation $tmp13 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:26
# 		    attenuation *= transmission (Ps, from, "traceset", shadowname, "mindist", -1.0, "samples", (int)samples, "blur", width);
	neq		$tmp14 shadowname $const13 	%line{26} %argrw{"wrr"}
	if		$tmp14 31 31 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:27
# 		Cl = attenuation * intensity * lightcolor;
	assign		$tmp16 samples 	%line{27} %argrw{"wr"}
	transmission	$tmp15 Ps from $const14 shadowname $const15 $const16 $const17 $tmp16 $const18 width 	%argrw{"wrrrrrrrrrr"} %argderivs{1,2}
	mul		attenuation attenuation $tmp15 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shadowspot.osl:28
# 	}
	mul		$tmp17 attenuation intensity 	%line{28} %argrw{"wrr"}
	mul		Cl $tmp17 lightcolor 	%argrw{"wrr"}
	end
