OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface spatter
param	float	Ka	1		%read{28,28} %write{2147483647,-1}
param	float	Kd	0.5		%read{46,46} %write{2147483647,-1}
param	float	Ks	0.69999999		%read{49,49} %write{2147483647,-1}
param	float	roughness	0.2		%read{65,65} %write{2147483647,-1}
param	float	specksize	0.0099999998		%read{12,12} %write{2147483647,-1}
param	float	sizes	5		%read{16,16} %write{2147483647,-1}
param	color	specularcolor	1 1 1		%read{49,49} %write{2147483647,-1}
param	color	basecolor	0.1 0.1 0.5		%read{13,13} %write{2147483647,-1}
param	color	spattercolor	1 1 1		%read{23,23} %write{2147483647,-1}
global	point	P	%read{18,54} %write{2147483647,-1} %derivs
global	vector	I	%read{4,10} %write{2147483647,-1}
global	normal	N	%read{1,1} %write{2147483647,-1}
global	normal	Ng	%read{4,4} %write{2147483647,-1}
global	color	C	%read{2147483647,-1} %write{73,73}
global	color	opacity	%read{73,73} %write{2147483647,-1}
global	vector	L	%read{39,59} %write{2147483647,-1}
global	color	Cl	%read{37,58} %write{2147483647,-1}
local	color	___278_C	%read{31,45} %write{30,44}
local	float	___279___nondiffuse	%read{31,44} %write{31,44}
local	vector	___280_H	%read{52,69} %write{52,69}
local	color	___281_C	%read{52,70} %write{51,69}
local	float	___282___nonspecular	%read{52,69} %write{52,69}
local	float	speckle	%read{14,26} %write{14,26}
local	float	size	%read{14,26} %write{14,26}
local	float	scalefac	%read{14,26} %write{12,26}
local	float	threshold	%read{21,21} %write{0,0}
local	color	paint	%read{14,48} %write{13,26}
local	normal	Nf	%read{32,63} %write{7,8}
local	vector	V	%read{61,61} %write{11,11}
const	float	$const1	0.69999999		%read{0,0} %write{2147483647,-1}
temp	normal	$tmp1	%read{7,8} %write{1,1}
const	string	$const2	"faceforward"		%read{2,3} %write{2147483647,-1}
temp	float	$tmp2	%read{5,5} %write{4,4}
const	int	$const3	0		%read{5,55} %write{2147483647,-1}
temp	int	$tmp3	%read{6,6} %write{5,5}
temp	vector	$tmp4	%read{11,11} %write{10,10}
const	int	$const4	1		%read{15,15} %write{2147483647,-1}
const	float	$const5	1		%read{12,57} %write{2147483647,-1}
temp	int	$tmp5	%read{14,26} %write{14,26}
temp	point	$tmp6	%read{19,19} %write{18,18}
const	string	$const6	"shader"		%read{18,18} %write{2147483647,-1}
const	string	$const7	"transform"		%read{17,17} %write{2147483647,-1}
const	string	$const8	"common"		%read{18,18} %write{2147483647,-1}
temp	point	$tmp7	%read{20,20} %write{19,19}
temp	int	$tmp8	%read{22,22} %write{21,21}
const	float	$const10	2		%read{25,25} %write{2147483647,-1}
temp	color	$tmp9	%read{28,28} %write{27,27}
temp	color	$tmp10	%read{31,47} %write{28,44}
temp	color	$tmp11	%read{46,46} %write{45,45}
const	string	$const11	"diffuse"		%read{29,29} %write{2147483647,-1}
const	float	$const12	1.5707964		%read{32,54} %write{2147483647,-1}
temp	int	$tmp12	%read{31,44} %write{31,44}
temp	int	$tmp13	%read{2147483647,-1} %write{35,35}
const	string	$const13	"light"		%read{35,56} %write{2147483647,-1}
const	string	$const14	"__nondiffuse"		%read{35,35} %write{2147483647,-1}
temp	float	$tmp14	%read{37,37} %write{36,36}
temp	color	$tmp15	%read{43,43} %write{37,37}
temp	color	$tmp16	%read{43,43} %write{42,42}
const	float	$const15	0		%read{38,64} %write{2147483647,-1}
temp	color	$tmp17	%read{42,42} %write{38,38}
temp	float	$tmp18	%read{41,41} %write{40,40}
temp	vector	$tmp19	%read{40,40} %write{39,39}
temp	color	$tmp20	%read{42,42} %write{41,41}
temp	color	$tmp21	%read{31,44} %write{31,44}
temp	color	$tmp22	%read{47,47} %write{46,46}
temp	color	$tmp23	%read{48,48} %write{47,47}
temp	color	$tmp24	%read{52,72} %write{48,69}
temp	color	$tmp25	%read{52,71} %write{49,69}
temp	color	$tmp26	%read{71,71} %write{70,70}
const	string	$const16	"specular"		%read{50,50} %write{2147483647,-1}
temp	int	$tmp27	%read{52,69} %write{52,69}
temp	int	$tmp28	%read{2147483647,-1} %write{56,56}
const	string	$const17	"__nonspecular"		%read{56,56} %write{2147483647,-1}
temp	float	$tmp29	%read{58,58} %write{57,57}
temp	color	$tmp30	%read{68,68} %write{58,58}
temp	color	$tmp31	%read{68,68} %write{67,67}
temp	vector	$tmp32	%read{61,61} %write{59,59}
const	string	$const18	"specularbrdf"		%read{60,60} %write{2147483647,-1}
temp	vector	$tmp33	%read{62,62} %write{61,61}
temp	float	$tmp34	%read{67,67} %write{66,66}
temp	float	$tmp35	%read{66,66} %write{64,64}
temp	float	$tmp36	%read{64,64} %write{63,63}
temp	float	$tmp37	%read{66,66} %write{65,65}
const	float	$const20	8		%read{65,65} %write{2147483647,-1}
temp	color	$tmp38	%read{52,69} %write{52,69}
temp	color	$tmp39	%read{72,72} %write{71,71}
temp	color	$tmp40	%read{73,73} %write{72,72}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:20
# 	color paint;
	assign		threshold $const1 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spatter.osl"} %line{20} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:25
