OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface maya_bump2d
param	float	bumpValue	0		%read{9,9} %write{2147483647,-1} %derivs
param	float	bumpDepth	1		%read{8,9} %write{2147483647,-1} %derivs
param	float	bumpInterp	0		%read{4,6} %write{2147483647,-1}
param	float	bumpFilter	0		%read{2147483647,-1} %write{2147483647,-1}
param	float	bumpFilterOffset	0		%read{2147483647,-1} %write{2147483647,-1}
param	normal	normalCamera	0 0 0		%read{25,70} %write{0,0} %initexpr
param	normal	bumpNormal	0 0 0		%read{33,81} %write{1,1} %initexpr
param	vector	stangent	0 0 0		%read{40,42} %write{2147483647,-1}
param	float	s	0		%read{15,59} %write{2,2} %derivs %initexpr
param	float	t	0		%read{15,47} %write{3,3} %derivs %initexpr
oparam	normal	outNormal	0 0 1		%read{80,83} %write{79,83}
global	vector	I	%read{25,25} %write{2147483647,-1}
global	normal	N	%read{0,1} %write{2147483647,-1}
global	float	u	%read{2,60} %write{2147483647,-1} %derivs
global	float	v	%read{3,3} %write{2147483647,-1} %derivs
global	vector	dPdu	%read{46,58} %write{2147483647,-1}
global	vector	dPdv	%read{50,62} %write{2147483647,-1}
local	normal	___291__bumpNormal	%read{18,76} %write{17,39}
local	float	___292_depth	%read{10,12} %write{8,8} %derivs
local	float	___292_offset	%read{14,14} %write{13,13} %derivs
local	point	___292_pb	%read{16,16} %write{15,15} %derivs
local	float	___294_flip	%read{34,37} %write{32,32}
local	vector	___291_udir	%read{64,68} %write{54,67}
local	vector	___291_vdir	%read{52,69} %write{42,53}
local	vector	___291_uorient	%read{64,64} %write{63,63}
local	vector	___291_basisx	%read{72,72} %write{68,68}
local	vector	___291_basisy	%read{74,74} %write{69,69}
local	vector	___291_basisz	%read{77,77} %write{70,70}
const	int	$const1	1		%read{4,73} %write{2147483647,-1}
temp	int	$tmp1	%read{5,5} %write{4,4}
const	int	$const2	0		%read{6,71} %write{2147483647,-1}
temp	int	$tmp2	%read{7,7} %write{6,6}
temp	float	$tmp3	%read{12,12} %write{9,9} %derivs
temp	float	$tmp4	%read{13,13} %write{10,10} %derivs
const	string	$const3	"clamp"		%read{11,11} %write{2147483647,-1}
temp	float	$tmp5	%read{13,13} %write{12,12} %derivs
const	float	$const4	0.039999999		%read{14,14} %write{2147483647,-1}
temp	float	$tmp6	%read{15,15} %write{14,14} %derivs
temp	vector	$tmp7	%read{17,17} %write{16,16}
const	int	$const5	2		%read{19,76} %write{2147483647,-1}
temp	float	$tmp8	%read{20,20} %write{19,19}
temp	int	$tmp9	%read{21,21} %write{20,20}
temp	float	$tmp10	%read{23,23} %write{22,22}
temp	float	$tmp11	%read{24,24} %write{23,23}
temp	float	$tmp12	%read{27,27} %write{26,26}
temp	float	$tmp13	%read{26,26} %write{25,25}
temp	float	$tmp14	%read{32,32} %write{27,27}
temp	int	$tmp15	%read{29,29} %write{28,28}
temp	int	$tmp16	%read{30,30} %write{29,29}
temp	int	$tmp17	%read{31,31} %write{30,30}
temp	float	$tmp18	%read{32,32} %write{31,31}
temp	float	$tmp19	%read{34,34} %write{33,33}
temp	float	$tmp20	%read{35,35} %write{34,34}
temp	float	$tmp21	%read{37,37} %write{36,36}
temp	float	$tmp22	%read{38,38} %write{37,37}
const	float	$const6	0.5		%read{39,81} %write{2147483647,-1}
temp	int	$tmp23	%read{41,41} %write{40,40}
temp	float	$tmp24	%read{45,45} %write{43,43}
temp	float	$tmp25	%read{45,45} %write{44,44}
temp	float	$tmp26	%read{46,46} %write{45,45}
temp	vector	$tmp27	%read{51,51} %write{46,46}
temp	float	$tmp28	%read{49,49} %write{47,47}
temp	float	$tmp29	%read{49,49} %write{48,48}
temp	float	$tmp30	%read{50,50} %write{49,49}
temp	vector	$tmp31	%read{51,51} %write{50,50}
temp	vector	$tmp32	%read{53,53} %write{52,52}
temp	float	$tmp33	%read{57,57} %write{55,55}
temp	float	$tmp34	%read{57,57} %write{56,56}
temp	float	$tmp35	%read{58,58} %write{57,57}
temp	vector	$tmp36	%read{63,63} %write{58,58}
temp	float	$tmp37	%read{61,61} %write{59,59}
temp	float	$tmp38	%read{61,61} %write{60,60}
temp	float	$tmp39	%read{62,62} %write{61,61}
temp	vector	$tmp40	%read{63,63} %write{62,62}
temp	float	$tmp41	%read{65,65} %write{64,64}
temp	int	$tmp42	%read{66,66} %write{65,65}
temp	float	$tmp43	%read{72,72} %write{71,71}
temp	vector	$tmp44	%read{75,75} %write{72,72}
temp	float	$tmp45	%read{74,74} %write{73,73}
temp	vector	$tmp46	%read{75,75} %write{74,74}
temp	vector	$tmp47	%read{78,78} %write{75,75}
temp	float	$tmp48	%read{77,77} %write{76,76}
temp	vector	$tmp49	%read{78,78} %write{77,77}
temp	vector	$tmp50	%read{79,79} %write{78,78}
const	string	$const7	"object"		%read{82,82} %write{2147483647,-1}
const	string	$const8	"current"		%read{82,82} %write{2147483647,-1}
temp	normal	$tmp51	%read{82,82} %write{81,81}
code normalCamera
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:11
# 	normal bumpNormal = N,
	assign		normalCamera N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl"} %line{11} %argrw{"wr"}
