OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface rsmetal
param	float	Ka	1		%read{38,38} %write{2147483647,-1}
param	float	Ks	1		%read{60,60} %write{2147483647,-1}
param	float	Kr	0.60000002		%read{35,35} %write{2147483647,-1}
param	float	roughness	0.1		%read{54,54} %write{2147483647,-1}
global	point	P	%read{42,43} %write{2147483647,-1} %derivs
global	vector	I	%read{3,9} %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{2147483647,-1} %write{63,63}
global	color	opacity	%read{63,63} %write{2147483647,-1}
global	vector	L	%read{48,48} %write{2147483647,-1}
global	color	Cl	%read{47,47} %write{2147483647,-1}
local	vector	___280_H	%read{41,58} %write{41,58}
local	color	___281_C	%read{41,59} %write{40,58}
local	float	___282___nonspecular	%read{41,58} %write{41,58}
local	normal	Nf	%read{12,52} %write{6,7}
local	vector	V	%read{12,50} %write{10,10}
local	vector	D	%read{17,29} %write{15,17}
local	color	Cr	%read{62,62} %write{36,36}
local	float	w	%read{33,35} %write{32,34}
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,44} %write{2147483647,-1}
temp	int	$tmp3	%read{5,5} %write{4,4}
temp	vector	$tmp4	%read{10,10} %write{9,9}
const	string	$const3	"reflect"		%read{11,11} %write{2147483647,-1}
temp	float	$tmp5	%read{13,13} %write{12,12}
temp	float	$tmp6	%read{14,14} %write{13,13}
const	float	$const5	2		%read{13,13} %write{2147483647,-1}
temp	vector	$tmp7	%read{15,15} %write{14,14}
const	string	$const6	"world"		%read{17,17} %write{2147483647,-1}
const	string	$const7	"transform"		%read{16,16} %write{2147483647,-1}
const	string	$const8	"common"		%read{17,17} %write{2147483647,-1}
const	float	$const9	0.60000002		%read{20,20} %write{2147483647,-1}
temp	float	$tmp8	%read{20,20} %write{19,19}
const	float	$const10	2.5		%read{18,18} %write{2147483647,-1}
temp	vector	$tmp9	%read{19,19} %write{18,18}
temp	float	$tmp10	%read{24,24} %write{20,20}
const	float	$const11	0.2		%read{23,23} %write{2147483647,-1}
temp	float	$tmp11	%read{23,23} %write{22,22}
temp	vector	$tmp12	%read{22,22} %write{21,21}
const	float	$const13	5		%read{21,21} %write{2147483647,-1}
temp	float	$tmp13	%read{24,24} %write{23,23}
temp	float	$tmp14	%read{28,28} %write{24,24}
const	float	$const14	0.1		%read{27,27} %write{2147483647,-1}
temp	float	$tmp15	%read{27,27} %write{26,26}
temp	vector	$tmp16	%read{26,26} %write{25,25}
const	float	$const16	10		%read{25,25} %write{2147483647,-1}
temp	float	$tmp17	%read{28,28} %write{27,27}
temp	float	$tmp18	%read{32,32} %write{28,28}
const	float	$const17	0.050000001		%read{31,31} %write{2147483647,-1}
temp	float	$tmp19	%read{31,31} %write{30,30}
temp	vector	$tmp20	%read{30,30} %write{29,29}
const	float	$const19	20		%read{29,29} %write{2147483647,-1}
temp	float	$tmp21	%read{32,32} %write{31,31}
temp	float	$tmp22	%read{34,34} %write{33,33}
temp	float	$tmp23	%read{36,36} %write{35,35}
temp	color	$tmp24	%read{38,38} %write{37,37}
temp	color	$tmp25	%read{41,61} %write{38,58}
temp	color	$tmp26	%read{60,60} %write{59,59}
const	string	$const20	"specular"		%read{39,39} %write{2147483647,-1}
const	float	$const21	1.5707964		%read{42,43} %write{2147483647,-1}
temp	int	$tmp27	%read{41,58} %write{41,58}
temp	int	$tmp28	%read{2147483647,-1} %write{45,45}
const	string	$const22	"light"		%read{45,45} %write{2147483647,-1}
const	string	$const23	"__nonspecular"		%read{45,45} %write{2147483647,-1}
temp	float	$tmp29	%read{47,47} %write{46,46}
const	float	$const25	1		%read{46,46} %write{2147483647,-1}
temp	color	$tmp30	%read{57,57} %write{47,47}
temp	color	$tmp31	%read{57,57} %write{56,56}
temp	vector	$tmp32	%read{50,50} %write{48,48}
const	string	$const26	"specularbrdf"		%read{49,49} %write{2147483647,-1}
temp	vector	$tmp33	%read{51,51} %write{50,50}
temp	float	$tmp34	%read{56,56} %write{55,55}
temp	float	$tmp35	%read{55,55} %write{53,53}
const	float	$const27	0		%read{53,53} %write{2147483647,-1}
temp	float	$tmp36	%read{53,53} %write{52,52}
temp	float	$tmp37	%read{55,55} %write{54,54}
const	float	$const29	8		%read{54,54} %write{2147483647,-1}
temp	color	$tmp38	%read{41,58} %write{41,58}
temp	color	$tmp39	%read{61,61} %write{60,60}
temp	color	$tmp40	%read{62,62} %write{61,61}
temp	color	$tmp41	%read{63,63} %write{62,62}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:18
#     V = normalize(-I);
	normalize	$tmp1 N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl"} %line{18} %argrw{"wr"}
	functioncall	$const1 9 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
