OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface spd
param	float	Ka	1		%read{2147483647,-1} %write{2147483647,-1}
param	float	Kd	0.5		%read{67,67} %write{2147483647,-1}
param	float	Ks	0.5		%read{71,71} %write{2147483647,-1}
param	float	roughness	0.1		%read{88,88} %write{2147483647,-1}
param	color	specularcolor	1 1 1		%read{71,71} %write{2147483647,-1}
param	float	reflected	0		%read{12,20} %write{2147483647,-1}
param	float	transmitted	0		%read{21,49} %write{2147483647,-1}
param	float	index	1		%read{26,27} %write{2147483647,-1} %derivs
global	point	P	%read{19,77} %write{2147483647,-1} %derivs
global	vector	I	%read{3,23} %write{2147483647,-1} %derivs
global	normal	N	%read{0,23} %write{2147483647,-1} %derivs
global	normal	Ng	%read{3,3} %write{2147483647,-1}
global	color	C	%read{70,70} %write{96,96}
global	color	opacity	%read{96,96} %write{2147483647,-1}
global	vector	L	%read{60,82} %write{2147483647,-1}
global	color	Cl	%read{58,81} %write{2147483647,-1}
local	float	___216_IdotN	%read{31,39} %write{29,29} %derivs
local	float	___216_k	%read{35,40} %write{34,34} %derivs
local	color	___278_C	%read{52,66} %write{51,65}
local	float	___279___nondiffuse	%read{52,65} %write{52,65}
local	vector	___280_H	%read{75,92} %write{75,92}
local	color	___281_C	%read{75,93} %write{74,92}
local	float	___282___nonspecular	%read{75,92} %write{75,92}
local	normal	Nn	%read{15,86} %write{6,7} %derivs
local	normal	In	%read{29,72} %write{9,9} %derivs
local	color	r	%read{68,68} %write{10,20}
local	color	tr	%read{69,69} %write{11,49}
local	vector	___292_T	%read{45,48} %write{37,43} %derivs
temp	normal	$tmp1	%read{6,7} %write{0,0} %derivs
const	string	$const1	"faceforward"		%read{1,2} %write{2147483647,-1}
temp	float	$tmp2	%read{4,4} %write{3,3}
const	int	$const2	0		%read{4,78} %write{2147483647,-1}
temp	int	$tmp3	%read{5,5} %write{4,4}
const	float	$const3	0.001		%read{12,21} %write{2147483647,-1}
temp	int	$tmp4	%read{13,13} %write{12,12}
temp	color	$tmp5	%read{20,20} %write{19,19}
temp	vector	$tmp6	%read{19,19} %write{18,18} %derivs
const	string	$const4	"reflect"		%read{14,14} %write{2147483647,-1}
temp	float	$tmp7	%read{16,16} %write{15,15} %derivs
temp	float	$tmp8	%read{17,17} %write{16,16} %derivs
const	float	$const6	2		%read{16,16} %write{2147483647,-1}
temp	vector	$tmp9	%read{18,18} %write{17,17} %derivs
temp	int	$tmp10	%read{22,22} %write{21,21}
temp	float	$tmp11	%read{30,39} %write{26,27} %derivs
temp	float	$tmp12	%read{24,24} %write{23,23}
temp	int	$tmp13	%read{25,25} %write{24,24}
const	float	$const8	1		%read{27,80} %write{2147483647,-1}
const	string	$const9	"refract"		%read{28,28} %write{2147483647,-1}
temp	float	$tmp14	%read{33,33} %write{30,30} %derivs
temp	float	$tmp15	%read{32,32} %write{31,31} %derivs
temp	float	$tmp16	%read{33,33} %write{32,32} %derivs
temp	float	$tmp17	%read{34,34} %write{33,33} %derivs
temp	int	$tmp18	%read{36,36} %write{35,35}
const	vector	$const10	0 0 0		%read{37,37} %write{2147483647,-1}
temp	vector	$tmp19	%read{43,43} %write{38,38} %derivs
temp	float	$tmp20	%read{41,41} %write{39,39} %derivs
temp	float	$tmp21	%read{41,41} %write{40,40} %derivs
temp	float	$tmp22	%read{42,42} %write{41,41} %derivs
temp	vector	$tmp23	%read{43,43} %write{42,42} %derivs
temp	float	$tmp24	%read{46,46} %write{45,45}
const	float	$const11	0		%read{46,87} %write{2147483647,-1}
temp	int	$tmp25	%read{47,47} %write{46,46}
temp	color	$tmp26	%read{49,49} %write{48,48}
temp	color	$tmp27	%read{67,67} %write{66,66}
const	string	$const12	"diffuse"		%read{50,50} %write{2147483647,-1}
const	float	$const13	1.5707964		%read{53,77} %write{2147483647,-1}
temp	int	$tmp28	%read{52,65} %write{52,65}
temp	int	$tmp29	%read{2147483647,-1} %write{56,56}
const	string	$const14	"light"		%read{56,79} %write{2147483647,-1}
const	string	$const15	"__nondiffuse"		%read{56,56} %write{2147483647,-1}
temp	float	$tmp30	%read{58,58} %write{57,57}
temp	color	$tmp31	%read{64,64} %write{58,58}
temp	color	$tmp32	%read{64,64} %write{63,63}
temp	color	$tmp33	%read{63,63} %write{59,59}
temp	float	$tmp34	%read{62,62} %write{61,61}
temp	vector	$tmp35	%read{61,61} %write{60,60}
temp	color	$tmp36	%read{63,63} %write{62,62}
temp	color	$tmp37	%read{52,65} %write{52,65}
temp	color	$tmp38	%read{68,68} %write{67,67}
temp	color	$tmp39	%read{69,69} %write{68,68}
temp	color	$tmp40	%read{70,70} %write{69,69}
temp	color	$tmp41	%read{75,95} %write{70,92}
temp	color	$tmp42	%read{75,94} %write{71,92}
temp	color	$tmp43	%read{94,94} %write{93,93}
temp	normal	$tmp44	%read{75,92} %write{72,92}
const	string	$const16	"specular"		%read{73,73} %write{2147483647,-1}
temp	int	$tmp45	%read{75,92} %write{75,92}
temp	int	$tmp46	%read{2147483647,-1} %write{79,79}
const	string	$const17	"__nonspecular"		%read{79,79} %write{2147483647,-1}
temp	float	$tmp47	%read{81,81} %write{80,80}
temp	color	$tmp48	%read{91,91} %write{81,81}
temp	color	$tmp49	%read{91,91} %write{90,90}
temp	vector	$tmp50	%read{84,84} %write{82,82}
const	string	$const18	"specularbrdf"		%read{83,83} %write{2147483647,-1}
temp	vector	$tmp51	%read{85,85} %write{84,84}
temp	float	$tmp52	%read{90,90} %write{89,89}
temp	float	$tmp53	%read{89,89} %write{87,87}
temp	float	$tmp54	%read{87,87} %write{86,86}
temp	float	$tmp55	%read{89,89} %write{88,88}
const	float	$const20	8		%read{88,88} %write{2147483647,-1}
temp	color	$tmp56	%read{75,92} %write{75,92}
temp	color	$tmp57	%read{95,95} %write{94,94}
temp	color	$tmp58	%read{96,96} %write{95,95}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:12
#   normal In = normalize( I );
	normalize	$tmp1 N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spd.osl"} %line{12} %argrw{"wr"}
	functioncall	$const1 9 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
