OpenShadingLanguage 1.00
# Compiled by oslc 1.3.0
shader node_magic_texture
param	int	use_mapping	0 		 %read{2,2} %write{2147483647,-1}
param	matrix	mapping	0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0		 %read{3,3} %write{2147483647,-1}
param	int	Depth	2 		 %read{31,98} %write{2147483647,-1}
param	float	Distortion	5 		 %read{6,6} %write{2147483647,-1}
param	float	Scale	5 		 %read{4,4} %write{2147483647,-1}
param	point	Vector	0 0 0 		 %read{1,1} %write{0,0}
oparam	color	Color	0 0 0 		 %read{2147483647,-1} %write{114,114}
global	point	P	 %read{0,0} %write{2147483647,-1}
local	float	___333_dist	 %read{33,110} %write{6,107}
local	float	___333_x	 %read{33,111} %write{13,108}
local	float	___333_y	 %read{34,112} %write{21,109}
local	float	___333_z	 %read{35,113} %write{30,110}
local	point	p	 %read{3,4} %write{1,3}
temp	point	$tmp1	 %read{7,26} %write{4,4}
const	string	$const1	"magic"		 %read{5,5} %write{2147483647,-1}
const	int	$const2	0		 %read{7,31} %write{2147483647,-1}
temp	float	$tmp2	 %read{9,9} %write{7,7}
const	int	$const3	1		 %read{8,41} %write{2147483647,-1}
temp	float	$tmp3	 %read{9,9} %write{8,8}
temp	float	$tmp4	 %read{11,11} %write{9,9}
const	int	$const4	2		 %read{10,47} %write{2147483647,-1}
temp	float	$tmp5	 %read{11,11} %write{10,10}
temp	float	$tmp6	 %read{12,12} %write{11,11}
const	float	$const5	5		 %read{12,28} %write{2147483647,-1}
temp	float	$tmp7	 %read{13,13} %write{12,12}
temp	float	$tmp8	 %read{15,15} %write{14,14}
temp	float	$tmp9	 %read{17,17} %write{15,15}
temp	float	$tmp10	 %read{17,17} %write{16,16}
temp	float	$tmp11	 %read{19,19} %write{17,17}
temp	float	$tmp12	 %read{19,19} %write{18,18}
temp	float	$tmp13	 %read{20,20} %write{19,19}
temp	float	$tmp14	 %read{21,21} %write{20,20}
temp	float	$tmp15	 %read{30,30} %write{29,29}
temp	float	$tmp16	 %read{23,23} %write{22,22}
temp	float	$tmp17	 %read{25,25} %write{23,23}
temp	float	$tmp18	 %read{25,25} %write{24,24}
temp	float	$tmp19	 %read{27,27} %write{25,25}
temp	float	$tmp20	 %read{27,27} %write{26,26}
temp	float	$tmp21	 %read{28,28} %write{27,27}
temp	float	$tmp22	 %read{29,29} %write{28,28}
temp	int	$tmp23	 %read{32,32} %write{31,31}
temp	float	$tmp24	 %read{39,39} %write{38,38}
temp	float	$tmp25	 %read{37,37} %write{36,36}
temp	float	$tmp26	 %read{38,38} %write{37,37}
temp	int	$tmp27	 %read{42,42} %write{41,41}
temp	float	$tmp28	 %read{44,44} %write{43,43}
temp	float	$tmp29	 %read{45,45} %write{44,44}
temp	int	$tmp30	 %read{48,48} %write{47,47}
temp	float	$tmp31	 %read{50,50} %write{49,49}
temp	float	$tmp32	 %read{51,51} %write{50,50}
temp	float	$tmp33	 %read{52,52} %write{51,51}
const	int	$const6	3		 %read{54,54} %write{2147483647,-1}
temp	int	$tmp34	 %read{55,55} %write{54,54}
temp	float	$tmp35	 %read{60,60} %write{59,59}
temp	float	$tmp36	 %read{57,57} %write{56,56}
temp	float	$tmp37	 %read{58,58} %write{57,57}
temp	float	$tmp38	 %read{59,59} %write{58,58}
const	int	$const7	4		 %read{62,62} %write{2147483647,-1}
temp	int	$tmp39	 %read{63,63} %write{62,62}
temp	float	$tmp40	 %read{68,68} %write{67,67}
temp	float	$tmp41	 %read{65,65} %write{64,64}
temp	float	$tmp42	 %read{66,66} %write{65,65}
temp	float	$tmp43	 %read{67,67} %write{66,66}
const	int	$const8	5		 %read{70,70} %write{2147483647,-1}
temp	int	$tmp44	 %read{71,71} %write{70,70}
temp	float	$tmp45	 %read{76,76} %write{75,75}
temp	float	$tmp46	 %read{73,73} %write{72,72}
temp	float	$tmp47	 %read{74,74} %write{73,73}
temp	float	$tmp48	 %read{75,75} %write{74,74}
const	int	$const9	6		 %read{78,78} %write{2147483647,-1}
temp	int	$tmp49	 %read{79,79} %write{78,78}
temp	float	$tmp50	 %read{81,81} %write{80,80}
temp	float	$tmp51	 %read{82,82} %write{81,81}
const	int	$const10	7		 %read{84,84} %write{2147483647,-1}
temp	int	$tmp52	 %read{85,85} %write{84,84}
temp	float	$tmp53	 %read{87,87} %write{86,86}
temp	float	$tmp54	 %read{88,88} %write{87,87}
const	int	$const11	8		 %read{90,90} %write{2147483647,-1}
temp	int	$tmp55	 %read{91,91} %write{90,90}
temp	float	$tmp56	 %read{96,96} %write{95,95}
temp	float	$tmp57	 %read{93,93} %write{92,92}
temp	float	$tmp58	 %read{94,94} %write{93,93}
temp	float	$tmp59	 %read{95,95} %write{94,94}
const	int	$const12	9		 %read{98,98} %write{2147483647,-1}
temp	int	$tmp60	 %read{99,99} %write{98,98}
temp	float	$tmp61	 %read{103,103} %write{102,102}
temp	float	$tmp62	 %read{101,101} %write{100,100}
temp	float	$tmp63	 %read{102,102} %write{101,101}
const	float	$const13	0		 %read{105,105} %write{2147483647,-1}
temp	int	$tmp64	 %read{106,106} %write{105,105}
const	float	$const14	2		 %read{107,107} %write{2147483647,-1}
const	float	$const15	0.5		 %read{111,113} %write{2147483647,-1}
temp	float	$tmp65	 %read{114,114} %write{111,111}
temp	float	$tmp66	 %read{114,114} %write{112,112}
temp	float	$tmp67	 %read{114,114} %write{113,113}
code Vector
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:102
# 	output color Color = 0.0)
	assign		Vector P 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl"} %line{102} %argrw{"wr"}
