OpenShadingLanguage 1.00
# Compiled by oslc 1.3.0
shader node_ward_bsdf
param	color	Color	0 0 0 		 %read{72,72} %write{2147483647,-1}
param	float	Roughness	0 		 %read{64,70} %write{2147483647,-1}
param	float	Anisotropy	0 		 %read{59,59} %write{2147483647,-1}
param	float	Rotation	0 		 %read{3,5} %write{2147483647,-1}
param	normal	Normal	0 0 0 		 %read{8,71} %write{0,0}
param	normal	Tangent	0 0 0 		 %read{2,2} %write{1,1}
oparam	closure color	BSDF			 %read{2147483647,-1} %write{72,72}
global	normal	N	 %read{0,0} %write{2147483647,-1}
global	vector	dPdu	 %read{1,1} %write{2147483647,-1}
local	vector	___230_axis	 %read{12,14} %write{9,9}
local	float	___230_cosang	 %read{11,52} %write{10,10}
local	float	___230_sinang	 %read{22,47} %write{10,10}
local	float	___230_cosang1	 %read{21,46} %write{11,11}
local	float	___230_x	 %read{15,47} %write{12,12}
local	float	___230_y	 %read{20,45} %write{13,13}
local	float	___230_z	 %read{22,50} %write{14,14}
local	matrix	___230_M	 %read{56,56} %write{54,54}
local	vector	T	 %read{55,71} %write{2,57}
local	float	RoughnessU	 %read{71,71} %write{64,68}
local	float	RoughnessV	 %read{71,71} %write{66,70}
local	float	aniso	 %read{61,69} %write{60,60}
const	float	$const1	0		 %read{3,61} %write{2147483647,-1}
temp	int	$tmp1	 %read{4,4} %write{3,3}
const	float	$const2	2		 %read{5,5} %write{2147483647,-1}
temp	float	$tmp2	 %read{6,6} %write{5,5}
const	float	$const3	3.1415927		 %read{6,6} %write{2147483647,-1}
temp	float	$tmp3	 %read{10,10} %write{6,6}
const	point	$const4	0 0 0		 %read{8,57} %write{2147483647,-1}
const	string	$const5	"rotate"		 %read{7,7} %write{2147483647,-1}
temp	vector	$tmp5	 %read{9,9} %write{8,8}
const	float	$const6	1		 %read{11,69} %write{2147483647,-1}
const	int	$const7	0		 %read{12,12} %write{2147483647,-1}
const	int	$const8	1		 %read{13,13} %write{2147483647,-1}
const	int	$const9	2		 %read{14,14} %write{2147483647,-1}
temp	float	$tmp6	 %read{19,19} %write{15,15}
temp	float	$tmp7	 %read{17,17} %write{16,16}
temp	float	$tmp8	 %read{18,18} %write{17,17}
temp	float	$tmp9	 %read{19,19} %write{18,18}
temp	float	$tmp10	 %read{54,54} %write{19,19}
temp	float	$tmp11	 %read{21,21} %write{20,20}
temp	float	$tmp12	 %read{23,23} %write{21,21}
temp	float	$tmp13	 %read{23,23} %write{22,22}
temp	float	$tmp14	 %read{54,54} %write{23,23}
temp	float	$tmp15	 %read{25,25} %write{24,24}
temp	float	$tmp16	 %read{27,27} %write{25,25}
temp	float	$tmp17	 %read{27,27} %write{26,26}
temp	float	$tmp18	 %read{54,54} %write{27,27}
temp	float	$tmp19	 %read{29,29} %write{28,28}
temp	float	$tmp20	 %read{31,31} %write{29,29}
temp	float	$tmp21	 %read{31,31} %write{30,30}
temp	float	$tmp22	 %read{54,54} %write{31,31}
temp	float	$tmp23	 %read{36,36} %write{32,32}
temp	float	$tmp24	 %read{34,34} %write{33,33}
temp	float	$tmp25	 %read{35,35} %write{34,34}
temp	float	$tmp26	 %read{36,36} %write{35,35}
temp	float	$tmp27	 %read{54,54} %write{36,36}
temp	float	$tmp28	 %read{38,38} %write{37,37}
temp	float	$tmp29	 %read{40,40} %write{38,38}
temp	float	$tmp30	 %read{40,40} %write{39,39}
temp	float	$tmp31	 %read{54,54} %write{40,40}
temp	float	$tmp32	 %read{42,42} %write{41,41}
temp	float	$tmp33	 %read{44,44} %write{42,42}
temp	float	$tmp34	 %read{44,44} %write{43,43}
temp	float	$tmp35	 %read{54,54} %write{44,44}
temp	float	$tmp36	 %read{46,46} %write{45,45}
temp	float	$tmp37	 %read{48,48} %write{46,46}
temp	float	$tmp38	 %read{48,48} %write{47,47}
temp	float	$tmp39	 %read{54,54} %write{48,48}
temp	float	$tmp40	 %read{53,53} %write{49,49}
temp	float	$tmp41	 %read{51,51} %write{50,50}
temp	float	$tmp42	 %read{52,52} %write{51,51}
temp	float	$tmp43	 %read{53,53} %write{52,52}
temp	float	$tmp44	 %read{54,54} %write{53,53}
temp	vector	$tmp45	 %read{57,57} %write{56,56}
temp	vector	$tmp46	 %read{56,56} %write{55,55}
const	float	$const10	-0.99000001		 %read{60,60} %write{2147483647,-1}
const	float	$const11	0.99000001		 %read{59,59} %write{2147483647,-1}
const	string	$const12	"clamp"		 %read{58,58} %write{2147483647,-1}
temp	float	$tmp47	 %read{60,60} %write{59,59}
temp	int	$tmp48	 %read{62,62} %write{61,61}
temp	float	$tmp49	 %read{64,64} %write{63,63}
temp	float	$tmp50	 %read{66,66} %write{65,65}
temp	float	$tmp51	 %read{68,68} %write{67,67}
temp	float	$tmp52	 %read{70,70} %write{69,69}
temp	closure color	$tmp53	 %read{72,72} %write{71,71}
const	string	$const13	"ward"		 %read{71,71} %write{2147483647,-1}
code Normal
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:27
# 	normal Tangent = normalize(dPdu),
	assign		Normal N 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{27} %argrw{"wr"}
