OpenShadingLanguage 1.00
# Compiled by oslc 1.4.0
shader node_ward_bsdf
param	color	Color	0 0 0 		 %read{71,71} %write{2147483647,-1}
param	float	Roughness	0 		 %read{63,69} %write{2147483647,-1}
param	float	Anisotropy	0 		 %read{58,58} %write{2147483647,-1}
param	float	Rotation	0 		 %read{3,5} %write{2147483647,-1}
param	normal	Normal	0 0 0 		 %read{7,70} %write{0,0}
param	normal	Tangent	0 0 0 		 %read{2,2} %write{1,1}
oparam	closure color	BSDF			 %read{2147483647,-1} %write{71,71}
global	normal	N	 %read{0,0} %write{2147483647,-1}
global	vector	dPdu	 %read{1,1} %write{2147483647,-1}
local	vector	___233_axis	 %read{11,13} %write{8,8}
local	float	___233_cosang	 %read{10,51} %write{9,9}
local	float	___233_sinang	 %read{21,46} %write{9,9}
local	float	___233_cosang1	 %read{20,45} %write{10,10}
local	float	___233_x	 %read{14,46} %write{11,11}
local	float	___233_y	 %read{19,44} %write{12,12}
local	float	___233_z	 %read{21,49} %write{13,13}
local	matrix	___233_M	 %read{55,55} %write{53,53}
local	vector	T	 %read{54,70} %write{2,56}
local	float	RoughnessU	 %read{70,70} %write{63,67}
local	float	RoughnessV	 %read{70,70} %write{65,69}
local	float	aniso	 %read{60,68} %write{59,59}
const	float	$const1	0		 %read{3,60} %write{2147483647,-1}
temp	int	$tmp1	 %read{4,4} %write{3,3}
const	float	$const2	6.2831855		 %read{5,5} %write{2147483647,-1}
temp	float	$tmp2	 %read{9,9} %write{5,5}
const	point	$const3	0 0 0		 %read{7,56} %write{2147483647,-1}
const	string	$const4	"rotate"		 %read{6,6} %write{2147483647,-1}
temp	vector	$tmp4	 %read{8,8} %write{7,7}
const	float	$const5	1		 %read{10,68} %write{2147483647,-1}
const	int	$const6	0		 %read{11,11} %write{2147483647,-1}
const	int	$const7	1		 %read{12,12} %write{2147483647,-1}
const	int	$const8	2		 %read{13,13} %write{2147483647,-1}
temp	float	$tmp5	 %read{18,18} %write{14,14}
temp	float	$tmp6	 %read{16,16} %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{53,53} %write{18,18}
temp	float	$tmp10	 %read{20,20} %write{19,19}
temp	float	$tmp11	 %read{22,22} %write{20,20}
temp	float	$tmp12	 %read{22,22} %write{21,21}
temp	float	$tmp13	 %read{53,53} %write{22,22}
temp	float	$tmp14	 %read{24,24} %write{23,23}
temp	float	$tmp15	 %read{26,26} %write{24,24}
temp	float	$tmp16	 %read{26,26} %write{25,25}
temp	float	$tmp17	 %read{53,53} %write{26,26}
temp	float	$tmp18	 %read{28,28} %write{27,27}
temp	float	$tmp19	 %read{30,30} %write{28,28}
temp	float	$tmp20	 %read{30,30} %write{29,29}
temp	float	$tmp21	 %read{53,53} %write{30,30}
temp	float	$tmp22	 %read{35,35} %write{31,31}
temp	float	$tmp23	 %read{33,33} %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{53,53} %write{35,35}
temp	float	$tmp27	 %read{37,37} %write{36,36}
temp	float	$tmp28	 %read{39,39} %write{37,37}
temp	float	$tmp29	 %read{39,39} %write{38,38}
temp	float	$tmp30	 %read{53,53} %write{39,39}
temp	float	$tmp31	 %read{41,41} %write{40,40}
temp	float	$tmp32	 %read{43,43} %write{41,41}
temp	float	$tmp33	 %read{43,43} %write{42,42}
temp	float	$tmp34	 %read{53,53} %write{43,43}
temp	float	$tmp35	 %read{45,45} %write{44,44}
temp	float	$tmp36	 %read{47,47} %write{45,45}
temp	float	$tmp37	 %read{47,47} %write{46,46}
temp	float	$tmp38	 %read{53,53} %write{47,47}
temp	float	$tmp39	 %read{52,52} %write{48,48}
temp	float	$tmp40	 %read{50,50} %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	vector	$tmp44	 %read{56,56} %write{55,55}
temp	vector	$tmp45	 %read{55,55} %write{54,54}
const	float	$const9	-0.99000001		 %read{59,59} %write{2147483647,-1}
const	float	$const10	0.99000001		 %read{58,58} %write{2147483647,-1}
const	string	$const11	"clamp"		 %read{57,57} %write{2147483647,-1}
temp	float	$tmp46	 %read{59,59} %write{58,58}
temp	int	$tmp47	 %read{61,61} %write{60,60}
temp	float	$tmp48	 %read{63,63} %write{62,62}
temp	float	$tmp49	 %read{65,65} %write{64,64}
temp	float	$tmp50	 %read{67,67} %write{66,66}
temp	float	$tmp51	 %read{69,69} %write{68,68}
temp	closure color	$tmp52	 %read{71,71} %write{70,70}
const	string	$const12	"ward"		 %read{70,70} %write{2147483647,-1}
code Normal
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:25
# 	normal Tangent = normalize(dPdu),
	assign		Normal N 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{25} %argrw{"wr"}
