OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface shinymetal
param	float	Ka	1		%read{30,30} %write{2147483647,-1}
param	float	Ks	1		%read{52,52} %write{2147483647,-1}
param	float	Kr	1		%read{27,27} %write{2147483647,-1}
param	float	roughness	0.1		%read{46,46} %write{2147483647,-1}
param	string	texturename	""		%read{18,25} %write{2147483647,-1}
global	point	P	%read{25,35} %write{2147483647,-1} %derivs
global	vector	I	%read{3,15} %write{2147483647,-1} %derivs
global	normal	N	%read{0,0} %write{2147483647,-1} %derivs
global	normal	Ng	%read{3,3} %write{2147483647,-1}
global	color	C	%read{56,56} %write{56,56}
global	color	opacity	%read{55,55} %write{2147483647,-1}
global	vector	L	%read{40,40} %write{2147483647,-1}
global	color	Cl	%read{39,39} %write{2147483647,-1}
local	vector	___280_H	%read{33,50} %write{33,50}
local	color	___281_C	%read{33,51} %write{32,50}
local	float	___282___nonspecular	%read{33,50} %write{33,50}
local	int	___291_istexture	%read{22,22} %write{21,21}
local	normal	Nf	%read{12,44} %write{6,7} %derivs
local	vector	V	%read{42,42} %write{10,10}
local	vector	D	%read{17,25} %write{15,17} %derivs
local	color	Cr	%read{54,54} %write{27,28}
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,36} %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} %derivs
temp	float	$tmp6	%read{14,14} %write{13,13} %derivs
const	float	$const5	2		%read{13,13} %write{2147483647,-1}
temp	vector	$tmp7	%read{15,15} %write{14,14} %derivs
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	string	$const9	""		%read{18,18} %write{2147483647,-1}
temp	int	$tmp8	%read{19,19} %write{18,18}
temp	color	$tmp9	%read{27,27} %write{23,25}
const	string	$const10	"Environment"		%read{20,20} %write{2147483647,-1}
temp	int	$tmp10	%read{2147483647,-1} %write{21,21}
const	string	$const11	"exists"		%read{21,21} %write{2147483647,-1}
const	string	$const12	"traceset"		%read{25,25} %write{2147483647,-1}
const	float	$const13	0		%read{28,45} %write{2147483647,-1}
temp	color	$tmp11	%read{30,30} %write{29,29}
temp	color	$tmp12	%read{33,53} %write{30,50}
temp	color	$tmp13	%read{52,52} %write{51,51}
const	string	$const14	"specular"		%read{31,31} %write{2147483647,-1}
const	float	$const15	1.5707964		%read{34,35} %write{2147483647,-1}
temp	int	$tmp14	%read{33,50} %write{33,50}
temp	int	$tmp15	%read{2147483647,-1} %write{37,37}
const	string	$const16	"light"		%read{37,37} %write{2147483647,-1}
const	string	$const17	"__nonspecular"		%read{37,37} %write{2147483647,-1}
temp	float	$tmp16	%read{39,39} %write{38,38}
const	float	$const19	1		%read{38,38} %write{2147483647,-1}
temp	color	$tmp17	%read{49,49} %write{39,39}
temp	color	$tmp18	%read{49,49} %write{48,48}
temp	vector	$tmp19	%read{42,42} %write{40,40}
const	string	$const20	"specularbrdf"		%read{41,41} %write{2147483647,-1}
temp	vector	$tmp20	%read{43,43} %write{42,42}
temp	float	$tmp21	%read{48,48} %write{47,47}
temp	float	$tmp22	%read{47,47} %write{45,45}
temp	float	$tmp23	%read{45,45} %write{44,44}
temp	float	$tmp24	%read{47,47} %write{46,46}
const	float	$const22	8		%read{46,46} %write{2147483647,-1}
temp	color	$tmp25	%read{33,50} %write{33,50}
temp	color	$tmp26	%read{53,53} %write{52,52}
temp	color	$tmp27	%read{54,54} %write{53,53}
temp	color	$tmp28	%read{55,55} %write{54,54}
temp	color	$tmp29	%read{56,56} %write{55,55}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:22
#     V = normalize(-I);
	normalize	$tmp1 N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl"} %line{22} %argrw{"wr"}
	functioncall	$const1 9 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