code Tangent
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:28
# 	output closure color BSDF = 0)
	normalize	Tangent dPdu 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{28} %argrw{"wr"}
code ___main___
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:32
# 
	assign		T Tangent 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{32} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:34
# 		T = rotate(T, Rotation*2.0*M_PI, point(0.0, 0.0, 0.0), Normal);
	neq		$tmp1 Rotation $const1 	%line{34} %argrw{"wrr"}
	if		$tmp1 58 58 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:35
# 
	mul		$tmp2 Rotation $const2 	%line{35} %argrw{"wrr"}
	mul		$tmp3 $tmp2 $const3 	%argrw{"wrr"}
	functioncall	$const5 58 	%argrw{"r"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:235
#         Kt = (1.0 - Kr) * eta*eta;
	sub		$tmp5 Normal $const4 	%filename{"D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{235} %argrw{"wrr"}
	normalize	___230_axis $tmp5 	%argrw{"wr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:237
#         // gives us the same result as if the shader-writer called refract()
	sincos		$tmp3 ___230_sinang ___230_cosang 	%line{237} %argrw{"rww"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:238
#         T = refract(I, N, eta);
	sub		___230_cosang1 $const6 ___230_cosang 	%line{238} %argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:239
#     } else {
	compref		___230_x ___230_axis $const7 	%line{239} %argrw{"wrr"}
	compref		___230_y ___230_axis $const8 	%argrw{"wrr"}
	compref		___230_z ___230_axis $const9 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:240
#         // total internal reflection
	mul		$tmp6 ___230_x ___230_x 	%line{240} %argrw{"wrr"}
	mul		$tmp7 ___230_x ___230_x 	%argrw{"wrr"}
	sub		$tmp8 $const6 $tmp7 	%argrw{"wrr"}
	mul		$tmp9 $tmp8 ___230_cosang 	%argrw{"wrr"}
	add		$tmp10 $tmp6 $tmp9 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:241
#         Kr = 1.0;
	mul		$tmp11 ___230_x ___230_y 	%line{241} %argrw{"wrr"}
	mul		$tmp12 $tmp11 ___230_cosang1 	%argrw{"wrr"}
	mul		$tmp13 ___230_z ___230_sinang 	%argrw{"wrr"}
	add		$tmp14 $tmp12 $tmp13 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:242
#         Kt = 0.0;
	mul		$tmp15 ___230_x ___230_z 	%line{242} %argrw{"wrr"}
	mul		$tmp16 $tmp15 ___230_cosang1 	%argrw{"wrr"}
	mul		$tmp17 ___230_y ___230_sinang 	%argrw{"wrr"}
	sub		$tmp18 $tmp16 $tmp17 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:244
#     }
	mul		$tmp19 ___230_x ___230_y 	%line{244} %argrw{"wrr"}
	mul		$tmp20 $tmp19 ___230_cosang1 	%argrw{"wrr"}
	mul		$tmp21 ___230_z ___230_sinang 	%argrw{"wrr"}
	sub		$tmp22 $tmp20 $tmp21 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:245
# }
	mul		$tmp23 ___230_y ___230_y 	%line{245} %argrw{"wrr"}
	mul		$tmp24 ___230_y ___230_y 	%argrw{"wrr"}
	sub		$tmp25 $const6 $tmp24 	%argrw{"wrr"}
	mul		$tmp26 $tmp25 ___230_cosang 	%argrw{"wrr"}
	add		$tmp27 $tmp23 $tmp26 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:246
# 
	mul		$tmp28 ___230_y ___230_z 	%line{246} %argrw{"wrr"}
	mul		$tmp29 $tmp28 ___230_cosang1 	%argrw{"wrr"}
	mul		$tmp30 ___230_x ___230_sinang 	%argrw{"wrr"}
	add		$tmp31 $tmp29 $tmp30 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:248
#               output float Kr, output float Kt)
	mul		$tmp32 ___230_x ___230_z 	%line{248} %argrw{"wrr"}
	mul		$tmp33 $tmp32 ___230_cosang1 	%argrw{"wrr"}
	mul		$tmp34 ___230_y ___230_sinang 	%argrw{"wrr"}
	add		$tmp35 $tmp33 $tmp34 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:249
# {
	mul		$tmp36 ___230_y ___230_z 	%line{249} %argrw{"wrr"}
	mul		$tmp37 $tmp36 ___230_cosang1 	%argrw{"wrr"}
	mul		$tmp38 ___230_x ___230_sinang 	%argrw{"wrr"}
	sub		$tmp39 $tmp37 $tmp38 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:250
#     vector R, T;
	mul		$tmp40 ___230_z ___230_z 	%line{250} %argrw{"wrr"}
	mul		$tmp41 ___230_z ___230_z 	%argrw{"wrr"}
	sub		$tmp42 $const6 $tmp41 	%argrw{"wrr"}
	mul		$tmp43 $tmp42 ___230_cosang 	%argrw{"wrr"}
	add		$tmp44 $tmp40 $tmp43 	%argrw{"wrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:252
# }
	matrix		___230_M $tmp10 $tmp14 $tmp18 $const1 $tmp22 $tmp27 $tmp31 $const1 $tmp35 $tmp39 $tmp44 $const1 $const1 $const1 $const1 $const6 	%line{252} %argrw{"wrrrrrrrrrrrrrrrr"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:253
# 
	sub		$tmp46 T $const4 	%line{253} %argrw{"wrr"}
	transformv	$tmp45 ___230_M $tmp46 	%argrw{"wrr"}
	add		T $tmp45 $const4 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:39
# 
	functioncall	$const12 61 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{39} %argrw{"r"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:142
# PERCOMP1 (log)
	min		$tmp47 Anisotropy $const11 	%filename{"D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{142} %argrw{"wrr"}
	max		aniso $tmp47 $const10 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:41
# 		RoughnessU = Roughness / (1.0 + aniso);
	lt		$tmp48 aniso $const1 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{41} %argrw{"wrr"}
	if		$tmp48 67 71 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:42
# 		RoughnessV = Roughness * (1.0 + aniso);
	add		$tmp49 $const6 aniso 	%line{42} %argrw{"wrr"}
	div		RoughnessU Roughness $tmp49 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:43
# 	}
	add		$tmp50 $const6 aniso 	%line{43} %argrw{"wrr"}
	mul		RoughnessV Roughness $tmp50 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:46
# 		RoughnessV = Roughness / (1.0 - aniso);
	sub		$tmp51 $const6 aniso 	%line{46} %argrw{"wrr"}
	mul		RoughnessU Roughness $tmp51 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:47
# 	}
	sub		$tmp52 $const6 aniso 	%line{47} %argrw{"wrr"}
	div		RoughnessV Roughness $tmp52 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:50
# }
	closure		$tmp53 $const13 Normal T RoughnessU RoughnessV 	%line{50} %argrw{"wrrrrr"}
	mul		BSDF $tmp53 Color 	%argrw{"wrr"}
	end
