OpenShadingLanguage 1.00
# Compiled by oslc 1.7.3
# options: -q -O2 -IK:/BlenderGit/blender/intern/cycles/kernel/shaders -o K:/BlenderGit/build_windows_Release_x86_vc12_Release/intern/cycles/kernel/shaders/node_gradient_texture.oso
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} %initexpr
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	___656_x	%read{11,34} %write{5,5}
local	float	___656_y	%read{27,35} %write{6,6}
local	float	___656_z	%read{37,37} %write{7,7}
local	float	___656_result	%read{48,48} %write{8,47}
local	float	___658_r	%read{15,15} %write{14,14}
local	float	___659_r	%read{20,23} %write{19,19}
local	float	___659_t	%read{21,22} %write{20,20}
local	float	___662_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
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:67
# 	point Vector = P,
	assign		Vector P 	%filename{"K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl"} %line{67} %argrw{"wr"}
code ___main___
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:71
# 	point p = Vector;
	assign		p Vector 	%filename{"K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl"} %line{71} %argrw{"wr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:73
# 	if (use_mapping)
	if		use_mapping 4 4 	%line{73} %argrw{"r"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:74
# 		p = transform(mapping, p);
	transform	p mapping p 	%line{74} %argrw{"wrr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:76
# 	Fac = gradient(p, type);
	functioncall	$const1 49 	%line{76} %argrw{"r"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:26
# 	x = p[0];
	compref		___656_x p $const2 	%line{26} %argrw{"wrr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:27
# 	y = p[1];
	compref		___656_y p $const3 	%line{27} %argrw{"wrr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:28
# 	z = p[2];
	compref		___656_z p $const4 	%line{28} %argrw{"wrr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:30
# 	float result = 0.0;
	assign		___656_result $const5 	%line{30} %argrw{"wr"}
# K:/BlenderGit/blender/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"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:33
# 		result = x;
	assign		___656_result ___656_x 	%line{33} %argrw{"wr"}
# K:/BlenderGit/blender/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"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:36
# 		float r = max(x, 0.0);
	max		___658_r ___656_x $const5 	%line{36} %argrw{"wrr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:37
# 		result = r * r;
	mul		___656_result ___658_r ___658_r 	%line{37} %argrw{"wrr"}
# K:/BlenderGit/blender/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"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:40
# 		float r = min(max(x, 0.0), 1.0);
	max		$tmp4 ___656_x $const5 	%line{40} %argrw{"wrr"}
	min		___659_r $tmp4 $const9 	%argrw{"wrr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:41
# 		float t = r * r;
	mul		___659_t ___659_r ___659_r 	%line{41} %argrw{"wrr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:43
# 		result = (3.0 * t - 2.0 * t * r);
	mul		$tmp5 $const10 ___659_t 	%line{43} %argrw{"wrr"}
	mul		$tmp6 $const11 ___659_t 	%argrw{"wrr"}
	mul		$tmp7 $tmp6 ___659_r 	%argrw{"wrr"}
	sub		___656_result $tmp5 $tmp7 	%argrw{"wrr"}
# K:/BlenderGit/blender/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"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:46
# 		result = (x + y) * 0.5;
	add		$tmp9 ___656_x ___656_y 	%line{46} %argrw{"wrr"}
	mul		___656_result $tmp9 $const13 	%argrw{"wrr"}
# K:/BlenderGit/blender/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"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:49
# 		result = atan2(y, x) / M_2PI + 0.5;
	atan2		$tmp11 ___656_y ___656_x 	%line{49} %argrw{"wrr"}
	div		$tmp12 $tmp11 $const15 	%argrw{"wrr"}
	add		___656_result $tmp12 $const13 	%argrw{"wrr"}
# K:/BlenderGit/blender/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 ___656_x ___656_x 	%line{52} %argrw{"wrr"}
	mul		$tmp15 ___656_y ___656_y 	%argrw{"wrr"}
	add		$tmp16 $tmp14 $tmp15 	%argrw{"wrr"}
	mul		$tmp17 ___656_z ___656_z 	%argrw{"wrr"}
	add		$tmp18 $tmp16 $tmp17 	%argrw{"wrr"}
	sqrt		$tmp13 $tmp18 	%argrw{"wr"}
	sub		$tmp19 $const9 $tmp13 	%argrw{"wrr"}
	max		___662_r $tmp19 $const5 	%argrw{"wrr"}
# K:/BlenderGit/blender/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"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:55
# 			result = r * r;
	mul		___656_result ___662_r ___662_r 	%line{55} %argrw{"wrr"}
# K:/BlenderGit/blender/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"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:57
# 			result = r;
	assign		___656_result ___662_r 	%line{57} %argrw{"wr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:60
# 	return result;
	assign		Fac ___656_result 	%line{60} %argrw{"wr"}
# K:/BlenderGit/blender/intern/cycles/kernel/shaders/node_gradient_texture.osl:77
# 	Color = color(Fac, Fac, Fac);
	color		Color Fac Fac Fac 	%line{77} %argrw{"wrrr"}
	end
