OpenShadingLanguage 1.00
# Compiled by oslc 1.3.2
shader node_gradient_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	string	Type	"Linear" 		 %read{9,45} %write{2147483647,-1}
param	point	Vector	0 0 0 		 %read{1,1} %write{0,0}
oparam	float	Fac	0 		 %read{49,49} %write{48,48}
oparam	color	Color	0 0 0 		 %read{2147483647,-1} %write{49,49}
global	point	P	 %read{0,0} %write{2147483647,-1}
local	float	___650_x	 %read{11,34} %write{5,5}
local	float	___650_y	 %read{27,35} %write{6,6}
local	float	___650_z	 %read{37,37} %write{7,7}
local	float	___650_result	 %read{48,48} %write{8,47}
local	float	___652_r	 %read{15,15} %write{14,14}
local	float	___653_r	 %read{20,23} %write{19,19}
local	float	___653_t	 %read{21,22} %write{20,20}
local	float	___656_r	 %read{44,47} %write{41,41}
local	point	p	 %read{3,7} %write{1,3}
const	string	$const1	"gradient"		 %read{4,4} %write{2147483647,-1}
const	int	$const2	0		 %read{5,5} %write{2147483647,-1}
const	int	$const3	1		 %read{6,6} %write{2147483647,-1}
const	int	$const4	2		 %read{7,7} %write{2147483647,-1}
const	float	$const5	0		 %read{8,41} %write{2147483647,-1}
const	string	$const6	"Linear"		 %read{9,9} %write{2147483647,-1}
temp	int	$tmp1	 %read{10,10} %write{9,9}
const	string	$const7	"Quadratic"		 %read{12,12} %write{2147483647,-1}
temp	int	$tmp2	 %read{13,13} %write{12,12}
const	string	$const8	"Easing"		 %read{16,16} %write{2147483647,-1}
temp	int	$tmp3	 %read{17,17} %write{16,16}
temp	float	$tmp4	 %read{19,19} %write{18,18}
const	float	$const9	1		 %read{19,40} %write{2147483647,-1}
const	float	$const10	3		 %read{21,21} %write{2147483647,-1}
temp	float	$tmp5	 %read{24,24} %write{21,21}
const	float	$const11	2		 %read{22,22} %write{2147483647,-1}
temp	float	$tmp6	 %read{23,23} %write{22,22}
temp	float	$tmp7	 %read{24,24} %write{23,23}
const	string	$const12	"Diagonal"		 %read{25,25} %write{2147483647,-1}
temp	int	$tmp8	 %read{26,26} %write{25,25}
temp	float	$tmp9	 %read{28,28} %write{27,27}
const	float	$const13	0.5		 %read{28,33} %write{2147483647,-1}
const	string	$const14	"Radial"		 %read{29,29} %write{2147483647,-1}
temp	int	$tmp10	 %read{30,30} %write{29,29}
temp	float	$tmp11	 %read{32,32} %write{31,31}
const	float	$const15	6.2831855		 %read{32,32} %write{2147483647,-1}
temp	float	$tmp12	 %read{33,33} %write{32,32}
temp	float	$tmp13	 %read{40,40} %write{39,39}
temp	float	$tmp14	 %read{36,36} %write{34,34}
temp	float	$tmp15	 %read{36,36} %write{35,35}
temp	float	$tmp16	 %read{38,38} %write{36,36}
temp	float	$tmp17	 %read{38,38} %write{37,37}
temp	float	$tmp18	 %read{39,39} %write{38,38}
temp	float	$tmp19	 %read{41,41} %write{40,40}
const	string	$const16	"Quadratic Sphere"		 %read{42,42} %write{2147483647,-1}
temp	int	$tmp20	 %read{43,43} %write{42,42}
const	string	$const17	"Spherical"		 %read{45,45} %write{2147483647,-1}
temp	int	$tmp21	 %read{46,46} %write{45,45}
code Vector
# intern/cycles/kernel/shaders/node_gradient_texture.osl:67
# 	point Vector = P,
	assign		Vector P 	%filename{"intern/cycles/kernel/shaders/node_gradient_texture.osl"} %line{67} %argrw{"wr"}
code ___main___
# intern/cycles/kernel/shaders/node_gradient_texture.osl:71
# 	point p = Vector;
	assign		p Vector 	%filename{"intern/cycles/kernel/shaders/node_gradient_texture.osl"} %line{71} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:73