# 
	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\\shinymetal.osl:23
#     D = reflect(I, Nf) ;
	neg		$tmp4 I 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl"} %line{23} %argrw{"wr"}
	normalize	V $tmp4 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:24
#     D = transform ("world", D);
	functioncall	$const3 16 	%line{24} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:198
# 
	dot		$tmp5 Nf I 	%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 I $tmp7 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:25
# 
	functioncall	$const7 18 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl"} %line{25} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:248
#         // gives us the same result as if the shader-writer called refract()
	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\\shinymetal.osl:27
# 	Cr = Kr * Environment(texturename, D);
	neq		$tmp8 texturename $const9 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl"} %line{27} %argrw{"wrr"}
	if		$tmp8 28 29 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:28
#     } else {
	functioncall	$const10 27 	%line{28} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:5
# 	if (istexture) {
	gettextureinfo	$tmp10 texturename $const11 ___291_istexture 	%line{5} %argrw{"wrrw"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:6
#       return environment (envname, R);
	if		___291_istexture 25 27 	%line{6} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:7
#     } else {
	environment	$tmp9 texturename D 	%line{7} %argrw{"wrr"} %argderivs{2}
	return
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:9
#     }
	trace		$tmp9 P D $const12 texturename 	%line{9} %argrw{"wrrrr"} %argderivs{1,2}
	return
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:28
#     } else {
	mul		Cr Kr $tmp9 	%line{28} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:30
#     }
	assign		Cr $const13 	%line{30} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:33
# }
	ambient		$tmp11 	%line{33} %argrw{"w"}
	mul		$tmp12 Ka $tmp11 	%argrw{"wrr"}
	functioncall	$const14 52 	%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		$tmp14 35 36 51 51 	%line{529} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:533
# color diffuse (vector N) {
	lights_begin	P Nf $const15 	%line{533} %argrw{"rrr"}
	lights		$tmp14 P Nf $const15 	%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	$tmp15 $const16 $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		$tmp16 $const19 ___282___nonspecular 	%line{532} %argrw{"wrr"}
	mul		$tmp17 Cl $tmp16 	%argrw{"wrr"}
	normalize	$tmp19 L 	%argrw{"wr"}
	functioncall	$const20 49 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:511
# 	vector H = normalize( L + V );
	add		$tmp20 $tmp19 V 	%line{511} %argrw{"wrr"}
	normalize	___280_H $tmp20 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:512
# 	return pow (max (0, dot (N, H)), 8 / roughness);
	dot		$tmp23 Nf ___280_H 	%line{512} %argrw{"wrr"}
	max		$tmp22 $const13 $tmp23 	%argrw{"wrr"}
	div		$tmp24 $const22 roughness 	%argrw{"wrr"}
	pow		$tmp21 $tmp22 $tmp24 	%argrw{"wrr"}
	assign		$tmp18 $tmp21 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	mul		$tmp25 $tmp17 $tmp18 	%line{532} %argrw{"wrr"}
	add		___281_C ___281_C $tmp25 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:534
# 	return C;
	assign		$tmp13 ___281_C 	%line{534} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl:33
# }
	mul		$tmp26 Ks $tmp13 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\shinymetal.osl"} %line{33} %argrw{"wrr"}
	add		$tmp27 $tmp12 $tmp26 	%argrw{"wrr"}
	add		$tmp28 $tmp27 Cr 	%argrw{"wrr"}
	mul		$tmp29 opacity $tmp28 	%argrw{"wrr"}
	mul		C C $tmp29 	%argrw{"wrr"}
	end