code ___main___
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:105
# 
	assign		p Vector 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl"} %line{105} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:107
# 		p = transform(mapping, p);
	if		use_mapping 4 4 	%line{107} %argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:108
# 
	transform	p mapping p 	%line{108} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:110
# }
	mul		$tmp1 p Scale 	%line{110} %argrw{"wrr"}
	functioncall	$const1 115 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:27
# 
	assign		___333_dist Distortion 	%line{27} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:29
# 	float y =  cos((-p[0] + p[1] - p[2]) * 5.0);
	compref		$tmp2 $tmp1 $const2 	%line{29} %argrw{"wrr"}
	compref		$tmp3 $tmp1 $const3 	%argrw{"wrr"}
	add		$tmp4 $tmp2 $tmp3 	%argrw{"wrr"}
	compref		$tmp5 $tmp1 $const4 	%argrw{"wrr"}
	add		$tmp6 $tmp4 $tmp5 	%argrw{"wrr"}
	mul		$tmp7 $tmp6 $const5 	%argrw{"wrr"}
	sin		___333_x $tmp7 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:30
# 	float z = -cos((-p[0] - p[1] + p[2]) * 5.0);
	compref		$tmp8 $tmp1 $const2 	%line{30} %argrw{"wrr"}
	neg		$tmp9 $tmp8 	%argrw{"wr"}
	compref		$tmp10 $tmp1 $const3 	%argrw{"wrr"}
	add		$tmp11 $tmp9 $tmp10 	%argrw{"wrr"}
	compref		$tmp12 $tmp1 $const4 	%argrw{"wrr"}
	sub		$tmp13 $tmp11 $tmp12 	%argrw{"wrr"}
	mul		$tmp14 $tmp13 $const5 	%argrw{"wrr"}
	cos		___333_y $tmp14 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:31