code Tangent
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:26
# 	output closure color BSDF = 0)
	normalize	Tangent dPdu 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{26} %argrw{"wr"}
code ___main___
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:30
# 
	assign		T Tangent 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{30} %argrw{"wr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:32
# 		T = rotate(T, Rotation * M_2PI, point(0.0, 0.0, 0.0), Normal);
	neq		$tmp1 Rotation $const1 	%line{32} %argrw{"wrr"}
	if		$tmp1 57 57 	%argrw{"r"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:33
# 
	mul		$tmp2 Rotation $const2 	%line{33} %argrw{"wrr"}
	functioncall	$const4 57 	%argrw{"r"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:250
#         // gives us the same result as if the shader-writer called refract()
	sub		$tmp4 Normal $const3 	%filename{"D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{250} %argrw{"wrr"}
	normalize	___233_axis $tmp4 	%argrw{"wr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:252
#     } else {
	sincos		$tmp2 ___233_sinang ___233_cosang 	%line{252} %argrw{"rww"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:253
#         // total internal reflection
	sub		___233_cosang1 $const5 ___233_cosang 	%line{253} %argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:254
#         Kr = 1.0;
	compref		___233_x ___233_axis $const6 	%line{254} %argrw{"wrr"}
	compref		___233_y ___233_axis $const7 	%argrw{"wrr"}
	compref		___233_z ___233_axis $const8 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:255
#         Kt = 0.0;
	mul		$tmp5 ___233_x ___233_x 	%line{255} %argrw{"wrr"}
	mul		$tmp6 ___233_x ___233_x 	%argrw{"wrr"}
	sub		$tmp7 $const5 $tmp6 	%argrw{"wrr"}
	mul		$tmp8 $tmp7 ___233_cosang 	%argrw{"wrr"}
	add		$tmp9 $tmp5 $tmp8 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:256
#         T = vector (0,0,0);
	mul		$tmp10 ___233_x ___233_y 	%line{256} %argrw{"wrr"}
	mul		$tmp11 $tmp10 ___233_cosang1 	%argrw{"wrr"}
	mul		$tmp12 ___233_z ___233_sinang 	%argrw{"wrr"}
	add		$tmp13 $tmp11 $tmp12 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:257
#     }
	mul		$tmp14 ___233_x ___233_z 	%line{257} %argrw{"wrr"}
	mul		$tmp15 $tmp14 ___233_cosang1 	%argrw{"wrr"}
	mul		$tmp16 ___233_y ___233_sinang 	%argrw{"wrr"}
	sub		$tmp17 $tmp15 $tmp16 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:259
# 
	mul		$tmp18 ___233_x ___233_y 	%line{259} %argrw{"wrr"}
	mul		$tmp19 $tmp18 ___233_cosang1 	%argrw{"wrr"}
	mul		$tmp20 ___233_z ___233_sinang 	%argrw{"wrr"}
	sub		$tmp21 $tmp19 $tmp20 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:260
# void fresnel (vector I, normal N, float eta,
	mul		$tmp22 ___233_y ___233_y 	%line{260} %argrw{"wrr"}
	mul		$tmp23 ___233_y ___233_y 	%argrw{"wrr"}
	sub		$tmp24 $const5 $tmp23 	%argrw{"wrr"}
	mul		$tmp25 $tmp24 ___233_cosang 	%argrw{"wrr"}
	add		$tmp26 $tmp22 $tmp25 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:261
#               output float Kr, output float Kt)
	mul		$tmp27 ___233_y ___233_z 	%line{261} %argrw{"wrr"}
	mul		$tmp28 $tmp27 ___233_cosang1 	%argrw{"wrr"}
	mul		$tmp29 ___233_x ___233_sinang 	%argrw{"wrr"}
	add		$tmp30 $tmp28 $tmp29 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:263
#     vector R, T;
	mul		$tmp31 ___233_x ___233_z 	%line{263} %argrw{"wrr"}
	mul		$tmp32 $tmp31 ___233_cosang1 	%argrw{"wrr"}
	mul		$tmp33 ___233_y ___233_sinang 	%argrw{"wrr"}
	add		$tmp34 $tmp32 $tmp33 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:264
#     fresnel(I, N, eta, Kr, Kt, R, T);
	mul		$tmp35 ___233_y ___233_z 	%line{264} %argrw{"wrr"}
	mul		$tmp36 $tmp35 ___233_cosang1 	%argrw{"wrr"}
	mul		$tmp37 ___233_x ___233_sinang 	%argrw{"wrr"}
	sub		$tmp38 $tmp36 $tmp37 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:265
# }
	mul		$tmp39 ___233_z ___233_z 	%line{265} %argrw{"wrr"}
	mul		$tmp40 ___233_z ___233_z 	%argrw{"wrr"}
	sub		$tmp41 $const5 $tmp40 	%argrw{"wrr"}
	mul		$tmp42 $tmp41 ___233_cosang 	%argrw{"wrr"}
	add		$tmp43 $tmp39 $tmp42 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:267
# 
	matrix		___233_M $tmp9 $tmp13 $tmp17 $const1 $tmp21 $tmp26 $tmp30 $const1 $tmp34 $tmp38 $tmp43 $const1 $const1 $const1 $const1 $const5 	%line{267} %argrw{"wrrrrrrrrrrrrrrrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:268
# normal transform (matrix Mto, normal p) BUILTIN;
	sub		$tmp45 T $const3 	%line{268} %argrw{"wrr"}
	transformv	$tmp44 ___233_M $tmp45 	%argrw{"wrr"}
	add		T $tmp44 $const3 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:37
# 
	functioncall	$const11 60 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{37} %argrw{"r"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h:144
# float  log (float a,  float b) { return log(a)/log(b); }
	min		$tmp46 Anisotropy $const10 	%filename{"D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{144} %argrw{"wrr"}
	max		aniso $tmp46 $const9 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:39
# 		RoughnessU = Roughness / (1.0 + aniso);
	lt		$tmp47 aniso $const1 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl"} %line{39} %argrw{"wrr"}
	if		$tmp47 66 70 	%argrw{"r"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:40
# 		RoughnessV = Roughness * (1.0 + aniso);
	add		$tmp48 $const5 aniso 	%line{40} %argrw{"wrr"}
	div		RoughnessU Roughness $tmp48 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:41
# 	}
	add		$tmp49 $const5 aniso 	%line{41} %argrw{"wrr"}
	mul		RoughnessV Roughness $tmp49 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:44
# 		RoughnessV = Roughness / (1.0 - aniso);
	sub		$tmp50 $const5 aniso 	%line{44} %argrw{"wrr"}
	mul		RoughnessU Roughness $tmp50 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:45
# 	}
	sub		$tmp51 $const5 aniso 	%line{45} %argrw{"wrr"}
	div		RoughnessV Roughness $tmp51 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_ward_bsdf.osl:48
# }
	closure		$tmp52 $const12 Normal T RoughnessU RoughnessV 	%line{48} %argrw{"wrrrrr"}
	mul		BSDF $tmp52 Color 	%argrw{"wrr"}
	end