#         return distance(q, a);
	functioncall	$const1 9 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{196} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:192
#     return (dot(I,Nref) > 0) ? -N : N;
	dot		$tmp2 I Ng 	%line{192} %argrw{"wrr"}
	gt		$tmp3 $tmp2 $const2 	%argrw{"wrr"}
	if		$tmp3 7 8 	%argrw{"r"}
	neg		Nn $tmp1 	%argrw{"wr"}
	assign		Nn $tmp1 	%argrw{"wr"}
	return
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:13
#   color r = 0, tr = 0;
	normalize	In I 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spd.osl"} %line{13} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:14
#      
	assign		r $const2 	%line{14} %argrw{"wr"}
	assign		tr $const2 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:16
#    r = reflected * trace (P, reflect(I, Nn));
	gt		$tmp4 reflected $const3 	%line{16} %argrw{"wrr"}
	if		$tmp4 21 21 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:17
#   }
	functioncall	$const4 19 	%line{17} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:198
#     vector d = b - a;
	dot		$tmp7 Nn I 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{198} %argrw{"wrr"}
	mul		$tmp8 $const6 $tmp7 	%argrw{"wrr"}
	mul		$tmp9 $tmp8 Nn 	%argrw{"wrr"}
	sub		$tmp6 I $tmp9 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:17
