OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface plastic	%meta{string,help,"Plastic material"} 
param	float	Ka	1		%meta{string,help,"Ambient scaling"} %meta{float,min,0} %meta{float,max,1}  %read{10,10} %write{2147483647,-1}
param	float	Kd	0.5		%meta{string,help,"Diffuse scaling"} %meta{float,min,0} %meta{float,max,1}  %read{28,28} %write{2147483647,-1}
param	float	Ks	0.5		%meta{string,help,"Specular scaling"} %meta{float,min,0} %meta{float,max,1}  %read{31,31} %write{2147483647,-1}
param	float	roughness	0.1		%meta{string,help,"Surface roughness (specular highlight size)"} %meta{float,min,0} %meta{float,max,1}  %read{49,49} %write{2147483647,-1}
param	color	specularcolor	1 1 1		%meta{string,help,"Specular highlight color"}  %read{31,31} %write{2147483647,-1}
global	point	P	%read{14,38} %write{2147483647,-1} %derivs
global	vector	I	%read{3,32} %write{2147483647,-1}
global	normal	N	%read{0,0} %write{2147483647,-1}
global	normal	Ng	%read{3,3} %write{2147483647,-1}
global	color	C	%read{30,57} %write{56,57}
global	color	opacity	%read{57,57} %write{2147483647,-1}
global	vector	L	%read{21,43} %write{2147483647,-1}
global	color	Cl	%read{19,42} %write{2147483647,-1}
local	color	___278_C	%read{13,27} %write{12,26}
local	float	___279___nondiffuse	%read{13,26} %write{13,26}
local	vector	___280_H	%read{36,53} %write{36,53}
local	color	___281_C	%read{36,54} %write{35,53}
local	float	___282___nonspecular	%read{36,53} %write{36,53}
local	normal	Nf	%read{14,47} %write{6,7}
temp	normal	$tmp1	%read{6,7} %write{0,0}
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,39} %write{2147483647,-1}
temp	int	$tmp3	%read{5,5} %write{4,4}
temp	color	$tmp4	%read{10,10} %write{9,9}
temp	color	$tmp5	%read{13,29} %write{10,26}
temp	color	$tmp6	%read{28,28} %write{27,27}
const	string	$const3	"diffuse"		%read{11,11} %write{2147483647,-1}
const	float	$const4	1.5707964		%read{14,38} %write{2147483647,-1}
temp	int	$tmp7	%read{13,26} %write{13,26}
temp	int	$tmp8	%read{2147483647,-1} %write{17,17}
const	string	$const5	"light"		%read{17,40} %write{2147483647,-1}
const	string	$const6	"__nondiffuse"		%read{17,17} %write{2147483647,-1}
temp	float	$tmp9	%read{19,19} %write{18,18}
const	float	$const8	1		%read{18,41} %write{2147483647,-1}
temp	color	$tmp10	%read{25,25} %write{19,19}
temp	color	$tmp11	%read{25,25} %write{24,24}
const	float	$const9	0		%read{20,48} %write{2147483647,-1}
temp	color	$tmp12	%read{24,24} %write{20,20}
temp	float	$tmp13	%read{23,23} %write{22,22}
temp	vector	$tmp14	%read{22,22} %write{21,21}
temp	color	$tmp15	%read{24,24} %write{23,23}
temp	color	$tmp16	%read{13,26} %write{13,26}
temp	color	$tmp17	%read{29,29} %write{28,28}
temp	color	$tmp18	%read{30,30} %write{29,29}
temp	color	$tmp19	%read{36,56} %write{30,53}
temp	color	$tmp20	%read{36,55} %write{31,53}
temp	color	$tmp21	%read{55,55} %write{54,54}
temp	vector	$tmp22	%read{33,33} %write{32,32}
temp	vector	$tmp23	%read{36,53} %write{33,53}
const	string	$const10	"specular"		%read{34,34} %write{2147483647,-1}
temp	int	$tmp24	%read{36,53} %write{36,53}
temp	int	$tmp25	%read{2147483647,-1} %write{40,40}
const	string	$const11	"__nonspecular"		%read{40,40} %write{2147483647,-1}
temp	float	$tmp26	%read{42,42} %write{41,41}
temp	color	$tmp27	%read{52,52} %write{42,42}
temp	color	$tmp28	%read{52,52} %write{51,51}
temp	vector	$tmp29	%read{45,45} %write{43,43}
const	string	$const12	"specularbrdf"		%read{44,44} %write{2147483647,-1}
temp	vector	$tmp30	%read{46,46} %write{45,45}
temp	float	$tmp31	%read{51,51} %write{50,50}
temp	float	$tmp32	%read{50,50} %write{48,48}
temp	float	$tmp33	%read{48,48} %write{47,47}
temp	float	$tmp34	%read{50,50} %write{49,49}
const	float	$const14	8		%read{49,49} %write{2147483647,-1}
temp	color	$tmp35	%read{36,53} %write{36,53}
temp	color	$tmp36	%read{56,56} %write{55,55}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\plastic.osl:64
# 
	normalize	$tmp1 N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\plastic.osl"} %line{64} %argrw{"wr"}
	functioncall	$const1 9 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
