OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface hair
param	float	Ka	1		%meta{string,description,"Ambient scaling"} %meta{float,UImin,0} %meta{float,UIsoftmax,1}  %read{7,7} %write{2147483647,-1}
param	float	Kd	0.60000002		%meta{string,description,"Diffuse scaling"} %meta{float,UImin,0} %meta{float,UIsoftmax,1}  %read{9,9} %write{2147483647,-1}
param	float	Ks	0.15000001		%meta{string,description,"Specular scaling"} %meta{float,UImin,0} %meta{float,UIsoftmax,1}  %read{10,10} %write{2147483647,-1}
param	float	roughness	0.025		%meta{string,description,"Surface roughness (specular highlight size)"} %meta{float,UImin,0} %meta{float,UImax,1} %meta{string,UIenabler,"Ks"}  %read{27,27} %write{2147483647,-1}
param	color	specularcolor	1 1 1		%meta{string,description,"Specular highlight color"} %meta{string,UIenabler,"Ks"}  %read{10,10} %write{2147483647,-1}
param	color	rootcolor	0.109 0.037 0.0070000002		%meta{string,description,"Hair color at the root"}  %read{2,2} %write{2147483647,-1}
param	color	tipcolor	0.51899999 0.32499999 0.125		%meta{string,description,"Hair color at the tip"}  %read{2,2} %write{2147483647,-1}
param	float	roottippower	2		%meta{string,description,"How rapidly the color transitions from root to tip"} %meta{float,UImin,0} %meta{float,UIsoftmax,10}  %read{1,1} %write{2147483647,-1}
param	vector	T	0 0 0		%meta{string,description,"Tangents (default dPdv)"}  %read{3,3} %write{0,0} %initexpr
global	point	P	%read{14,15} %write{2147483647,-1} %derivs
global	vector	I	%read{4,4} %write{2147483647,-1}
global	float	v	%read{1,1} %write{2147483647,-1}
global	vector	dPdv	%read{0,0} %write{2147483647,-1}
global	color	C	%read{36,36} %write{35,36}
global	color	opacity	%read{36,36} %write{2147483647,-1}
global	vector	L	%read{16,16} %write{2147483647,-1}
global	color	Cl	%read{32,32} %write{2147483647,-1}
local	color	___291_C	%read{13,34} %write{12,33}
local	float	___292_theta	%read{13,33} %write{13,33}
local	color	___292_diff	%read{13,33} %write{13,33}
local	float	___292_cosang	%read{13,33} %write{13,33}
local	float	___292_spec	%read{13,33} %write{13,33}
local	color	hcolor	%read{8,9} %write{2,2}
local	vector	TN	%read{17,21} %write{3,3}
local	vector	V	%read{22,22} %write{5,5}
temp	float	$tmp1	%read{2,2} %write{1,1}
temp	vector	$tmp2	%read{5,5} %write{4,4}
temp	color	$tmp3	%read{7,7} %write{6,6}
temp	color	$tmp4	%read{8,8} %write{7,7}
temp	color	$tmp5	%read{13,35} %write{8,33}
temp	color	$tmp6	%read{35,35} %write{34,34}
temp	color	$tmp7	%read{13,33} %write{9,33}
temp	color	$tmp8	%read{13,33} %write{10,33}
const	string	$const1	"LocIllumHair"		%read{11,11} %write{2147483647,-1}
const	int	$const2	0		%read{12,12} %write{2147483647,-1}
temp	int	$tmp9	%read{13,33} %write{13,33}
temp	float	$tmp10	%read{18,18} %write{17,17}
temp	vector	$tmp11	%read{17,17} %write{16,16}
temp	float	$tmp12	%read{20,20} %write{19,19}
temp	float	$tmp13	%read{26,26} %write{25,25}
temp	float	$tmp14	%read{24,24} %write{23,23}
temp	float	$tmp15	%read{23,23} %write{22,22}
temp	vector	$tmp16	%read{22,22} %write{21,21}
temp	float	$tmp17	%read{25,25} %write{24,24}
temp	float	$tmp18	%read{28,28} %write{27,27}
const	float	$const4	1		%read{27,27} %write{2147483647,-1}
temp	color	$tmp19	%read{31,31} %write{29,29}
temp	color	$tmp20	%read{31,31} %write{30,30}
temp	color	$tmp21	%read{32,32} %write{31,31}
temp	color	$tmp22	%read{13,33} %write{13,33}
code T
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:101
#     )
	assign		T dPdv 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\hair.osl"} %line{101} %argrw{"wr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:104
# 
	pow		$tmp1 v roottippower 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\hair.osl"} %line{104} %argrw{"wrr"}
	mix		hcolor rootcolor tipcolor $tmp1 	%argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:106
#     vector V = -normalize(I);
	normalize	TN T 	%line{106} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:107
# 
	normalize	$tmp2 I 	%line{107} %argrw{"wr"}
	neg		V $tmp2 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:109
#         LocIllumHair (TN, V, Kd*hcolor, Ks*specularcolor, roughness);
	ambient		$tmp3 	%line{109} %argrw{"w"}
	mul		$tmp4 Ka $tmp3 	%argrw{"wrr"}
	mul		$tmp5 $tmp4 hcolor 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:110
#     C *= opacity;
	mul		$tmp7 Kd hcolor 	%line{110} %argrw{"wrr"}
	mul		$tmp8 Ks specularcolor 	%argrw{"wrr"}
	functioncall	$const1 35 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:58
#     lights (P) {
	assign		___291_C $const2 	%line{58} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:59
# 	float theta = acos (dot(T,normalize(L)));
	for		$tmp9 15 16 34 34 	%line{59} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:67
#     return C;
	lights_begin	P 	%line{67} %argrw{"r"}
	lights		$tmp9 P 	%argrw{"wr"} %argderivs{1}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:60
#         // diffuse component
	normalize	$tmp11 L 	%line{60} %argrw{"wr"}
	dot		$tmp10 TN $tmp11 	%argrw{"wrr"}
	acos		___292_theta $tmp10 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:62
#         // specular component
	sin		$tmp12 ___292_theta 	%line{62} %argrw{"wr"}
	assign		___292_diff $tmp12 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:64
# 	float spec = pow (cosang, 1/roughness);
	neg		$tmp16 TN 	%line{64} %argrw{"wr"}
	dot		$tmp15 $tmp16 V 	%argrw{"wrr"}
	acos		$tmp14 $tmp15 	%argrw{"wr"}
	sub		$tmp17 ___292_theta $tmp14 	%argrw{"wrr"}
	abs		$tmp13 $tmp17 	%argrw{"wr"}
	cos		___292_cosang $tmp13 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:65
# 	C += Cl * (Kd*diff + Ks*spec);
	div		$tmp18 $const4 roughness 	%line{65} %argrw{"wrr"}
	pow		___292_spec ___292_cosang $tmp18 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:66
#     }
	mul		$tmp19 $tmp7 ___292_diff 	%line{66} %argrw{"wrr"}
	mul		$tmp20 $tmp8 ___292_spec 	%argrw{"wrr"}
	add		$tmp21 $tmp19 $tmp20 	%argrw{"wrr"}
	mul		$tmp22 Cl $tmp21 	%argrw{"wrr"}
	add		___291_C ___291_C $tmp22 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:68
# }
	assign		$tmp6 ___291_C 	%line{68} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:110
#     C *= opacity;
	add		C $tmp5 $tmp6 	%line{110} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\hair.osl:111
# }
	mul		C C opacity 	%line{111} %argrw{"wrr"}
	end