# 
	compref		$tmp16 $tmp1 $const2 	%line{31} %argrw{"wrr"}
	neg		$tmp17 $tmp16 	%argrw{"wr"}
	compref		$tmp18 $tmp1 $const3 	%argrw{"wrr"}
	sub		$tmp19 $tmp17 $tmp18 	%argrw{"wrr"}
	compref		$tmp20 $tmp1 $const4 	%argrw{"wrr"}
	add		$tmp21 $tmp19 $tmp20 	%argrw{"wrr"}
	mul		$tmp22 $tmp21 $const5 	%argrw{"wrr"}
	cos		$tmp15 $tmp22 	%argrw{"wr"}
	neg		___333_z $tmp15 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:33
# 		x *= dist;
	gt		$tmp23 Depth $const2 	%line{33} %argrw{"wrr"}
	if		$tmp23 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:34
# 		y *= dist;
	mul		___333_x ___333_x ___333_dist 	%line{34} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:35
# 		z *= dist;
	mul		___333_y ___333_y ___333_dist 	%line{35} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:36
# 		y = -cos(x - y + z);
	mul		___333_z ___333_z ___333_dist 	%line{36} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:37
# 		y *= dist;
	sub		$tmp25 ___333_x ___333_y 	%line{37} %argrw{"wrr"}
	add		$tmp26 $tmp25 ___333_z 	%argrw{"wrr"}
	cos		$tmp24 $tmp26 	%argrw{"wr"}
	neg		___333_y $tmp24 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:38
# 
	mul		___333_y ___333_y ___333_dist 	%line{38} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:40
# 			x = cos(x - y - z);
	gt		$tmp27 Depth $const3 	%line{40} %argrw{"wrr"}
	if		$tmp27 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:41
# 			x *= dist;
	sub		$tmp28 ___333_x ___333_y 	%line{41} %argrw{"wrr"}
	sub		$tmp29 $tmp28 ___333_z 	%argrw{"wrr"}
	cos		___333_x $tmp29 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:42
# 
	mul		___333_x ___333_x ___333_dist 	%line{42} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:44
# 				z = sin(-x - y - z);
	gt		$tmp30 Depth $const4 	%line{44} %argrw{"wrr"}
	if		$tmp30 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:45
# 				z *= dist;
	neg		$tmp31 ___333_x 	%line{45} %argrw{"wr"}
	sub		$tmp32 $tmp31 ___333_y 	%argrw{"wrr"}
	sub		$tmp33 $tmp32 ___333_z 	%argrw{"wrr"}
	sin		___333_z $tmp33 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:46
# 
	mul		___333_z ___333_z ___333_dist 	%line{46} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:48
# 					x = -cos(-x + y - z);
	gt		$tmp34 Depth $const6 	%line{48} %argrw{"wrr"}
	if		$tmp34 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:49
# 					x *= dist;
	neg		$tmp36 ___333_x 	%line{49} %argrw{"wr"}
	add		$tmp37 $tmp36 ___333_y 	%argrw{"wrr"}
	sub		$tmp38 $tmp37 ___333_z 	%argrw{"wrr"}
	cos		$tmp35 $tmp38 	%argrw{"wr"}
	neg		___333_x $tmp35 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:50
# 
	mul		___333_x ___333_x ___333_dist 	%line{50} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:52
# 						y = -sin(-x + y + z);
	gt		$tmp39 Depth $const7 	%line{52} %argrw{"wrr"}
	if		$tmp39 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:53