#   }
	trace		$tmp5 P $tmp6 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spd.osl"} %line{17} %argrw{"wrr"} %argderivs{1,2}
	mul		r reflected $tmp5 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:19
#    vector T = refract(In, Nn, dot(N,I)>0 ? index : 1/index ); 
	gt		$tmp10 transmitted $const3 	%line{19} %argrw{"wrr"}
	if		$tmp10 50 50 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:20
#    if ( length( T ) != 0.0 )
	dot		$tmp12 N I 	%line{20} %argrw{"wrr"}
	gt		$tmp13 $tmp12 $const2 	%argrw{"wrr"}
	if		$tmp13 27 28 	%argrw{"r"}
	assign		$tmp11 index 	%argrw{"wr"}
	div		$tmp11 $const8 index 	%argrw{"wrr"}
	functioncall	$const9 45 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:200
# {
	dot		___216_IdotN In Nn 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{200} %argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:201
#     vector d = b - a;
	mul		$tmp14 $tmp11 $tmp11 	%line{201} %argrw{"wrr"}
	mul		$tmp15 ___216_IdotN ___216_IdotN 	%argrw{"wrr"}
	sub		$tmp16 $const8 $tmp15 	%argrw{"wrr"}
	mul		$tmp17 $tmp14 $tmp16 	%argrw{"wrr"}
	sub		___216_k $const8 $tmp17 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:202
#     float dd = dot(d, d);
	lt		$tmp18 ___216_k $const2 	%line{202} %argrw{"wrr"}
	if		$tmp18 38 44 	%argrw{"r"}
	assign		___292_T $const10 	%argrw{"wr"}
	mul		$tmp19 $tmp11 In 	%argrw{"wrr"}
	mul		$tmp20 $tmp11 ___216_IdotN 	%argrw{"wrr"}
	sqrt		$tmp21 ___216_k 	%argrw{"wr"}
	add		$tmp22 $tmp20 $tmp21 	%argrw{"wrr"}
	mul		$tmp23 Nn $tmp22 	%argrw{"wrr"}
	sub		___292_T $tmp19 $tmp23 	%argrw{"wrr"}
	return
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:21
#    tr = transmitted * trace (P, T);
	length		$tmp24 ___292_T 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spd.osl"} %line{21} %argrw{"wr"}
	neq		$tmp25 $tmp24 $const11 	%argrw{"wrr"}
	if		$tmp25 50 50 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:22
#   }
	trace		$tmp26 P ___292_T 	%line{22} %argrw{"wrr"} %argderivs{1,2}
	mul		tr transmitted $tmp26 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:25
#        specularcolor * Ks*specular(Nn,-In,roughness));
	functioncall	$const12 67 	%line{25} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:501
# string substr (string s, int start) { return substr (s, start, strlen(s)); }
	assign		___278_C $const2 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{501} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:503
# int stoi (string str) BUILTIN;
	for		$tmp28 54 55 66 66 	%line{503} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:507
#     return concat(concat(a,b), c);
	lights_begin	P Nn $const13 	%line{507} %argrw{"rrr"}
	lights		$tmp28 P Nn $const13 	%argrw{"wrrr"} %argderivs{1}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:504