code bumpNormal
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:12
# 	vector stangent = 0,
	assign		bumpNormal N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl"} %line{12} %argrw{"wr"}
code s
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:14
# 
	assign		s u 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl"} %line{14} %argrw{"wr"}
code t
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:14
# 
	assign		t v 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl"} %line{14} %argrw{"wr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:20
# 	{
	le		$tmp1 bumpInterp $const1 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl"} %line{20} %argrw{"wrr"}
	if		$tmp1 81 84 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:23
# 		{
	eq		$tmp2 bumpInterp $const2 	%line{23} %argrw{"wrr"}
	if		$tmp2 39 40 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:26
# 			float offset = clamp( bumpValue * bumpDepth, -depth, depth );
	abs		___292_depth bumpDepth 	%line{26} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:27
# 			point pb = point( s, t, 0.04 * offset );
	mul		$tmp3 bumpValue bumpDepth 	%line{27} %argrw{"wrr"}
	neg		$tmp4 ___292_depth 	%argrw{"wr"}
	functioncall	$const3 14 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:144
# PERCOMP1 (fabs)
	min		$tmp5 $tmp3 ___292_depth 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{144} %argrw{"wrr"}
	max		___292_offset $tmp5 $tmp4 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:28
# 			_bumpNormal = normalize( calculatenormal( pb ) );
	mul		$tmp6 $const4 ___292_offset 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl"} %line{28} %argrw{"wrr"}
	point		___292_pb s t $tmp6 	%argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:29
# 
	calculatenormal	$tmp7 ___292_pb 	%line{29} %argrw{"wr"} %argderivs{1}
	normalize	___291__bumpNormal $tmp7 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:36
# 			if( _bumpNormal[2] < 0 )
	neg		___291__bumpNormal ___291__bumpNormal 	%line{36} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:37
# 			{
	compref		$tmp8 ___291__bumpNormal $const5 	%line{37} %argrw{"wrr"}
	lt		$tmp9 $tmp8 $const2 	%argrw{"wrr"}
	if		$tmp9 25 39 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:39
# 			}
	compref		$tmp10 ___291__bumpNormal $const5 	%line{39} %argrw{"wrr"}
	neg		$tmp11 $tmp10 	%argrw{"wr"}
	compassign	___291__bumpNormal $const5 $tmp11 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:43
# 
	dot		$tmp13 normalCamera I 	%line{43} %argrw{"wrr"}
	sign		$tmp12 $tmp13 	%argrw{"wr"}
	neg		$tmp14 $tmp12 	%argrw{"wr"}
	backfacing	$tmp15 	%argrw{"w"}
	mul		$tmp16 $const5 $tmp15 	%argrw{"wrr"}
	sub		$tmp17 $const1 $tmp16 	%argrw{"wrr"}
	assign		$tmp18 $tmp17 	%argrw{"wr"}
	mul		___294_flip $tmp14 $tmp18 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:45
