OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface matte	%meta{string,help,"Lambertian diffuse 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	1		%meta{string,help,"Diffuse scaling"} %meta{float,min,0} %meta{float,max,1}  %read{28,28} %write{2147483647,-1}
global	point	P	%read{14,15} %write{2147483647,-1} %derivs
global	vector	I	%read{3,3} %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,31} %write{30,31}
global	color	opacity	%read{31,31} %write{2147483647,-1}
global	vector	L	%read{21,21} %write{2147483647,-1}
global	color	Cl	%read{19,19} %write{2147483647,-1}
local	color	___278_C	%read{13,27} %write{12,26}
local	float	___279___nondiffuse	%read{13,26} %write{13,26}
local	normal	Nf	%read{14,22} %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,16} %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,15} %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,17} %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,18} %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,20} %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}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\matte.osl:54
# 
	normalize	$tmp1 N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\matte.osl"} %line{54} %argrw{"wr"}
	functioncall	$const1 9 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
# point  clamp (point x, point minval, point maxval) { return max(min(x,maxval),minval); }
	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\\matte.osl:57
# 
	ambient		$tmp4 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\matte.osl"} %line{57} %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
# // Displacement functions
	for		$tmp7 15 16 27 27 	%line{503} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:507
# 	// Be careful to handle the case where the geometry is a polymesh with smoothed normals.
	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\\matte.osl:57
# 
	mul		$tmp17 Kd $tmp6 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\matte.osl"} %line{57} %argrw{"wrr"}
	add		$tmp18 $tmp5 $tmp17 	%argrw{"wrr"}
	mul		C C $tmp18 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\matte.osl:60
# }
	mul		C C opacity 	%line{60} %argrw{"wrr"}
	end