# float distance (point a, point b) BUILTIN;
	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\\rsmetal.osl:19
#     D = reflect(V, Nf) ;
	neg		$tmp4 I 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl"} %line{19} %argrw{"wr"}
	normalize	V $tmp4 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:20
#     D = transform("world", D);
	functioncall	$const3 16 	%line{20} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:198
# float distance (point a, point b) BUILTIN;
	dot		$tmp5 Nf V 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{198} %argrw{"wrr"}
	mul		$tmp6 $const5 $tmp5 	%argrw{"wrr"}
	mul		$tmp7 $tmp6 Nf 	%argrw{"wrr"}
	sub		D V $tmp7 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:21
# 
	functioncall	$const7 18 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl"} %line{21} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:248
#         Kr = 1.0;
	transformv	D $const8 $const6 D 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{248} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:24
#         0.2 * noise(D * 5) +
	mul		$tmp9 D $const10 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl"} %line{24} %argrw{"wrr"}
	noise		$tmp8 $tmp9 	%argrw{"wr"}
	mul		$tmp10 $const9 $tmp8 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:25
#         0.1 * noise(D * 10) +
	mul		$tmp12 D $const13 	%line{25} %argrw{"wrr"}
	noise		$tmp11 $tmp12 	%argrw{"wr"}
	mul		$tmp13 $const11 $tmp11 	%argrw{"wrr"}
	add		$tmp14 $tmp10 $tmp13 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:26
#         0.05 * noise(D * 20);
	mul		$tmp16 D $const16 	%line{26} %argrw{"wrr"}
	noise		$tmp15 $tmp16 	%argrw{"wr"}
	mul		$tmp17 $const14 $tmp15 	%argrw{"wrr"}
	add		$tmp18 $tmp14 $tmp17 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:27
#     w = w * w * w;
	mul		$tmp20 D $const19 	%line{27} %argrw{"wrr"}
	noise		$tmp19 $tmp20 	%argrw{"wr"}
	mul		$tmp21 $const17 $tmp19 	%argrw{"wrr"}
	add		w $tmp18 $tmp21 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:28
#     Cr = Kr * w;
	mul		$tmp22 w w 	%line{28} %argrw{"wrr"}
	mul		w $tmp22 w 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:29
# 
	mul		$tmp23 Kr w 	%line{29} %argrw{"wrr"}
	assign		Cr $tmp23 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:31
# }
	ambient		$tmp24 	%line{31} %argrw{"w"}
	mul		$tmp25 Ka $tmp24 	%argrw{"wrr"}
	functioncall	$const20 60 	%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
# // Lighting
	for		$tmp27 43 44 59 59 	%line{529} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:533
# 
	lights_begin	P Nf $const21 	%line{533} %argrw{"rrr"}
	lights		$tmp27 P Nf $const21 	%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	$tmp28 $const22 $const23 ___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		$tmp29 $const25 ___282___nonspecular 	%line{532} %argrw{"wrr"}
	mul		$tmp30 Cl $tmp29 	%argrw{"wrr"}
	normalize	$tmp32 L 	%argrw{"wr"}
	functioncall	$const26 57 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:511
# 	vector H = normalize( L + V );
	add		$tmp33 $tmp32 V 	%line{511} %argrw{"wrr"}
	normalize	___280_H $tmp33 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:512
# 	return pow (max (0, dot (N, H)), 8 / roughness);
	dot		$tmp36 Nf ___280_H 	%line{512} %argrw{"wrr"}
	max		$tmp35 $const27 $tmp36 	%argrw{"wrr"}
	div		$tmp37 $const29 roughness 	%argrw{"wrr"}
	pow		$tmp34 $tmp35 $tmp37 	%argrw{"wrr"}
	assign		$tmp31 $tmp34 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	mul		$tmp38 $tmp30 $tmp31 	%line{532} %argrw{"wrr"}
	add		___281_C ___281_C $tmp38 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:534
# 	return C;
	assign		$tmp26 ___281_C 	%line{534} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl:31
# }
	mul		$tmp39 Ks $tmp26 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\rsmetal.osl"} %line{31} %argrw{"wrr"}
	add		$tmp40 $tmp25 $tmp39 	%argrw{"wrr"}
	add		$tmp41 $tmp40 Cr 	%argrw{"wrr"}
	mul		C opacity $tmp41 	%argrw{"wrr"}
	end