# 	V = -normalize(I);
	normalize	$tmp1 N 	%line{25} %argrw{"wr"}
	functioncall	$const2 10 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
# float erfc (float x) BUILTIN;
	functioncall	$const2 10 	%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 $const3 	%argrw{"wrr"}
	if		$tmp3 8 9 	%argrw{"r"}
	neg		Nf $tmp1 	%argrw{"wr"}
	assign		Nf $tmp1 	%argrw{"wr"}
	return
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:26
# 
	normalize	$tmp4 I 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spatter.osl"} %line{26} %argrw{"wr"}
	neg		V $tmp4 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:29
# 	paint = basecolor;
	div		scalefac $const5 specksize 	%line{29} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:30
# 	for (size=1; size<=sizes; size +=1) {
	assign		paint basecolor 	%line{30} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:31
# 		speckle = noise(transform("shader",P)*scalefac);
	for		$tmp5 16 17 26 27 	%line{31} %argrw{"r"}
	assign		size $const4 	%argrw{"wr"}
	le		$tmp5 size sizes 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:32
# 		if (speckle > threshold) {
	functioncall	$const7 19 	%line{32} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:249
#         float F = (c * (g+c) - 1.0) / (c * beta + 1.0);
	transform	$tmp6 $const8 $const6 P 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{249} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:32
# 		if (speckle > threshold) {
	mul		$tmp7 $tmp6 scalefac 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spatter.osl"} %line{32} %argrw{"wrr"}
	noise		speckle $tmp7 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:33