# 		float __nondiffuse = 0;
	assign		___279___nondiffuse $const2 	%line{504} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:505
# 		getmessage ("light", "__nondiffuse", __nondiffuse);
	getmessage	$tmp29 $const14 $const15 ___279___nondiffuse 	%line{505} %argrw{"wrrw"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:506
# 		C += Cl * (1-__nondiffuse) * max (0, dot (N, normalize (L)));
	sub		$tmp30 $const8 ___279___nondiffuse 	%line{506} %argrw{"wrr"}
	mul		$tmp31 Cl $tmp30 	%argrw{"wrr"}
	assign		$tmp33 $const11 	%argrw{"wr"}
	normalize	$tmp35 L 	%argrw{"wr"}
	dot		$tmp34 Nn $tmp35 	%argrw{"wrr"}
	assign		$tmp36 $tmp34 	%argrw{"wr"}
	max		$tmp32 $tmp33 $tmp36 	%argrw{"wrr"}
	mul		$tmp37 $tmp31 $tmp32 	%argrw{"wrr"}
	add		___278_C ___278_C $tmp37 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:508
# 	return C;
	assign		$tmp27 ___278_C 	%line{508} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:25
#        specularcolor * Ks*specular(Nn,-In,roughness));
	mul		$tmp38 Kd $tmp27 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spd.osl"} %line{25} %argrw{"wrr"}
	add		$tmp39 $tmp38 r 	%argrw{"wrr"}
	add		$tmp40 $tmp39 tr 	%argrw{"wrr"}
	mul		$tmp41 C $tmp40 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:26
# }
	mul		$tmp42 specularcolor Ks 	%line{26} %argrw{"wrr"}
	neg		$tmp44 In 	%argrw{"wr"}
	functioncall	$const16 94 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:527
# 	color C = 0;
	assign		___281_C $const2 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{527} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:529
# 	lights (P, N, M_PI_2) {
	for		$tmp45 77 78 93 93 	%line{529} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:533
# 	}
	lights_begin	P Nn $const13 	%line{533} %argrw{"rrr"}
	lights		$tmp45 P Nn $const13 	%argrw{"wrrr"} %argderivs{1}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:530
# 		float __nonspecular = 0;
	assign		___282___nonspecular $const2 	%line{530} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:531
# 		getmessage ("light", "__nonspecular", __nonspecular);
	getmessage	$tmp46 $const14 $const17 ___282___nonspecular 	%line{531} %argrw{"wrrw"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	sub		$tmp47 $const8 ___282___nonspecular 	%line{532} %argrw{"wrr"}
	mul		$tmp48 Cl $tmp47 	%argrw{"wrr"}
	normalize	$tmp50 L 	%argrw{"wr"}
	functioncall	$const18 91 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:511
# 	vector H = normalize( L + V );
	add		$tmp51 $tmp50 $tmp44 	%line{511} %argrw{"wrr"}
	normalize	___280_H $tmp51 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:512
# 	return pow (max (0, dot (N, H)), 8 / roughness);
	dot		$tmp54 Nn ___280_H 	%line{512} %argrw{"wrr"}
	max		$tmp53 $const11 $tmp54 	%argrw{"wrr"}
	div		$tmp55 $const20 roughness 	%argrw{"wrr"}
	pow		$tmp52 $tmp53 $tmp55 	%argrw{"wrr"}
	assign		$tmp49 $tmp52 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	mul		$tmp56 $tmp48 $tmp49 	%line{532} %argrw{"wrr"}
	add		___281_C ___281_C $tmp56 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:534
# 	return C;
	assign		$tmp43 ___281_C 	%line{534} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spd.osl:26
# }
	mul		$tmp57 $tmp42 $tmp43 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spd.osl"} %line{26} %argrw{"wrr"}
	add		$tmp58 $tmp41 $tmp57 	%argrw{"wrr"}
	mul		C opacity $tmp58 	%argrw{"wrr"}
	end