# 				_bumpNormal[1] = flip * bumpNormal[1];
	compref		$tmp19 bumpNormal $const2 	%line{45} %argrw{"wrr"}
	mul		$tmp20 ___294_flip $tmp19 	%argrw{"wrr"}
	compassign	___291__bumpNormal $const2 $tmp20 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:46
# 			}
	compref		$tmp21 bumpNormal $const1 	%line{46} %argrw{"wrr"}
	mul		$tmp22 ___294_flip $tmp21 	%argrw{"wrr"}
	compassign	___291__bumpNormal $const1 $tmp22 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:52
# 		}
	sub		___291__bumpNormal bumpNormal $const6 	%line{52} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:57
# 		{
	neq		$tmp23 stangent $const2 	%line{57} %argrw{"wrr"}
	if		$tmp23 43 54 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:59
# 		}
	cross		___291_vdir stangent normalCamera 	%line{59} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:63
# 			vdir = cross (normalCamera,  cross(vdir, normalCamera));
	Dx		$tmp24 t 	%line{63} %argrw{"wr"} %argderivs{1}
	Dx		$tmp25 u 	%argrw{"wr"} %argderivs{1}
	div		$tmp26 $tmp24 $tmp25 	%argrw{"wrr"}
	mul		$tmp27 $tmp26 dPdu 	%argrw{"wrr"}
	Dy		$tmp28 t 	%argrw{"wr"} %argderivs{1}
	Dy		$tmp29 u 	%argrw{"wr"} %argderivs{1}
	div		$tmp30 $tmp28 $tmp29 	%argrw{"wrr"}
	mul		$tmp31 $tmp30 dPdv 	%argrw{"wrr"}
	add		___291_vdir $tmp27 $tmp31 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:64
# 		}
	cross		$tmp32 ___291_vdir normalCamera 	%line{64} %argrw{"wrr"}
	cross		___291_vdir normalCamera $tmp32 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:67
# 		vector uorient = Dx(s)/Dx(u) * dPdu + Dy(s)/Dy(u) * dPdv;
	cross		___291_udir normalCamera ___291_vdir 	%line{67} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:68
# 		if( dot(udir,uorient) < 0 )
	Dx		$tmp33 s 	%line{68} %argrw{"wr"} %argderivs{1}
	Dx		$tmp34 u 	%argrw{"wr"} %argderivs{1}
	div		$tmp35 $tmp33 $tmp34 	%argrw{"wrr"}
	mul		$tmp36 $tmp35 dPdu 	%argrw{"wrr"}
	Dy		$tmp37 s 	%argrw{"wr"} %argderivs{1}
	Dy		$tmp38 u 	%argrw{"wr"} %argderivs{1}
	div		$tmp39 $tmp37 $tmp38 	%argrw{"wrr"}
	mul		$tmp40 $tmp39 dPdv 	%argrw{"wrr"}
	add		___291_uorient $tmp36 $tmp40 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:69
# 		{
	dot		$tmp41 ___291_udir ___291_uorient 	%line{69} %argrw{"wrr"}
	lt		$tmp42 $tmp41 $const2 	%argrw{"wrr"}
	if		$tmp42 68 68 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:71
# 		}
	neg		___291_udir ___291_udir 	%line{71} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:74
# 		vector basisy = normalize(vdir);
	normalize	___291_basisx ___291_udir 	%line{74} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:75
# 		vector basisz = normalize(normalCamera);
	normalize	___291_basisy ___291_vdir 	%line{75} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:76
# 
	normalize	___291_basisz normalCamera 	%line{76} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:79
# 			_bumpNormal[1] * basisy +
	compref		$tmp43 ___291__bumpNormal $const2 	%line{79} %argrw{"wrr"}
	mul		$tmp44 $tmp43 ___291_basisx 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:80
# 			_bumpNormal[2] * basisz );
	compref		$tmp45 ___291__bumpNormal $const1 	%line{80} %argrw{"wrr"}
	mul		$tmp46 $tmp45 ___291_basisy 	%argrw{"wrr"}
	add		$tmp47 $tmp44 $tmp46 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:81
# 
	compref		$tmp48 ___291__bumpNormal $const5 	%line{81} %argrw{"wrr"}
	mul		$tmp49 $tmp48 ___291_basisz 	%argrw{"wrr"}
	add		$tmp50 $tmp47 $tmp49 	%argrw{"wrr"}
	assign		outNormal $tmp50 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:83
# 	}
	normalize	outNormal outNormal 	%line{83} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:88
# 		outNormal = normalize(outNormal);
	sub		$tmp51 bumpNormal $const6 	%line{88} %argrw{"wrr"}
	transformn	outNormal $const7 $const8 $tmp51 	%argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_bump2d.osl:89
# 	}
	normalize	outNormal outNormal 	%line{89} %argrw{"wr"}
	end
