OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface stone
param	float	Ks	0.89999998		%read{42,42} %write{2147483647,-1}
param	float	Kd	0.80000001		%read{39,39} %write{2147483647,-1}
param	float	Ka	0.2		%read{21,21} %write{2147483647,-1}
param	float	roughness	0.30000001		%read{58,58} %write{2147483647,-1}
param	float	scale	0.02		%read{13,13} %write{2147483647,-1}
param	float	nshades	4		%read{16,18} %write{2147483647,-1}
param	float	exponent	2		%read{15,15} %write{2147483647,-1}
param	color	specularcolor	1 1 1		%read{42,42} %write{2147483647,-1}
param	color	graincolor	0 0 0		%read{19,19} %write{2147483647,-1}
global	point	P	%read{12,47} %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{19,19} %write{66,66}
global	color	opacity	%read{66,66} %write{2147483647,-1}
global	vector	L	%read{32,52} %write{2147483647,-1}
global	color	Cl	%read{30,51} %write{2147483647,-1}
local	color	___278_C	%read{24,38} %write{23,37}
local	float	___279___nondiffuse	%read{24,37} %write{24,37}
local	vector	___280_H	%read{45,62} %write{45,62}
local	color	___281_C	%read{45,63} %write{44,62}
local	float	___282___nonspecular	%read{45,62} %write{45,62}
local	normal	Nf	%read{25,56} %write{6,7}
local	vector	V	%read{54,54} %write{10,10}
local	float	tone	%read{15,19} %write{14,18}
local	color	grain	%read{41,41} %write{19,19}
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,48} %write{2147483647,-1}
temp	int	$tmp3	%read{5,5} %write{4,4}
temp	vector	$tmp4	%read{10,10} %write{9,9}
temp	point	$tmp5	%read{13,13} %write{12,12}
const	string	$const3	"shader"		%read{12,12} %write{2147483647,-1}
const	string	$const4	"transform"		%read{11,11} %write{2147483647,-1}
const	string	$const5	"common"		%read{12,12} %write{2147483647,-1}
temp	point	$tmp6	%read{14,14} %write{13,13}
temp	float	$tmp7	%read{18,18} %write{17,17}
temp	float	$tmp8	%read{16,16} %write{15,15}
temp	float	$tmp9	%read{17,17} %write{16,16}
temp	color	$tmp10	%read{21,21} %write{20,20}
temp	color	$tmp11	%read{24,40} %write{21,37}
temp	color	$tmp12	%read{39,39} %write{38,38}
const	string	$const6	"diffuse"		%read{22,22} %write{2147483647,-1}
const	float	$const7	1.5707964		%read{25,47} %write{2147483647,-1}
temp	int	$tmp13	%read{24,37} %write{24,37}
temp	int	$tmp14	%read{2147483647,-1} %write{28,28}
const	string	$const8	"light"		%read{28,49} %write{2147483647,-1}
const	string	$const9	"__nondiffuse"		%read{28,28} %write{2147483647,-1}
temp	float	$tmp15	%read{30,30} %write{29,29}
const	float	$const11	1		%read{29,50} %write{2147483647,-1}
temp	color	$tmp16	%read{36,36} %write{30,30}
temp	color	$tmp17	%read{36,36} %write{35,35}
const	float	$const12	0		%read{31,57} %write{2147483647,-1}
temp	color	$tmp18	%read{35,35} %write{31,31}
temp	float	$tmp19	%read{34,34} %write{33,33}
temp	vector	$tmp20	%read{33,33} %write{32,32}
temp	color	$tmp21	%read{35,35} %write{34,34}
temp	color	$tmp22	%read{24,37} %write{24,37}
temp	color	$tmp23	%read{40,40} %write{39,39}
temp	color	$tmp24	%read{41,41} %write{40,40}
temp	color	$tmp25	%read{45,65} %write{41,62}
temp	color	$tmp26	%read{45,64} %write{42,62}
temp	color	$tmp27	%read{64,64} %write{63,63}
const	string	$const13	"specular"		%read{43,43} %write{2147483647,-1}
temp	int	$tmp28	%read{45,62} %write{45,62}
temp	int	$tmp29	%read{2147483647,-1} %write{49,49}
const	string	$const14	"__nonspecular"		%read{49,49} %write{2147483647,-1}
temp	float	$tmp30	%read{51,51} %write{50,50}
temp	color	$tmp31	%read{61,61} %write{51,51}
temp	color	$tmp32	%read{61,61} %write{60,60}
temp	vector	$tmp33	%read{54,54} %write{52,52}
const	string	$const15	"specularbrdf"		%read{53,53} %write{2147483647,-1}
temp	vector	$tmp34	%read{55,55} %write{54,54}
temp	float	$tmp35	%read{60,60} %write{59,59}
temp	float	$tmp36	%read{59,59} %write{57,57}
temp	float	$tmp37	%read{57,57} %write{56,56}
temp	float	$tmp38	%read{59,59} %write{58,58}
const	float	$const17	8		%read{58,58} %write{2147483647,-1}
temp	color	$tmp39	%read{45,62} %write{45,62}
temp	color	$tmp40	%read{65,65} %write{64,64}
temp	color	$tmp41	%read{66,66} %write{65,65}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:24
#     V = -normalize(I) ;
	normalize	$tmp1 N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stone.osl"} %line{24} %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\\stone.osl:25