# 						y *= dist;
	neg		$tmp41 ___333_x 	%line{53} %argrw{"wr"}
	add		$tmp42 $tmp41 ___333_y 	%argrw{"wrr"}
	add		$tmp43 $tmp42 ___333_z 	%argrw{"wrr"}
	sin		$tmp40 $tmp43 	%argrw{"wr"}
	neg		___333_y $tmp40 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:54
# 
	mul		___333_y ___333_y ___333_dist 	%line{54} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:56
# 							y = -cos(-x + y + z);
	gt		$tmp44 Depth $const8 	%line{56} %argrw{"wrr"}
	if		$tmp44 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:57
# 							y *= dist;
	neg		$tmp46 ___333_x 	%line{57} %argrw{"wr"}
	add		$tmp47 $tmp46 ___333_y 	%argrw{"wrr"}
	add		$tmp48 $tmp47 ___333_z 	%argrw{"wrr"}
	cos		$tmp45 $tmp48 	%argrw{"wr"}
	neg		___333_y $tmp45 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:58
# 
	mul		___333_y ___333_y ___333_dist 	%line{58} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:60
# 								x = cos(x + y + z);
	gt		$tmp49 Depth $const9 	%line{60} %argrw{"wrr"}
	if		$tmp49 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:61
# 								x *= dist;
	add		$tmp50 ___333_x ___333_y 	%line{61} %argrw{"wrr"}
	add		$tmp51 $tmp50 ___333_z 	%argrw{"wrr"}
	cos		___333_x $tmp51 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:62
# 
	mul		___333_x ___333_x ___333_dist 	%line{62} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:64
# 									z = sin(x + y - z);
	gt		$tmp52 Depth $const10 	%line{64} %argrw{"wrr"}
	if		$tmp52 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:65
# 									z *= dist;
	add		$tmp53 ___333_x ___333_y 	%line{65} %argrw{"wrr"}
	sub		$tmp54 $tmp53 ___333_z 	%argrw{"wrr"}
	sin		___333_z $tmp54 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:66
# 
	mul		___333_z ___333_z ___333_dist 	%line{66} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:68
# 										x = -cos(-x - y + z);
	gt		$tmp55 Depth $const11 	%line{68} %argrw{"wrr"}
	if		$tmp55 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:69
# 										x *= dist;
	neg		$tmp57 ___333_x 	%line{69} %argrw{"wr"}
	sub		$tmp58 $tmp57 ___333_y 	%argrw{"wrr"}
	add		$tmp59 $tmp58 ___333_z 	%argrw{"wrr"}
	cos		$tmp56 $tmp59 	%argrw{"wr"}
	neg		___333_x $tmp56 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:70
# 
	mul		___333_x ___333_x ___333_dist 	%line{70} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:72
# 											y = -sin(x - y + z);
	gt		$tmp60 Depth $const12 	%line{72} %argrw{"wrr"}
	if		$tmp60 105 105 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:73
# 											y *= dist;
	sub		$tmp62 ___333_x ___333_y 	%line{73} %argrw{"wrr"}
	add		$tmp63 $tmp62 ___333_z 	%argrw{"wrr"}
	sin		$tmp61 $tmp63 	%argrw{"wr"}
	neg		___333_y $tmp61 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:74
# 										}
	mul		___333_y ___333_y ___333_dist 	%line{74} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:86
# 		dist *= 2.0;
	neq		$tmp64 ___333_dist $const13 	%line{86} %argrw{"wrr"}
	if		$tmp64 111 111 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:87
# 		x /= dist;
	mul		___333_dist ___333_dist $const14 	%line{87} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:88
# 		y /= dist;
	div		___333_x ___333_x ___333_dist 	%line{88} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:89
# 		z /= dist;
	div		___333_y ___333_y ___333_dist 	%line{89} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:90
# 	}
	div		___333_z ___333_z ___333_dist 	%line{90} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_magic_texture.osl:93
# }
	sub		$tmp65 $const15 ___333_x 	%line{93} %argrw{"wrr"}
	sub		$tmp66 $const15 ___333_y 	%argrw{"wrr"}
	sub		$tmp67 $const15 ___333_z 	%argrw{"wrr"}
	color		Color $tmp65 $tmp66 $tmp67 	%argrw{"wrrr"}
	end