# vector mod (vector a, float  b) { return a - b*floor(a/b); }
	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		Nf $tmp1 	%argrw{"wr"}
	assign		Nf $tmp1 	%argrw{"wr"}
	return
# D:\\xrt.git\\src\\osl\\shaders\\plastic.osl:67
#         specularcolor * Ks*specular(Nf, -normalize(I), roughness);
	ambient		$tmp4 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\plastic.osl"} %line{67} %argrw{"w"}
	mul		$tmp5 Ka $tmp4 	%argrw{"wrr"}
	functioncall	$const3 28 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:501
# }
	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
#     return aastep (edge, s, filterwidth(edge), ds);
	for		$tmp7 15 16 27 27 	%line{503} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:507
# }
	lights_begin	P Nf $const4 	%line{507} %argrw{"rrr"}
	lights		$tmp7 P Nf $const4 	%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	$tmp8 $const5 $const6 ___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		$tmp9 $const8 ___279___nondiffuse 	%line{506} %argrw{"wrr"}
	mul		$tmp10 Cl $tmp9 	%argrw{"wrr"}
	assign		$tmp12 $const9 	%argrw{"wr"}
	normalize	$tmp14 L 	%argrw{"wr"}
	dot		$tmp13 Nf $tmp14 	%argrw{"wrr"}
	assign		$tmp15 $tmp13 	%argrw{"wr"}
	max		$tmp11 $tmp12 $tmp15 	%argrw{"wrr"}
	mul		$tmp16 $tmp10 $tmp11 	%argrw{"wrr"}
	add		___278_C ___278_C $tmp16 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:508
# 	return C;
	assign		$tmp6 ___278_C 	%line{508} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\plastic.osl:67
#         specularcolor * Ks*specular(Nf, -normalize(I), roughness);
	mul		$tmp17 Kd $tmp6 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\plastic.osl"} %line{67} %argrw{"wrr"}
	add		$tmp18 $tmp5 $tmp17 	%argrw{"wrr"}
	mul		$tmp19 C $tmp18 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\plastic.osl:68
# 
	mul		$tmp20 specularcolor Ks 	%line{68} %argrw{"wrr"}
	normalize	$tmp22 I 	%argrw{"wr"}
	neg		$tmp23 $tmp22 	%argrw{"wr"}
	functioncall	$const10 55 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:527
# 	}
	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
# 
	for		$tmp24 38 39 54 54 	%line{529} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:533
# 
	lights_begin	P Nf $const4 	%line{533} %argrw{"rrr"}
	lights		$tmp24 P Nf $const4 	%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	$tmp25 $const5 $const11 ___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		$tmp26 $const8 ___282___nonspecular 	%line{532} %argrw{"wrr"}
	mul		$tmp27 Cl $tmp26 	%argrw{"wrr"}
	normalize	$tmp29 L 	%argrw{"wr"}
	functioncall	$const12 52 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:511
# 	vector H = normalize( L + V );
	add		$tmp30 $tmp29 $tmp23 	%line{511} %argrw{"wrr"}
	normalize	___280_H $tmp30 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:512
# 	return pow (max (0, dot (N, H)), 8 / roughness);
	dot		$tmp33 Nf ___280_H 	%line{512} %argrw{"wrr"}
	max		$tmp32 $const9 $tmp33 	%argrw{"wrr"}
	div		$tmp34 $const14 roughness 	%argrw{"wrr"}
	pow		$tmp31 $tmp32 $tmp34 	%argrw{"wrr"}
	assign		$tmp28 $tmp31 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	mul		$tmp35 $tmp27 $tmp28 	%line{532} %argrw{"wrr"}
	add		___281_C ___281_C $tmp35 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:534
# 	return C;
	assign		$tmp21 ___281_C 	%line{534} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\plastic.osl:68
# 
	mul		$tmp36 $tmp20 $tmp21 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\plastic.osl"} %line{68} %argrw{"wrr"}
	add		C $tmp19 $tmp36 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\plastic.osl:71
# }
	mul		C C opacity 	%line{71} %argrw{"wrr"}
	end