# 	if (use_mapping)
	if		use_mapping 4 4 	%line{73} %argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:74
# 		p = transform(mapping, p);
	transform	p mapping p 	%line{74} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:76
# 	Fac = gradient(p, Type);
	functioncall	$const1 49 	%line{76} %argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:26
# 	x = p[0];
	compref		___650_x p $const2 	%line{26} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:27
# 	y = p[1];
	compref		___650_y p $const3 	%line{27} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:28
# 	z = p[2];
	compref		___650_z p $const4 	%line{28} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:30
# 	float result = 0.0;
	assign		___650_result $const5 	%line{30} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:32
# 	if (type == "Linear") {
	eq		$tmp1 Type $const6 	%line{32} %argrw{"wrr"}
	if		$tmp1 12 48 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:33
# 		result = x;
	assign		___650_result ___650_x 	%line{33} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:35
# 	else if (type == "Quadratic") {
	eq		$tmp2 Type $const7 	%line{35} %argrw{"wrr"}
	if		$tmp2 16 48 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:36
# 		float r = max(x, 0.0);
	max		___652_r ___650_x $const5 	%line{36} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:37
# 		result = r * r;
	mul		___650_result ___652_r ___652_r 	%line{37} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:39
# 	else if (type == "Easing") {
	eq		$tmp3 Type $const8 	%line{39} %argrw{"wrr"}
	if		$tmp3 25 48 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:40
# 		float r = min(max(x, 0.0), 1.0);
	max		$tmp4 ___650_x $const5 	%line{40} %argrw{"wrr"}
	min		___653_r $tmp4 $const9 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:41
# 		float t = r * r;
	mul		___653_t ___653_r ___653_r 	%line{41} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:43
# 		result = (3.0 * t - 2.0 * t * r);
	mul		$tmp5 $const10 ___653_t 	%line{43} %argrw{"wrr"}
	mul		$tmp6 $const11 ___653_t 	%argrw{"wrr"}
	mul		$tmp7 $tmp6 ___653_r 	%argrw{"wrr"}
	sub		___650_result $tmp5 $tmp7 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:45
# 	else if (type == "Diagonal") {
	eq		$tmp8 Type $const12 	%line{45} %argrw{"wrr"}
	if		$tmp8 29 48 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:46
# 		result = (x + y) * 0.5;
	add		$tmp9 ___650_x ___650_y 	%line{46} %argrw{"wrr"}
	mul		___650_result $tmp9 $const13 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:48
# 	else if (type == "Radial") {
	eq		$tmp10 Type $const14 	%line{48} %argrw{"wrr"}
	if		$tmp10 34 48 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:49
# 		result = atan2(y, x) / M_2PI + 0.5;
	atan2		$tmp11 ___650_y ___650_x 	%line{49} %argrw{"wrr"}
	div		$tmp12 $tmp11 $const15 	%argrw{"wrr"}
	add		___650_result $tmp12 $const13 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:52
# 		float r = max(1.0 - sqrt(x * x + y * y + z * z), 0.0);
	mul		$tmp14 ___650_x ___650_x 	%line{52} %argrw{"wrr"}
	mul		$tmp15 ___650_y ___650_y 	%argrw{"wrr"}
	add		$tmp16 $tmp14 $tmp15 	%argrw{"wrr"}
	mul		$tmp17 ___650_z ___650_z 	%argrw{"wrr"}
	add		$tmp18 $tmp16 $tmp17 	%argrw{"wrr"}
	sqrt		$tmp13 $tmp18 	%argrw{"wr"}
	sub		$tmp19 $const9 $tmp13 	%argrw{"wrr"}
	max		___656_r $tmp19 $const5 	%argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:54
# 		if (type == "Quadratic Sphere")
	eq		$tmp20 Type $const16 	%line{54} %argrw{"wrr"}
	if		$tmp20 45 48 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:55
# 			result = r * r;
	mul		___650_result ___656_r ___656_r 	%line{55} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:56
# 		else if (type == "Spherical")
	eq		$tmp21 Type $const17 	%line{56} %argrw{"wrr"}
	if		$tmp21 48 48 	%argrw{"r"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:57
# 			result = r;
	assign		___650_result ___656_r 	%line{57} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:60
# 	return result;
	assign		Fac ___650_result 	%line{60} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_gradient_texture.osl:77
# 	Color = color(Fac, Fac, Fac);
	color		Color Fac Fac Fac 	%line{77} %argrw{"wrrr"}
	end