# 
	normalize	$tmp4 I 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stone.osl"} %line{25} %argrw{"wr"}
	neg		V $tmp4 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:28
#  /* exponent sharpens peaks and pushes average toward darker end */
	functioncall	$const4 13 	%line{28} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:249
#         Kt = (1.0 - Kr) * eta*eta;
	transform	$tmp5 $const5 $const3 P 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{249} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:28
#  /* exponent sharpens peaks and pushes average toward darker end */
	div		$tmp6 $tmp5 scale 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stone.osl"} %line{28} %argrw{"wrr"}
	noise		tone $tmp6 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:31
# 
	pow		$tmp8 tone exponent 	%line{31} %argrw{"wrr"}
	mul		$tmp9 nshades $tmp8 	%argrw{"wrr"}
	round		$tmp7 $tmp9 	%argrw{"wr"}
	div		tone $tmp7 nshades 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:34
#     C = opacity * (grain * (Ka*ambient() + Kd*diffuse(Nf)) +
	mix		grain graincolor C tone 	%line{34} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:35
#     		specularcolor * Ks * specular(Nf,V,roughness) );
	ambient		$tmp10 	%line{35} %argrw{"w"}
	mul		$tmp11 Ka $tmp10 	%argrw{"wrr"}
	functioncall	$const6 39 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:501
# void bump (string space, float amp) {
	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
# }
	for		$tmp13 26 27 38 38 	%line{503} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:507
# int strlen (string s) BUILTIN;
	lights_begin	P Nf $const7 	%line{507} %argrw{"rrr"}
	lights		$tmp13 P Nf $const7 	%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	$tmp14 $const8 $const9 ___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		$tmp15 $const11 ___279___nondiffuse 	%line{506} %argrw{"wrr"}
	mul		$tmp16 Cl $tmp15 	%argrw{"wrr"}
	assign		$tmp18 $const12 	%argrw{"wr"}
	normalize	$tmp20 L 	%argrw{"wr"}
	dot		$tmp19 Nf $tmp20 	%argrw{"wrr"}
	assign		$tmp21 $tmp19 	%argrw{"wr"}
	max		$tmp17 $tmp18 $tmp21 	%argrw{"wrr"}
	mul		$tmp22 $tmp16 $tmp17 	%argrw{"wrr"}
	add		___278_C ___278_C $tmp22 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:508
# 	return C;
	assign		$tmp12 ___278_C 	%line{508} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:35
#     		specularcolor * Ks * specular(Nf,V,roughness) );
	mul		$tmp23 Kd $tmp12 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stone.osl"} %line{35} %argrw{"wrr"}
	add		$tmp24 $tmp11 $tmp23 	%argrw{"wrr"}
	mul		$tmp25 grain $tmp24 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:36
# }
	mul		$tmp26 specularcolor Ks 	%line{36} %argrw{"wrr"}
	functioncall	$const13 64 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:527
#     return concat(concat(a,b,c,d,e), f);
	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		$tmp28 47 48 63 63 	%line{529} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:533
# 
	lights_begin	P Nf $const7 	%line{533} %argrw{"rrr"}
	lights		$tmp28 P Nf $const7 	%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	$tmp29 $const8 $const14 ___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		$tmp30 $const11 ___282___nonspecular 	%line{532} %argrw{"wrr"}
	mul		$tmp31 Cl $tmp30 	%argrw{"wrr"}
	normalize	$tmp33 L 	%argrw{"wr"}
	functioncall	$const15 61 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:511
# 	vector H = normalize( L + V );
	add		$tmp34 $tmp33 V 	%line{511} %argrw{"wrr"}
	normalize	___280_H $tmp34 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:512
# 	return pow (max (0, dot (N, H)), 8 / roughness);
	dot		$tmp37 Nf ___280_H 	%line{512} %argrw{"wrr"}
	max		$tmp36 $const12 $tmp37 	%argrw{"wrr"}
	div		$tmp38 $const17 roughness 	%argrw{"wrr"}
	pow		$tmp35 $tmp36 $tmp38 	%argrw{"wrr"}
	assign		$tmp32 $tmp35 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	mul		$tmp39 $tmp31 $tmp32 	%line{532} %argrw{"wrr"}
	add		___281_C ___281_C $tmp39 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:534
# 	return C;
	assign		$tmp27 ___281_C 	%line{534} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\stone.osl:36
# }
	mul		$tmp40 $tmp26 $tmp27 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stone.osl"} %line{36} %argrw{"wrr"}
	add		$tmp41 $tmp25 $tmp40 	%argrw{"wrr"}
	mul		C opacity $tmp41 	%argrw{"wrr"}
	end