# 			paint = spattercolor;
	gt		$tmp8 speckle threshold 	%line{33} %argrw{"wrr"}
	if		$tmp8 25 25 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:34
# 			break;
	assign		paint spattercolor 	%line{34} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:35
# 		}
	break	%line{35}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:37
# 	}
	div		scalefac scalefac $const10 	%line{37} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:31
# 		speckle = noise(transform("shader",P)*scalefac);
	add		size size $const5 	%line{31} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:41
# 		specularcolor * Ks * specular(Nf,V,roughness));
	ambient		$tmp9 	%line{41} %argrw{"w"}
	mul		$tmp10 Ka $tmp9 	%argrw{"wrr"}
	functioncall	$const11 46 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:501
# }
	assign		___278_C $const3 	%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
# void displace (string space, float amp) {
	for		$tmp12 33 34 45 45 	%line{503} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:507
# void bump (string space, float amp) {
	lights_begin	P Nf $const12 	%line{507} %argrw{"rrr"}
	lights		$tmp12 P Nf $const12 	%argrw{"wrrr"} %argderivs{1}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:504
# 		float __nondiffuse = 0;
	assign		___279___nondiffuse $const3 	%line{504} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:505
# 		getmessage ("light", "__nondiffuse", __nondiffuse);
	getmessage	$tmp13 $const13 $const14 ___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		$tmp14 $const5 ___279___nondiffuse 	%line{506} %argrw{"wrr"}
	mul		$tmp15 Cl $tmp14 	%argrw{"wrr"}
	assign		$tmp17 $const15 	%argrw{"wr"}
	normalize	$tmp19 L 	%argrw{"wr"}
	dot		$tmp18 Nf $tmp19 	%argrw{"wrr"}
	assign		$tmp20 $tmp18 	%argrw{"wr"}
	max		$tmp16 $tmp17 $tmp20 	%argrw{"wrr"}
	mul		$tmp21 $tmp15 $tmp16 	%argrw{"wrr"}
	add		___278_C ___278_C $tmp21 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:508
# 	return C;
	assign		$tmp11 ___278_C 	%line{508} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:41
# 		specularcolor * Ks * specular(Nf,V,roughness));
	mul		$tmp22 Kd $tmp11 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spatter.osl"} %line{41} %argrw{"wrr"}
	add		$tmp23 $tmp10 $tmp22 	%argrw{"wrr"}
	mul		$tmp24 paint $tmp23 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\spatter.osl:42
# }
	mul		$tmp25 specularcolor Ks 	%line{42} %argrw{"wrr"}
	functioncall	$const16 71 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:527
#     return concat(concat(a,b,c), d);
	assign		___281_C $const3 	%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
# string concat (string a, string b, string c, string d, string e) {
	for		$tmp27 54 55 70 70 	%line{529} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:533
#     return concat(concat(a,b,c,d,e), f);
	lights_begin	P Nf $const12 	%line{533} %argrw{"rrr"}
	lights		$tmp27 P Nf $const12 	%argrw{"wrrr"} %argderivs{1}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:530
# 		float __nonspecular = 0;
	assign		___282___nonspecular $const3 	%line{530} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:531
# 		getmessage ("light", "__nonspecular", __nonspecular);
	getmessage	$tmp28 $const13 $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		$tmp29 $const5 ___282___nonspecular 	%line{532} %argrw{"wrr"}
	mul		$tmp30 Cl $tmp29 	%argrw{"wrr"}
	normalize	$tmp32 L 	%argrw{"wr"}
	functioncall	$const18 68 	%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 $const15 $tmp36 	%argrw{"wrr"}
	div		$tmp37 $const20 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\\spatter.osl:42
# }
	mul		$tmp39 $tmp25 $tmp26 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\spatter.osl"} %line{42} %argrw{"wrr"}
	add		$tmp40 $tmp24 $tmp39 	%argrw{"wrr"}
	mul		C opacity $tmp40 	%argrw{"wrr"}
	end
