OpenShadingLanguage 1.00
# Compiled by oslc 1.3.0
shader node_normal_map
param	normal	NormalIn	0 0 0 		 %read{1,40} %write{0,0}
param	float	Strength	1 		 %read{35,38} %write{2147483647,-1}
param	color	Color	0.5 0.5 1 		 %read{2,6} %write{2147483647,-1}
param	string	space	"Tangent" 		 %read{10,31} %write{2147483647,-1}
param	string	attr_name	"geom:tangent" 		 %read{12,12} %write{2147483647,-1}
param	string	attr_sign_name	"geom:tangent_sign" 		 %read{13,13} %write{2147483647,-1}
oparam	normal	Normal	0 0 0 		 %read{37,37} %write{1,41}
global	normal	N	 %read{0,0} %write{2147483647,-1}
local	color	mcolor	 %read{17,33} %write{9,9}
local	vector	___592_tangent	 %read{14,18} %write{12,14}
local	float	___592_tangent_sign	 %read{16,16} %write{13,13}
local	vector	___592_B	 %read{20,20} %write{16,16}
const	float	$const1	2		 %read{9,9} %write{2147483647,-1}
temp	color	$tmp1	 %read{9,9} %write{8,8}
const	int	$const2	0		 %read{2,17} %write{2147483647,-1}
temp	float	$tmp2	 %read{3,3} %write{2,2}
const	float	$const3	0.5		 %read{3,7} %write{2147483647,-1}
temp	float	$tmp3	 %read{8,8} %write{3,3}
const	int	$const4	1		 %read{4,19} %write{2147483647,-1}
temp	float	$tmp4	 %read{5,5} %write{4,4}
temp	float	$tmp5	 %read{8,8} %write{5,5}
const	int	$const5	2		 %read{6,22} %write{2147483647,-1}
temp	float	$tmp6	 %read{7,7} %write{6,6}
temp	float	$tmp7	 %read{8,8} %write{7,7}
const	string	$const6	"Tangent"		 %read{10,10} %write{2147483647,-1}
temp	int	$tmp8	 %read{11,11} %write{10,10}
temp	int	$tmp9	 %read{2147483647,-1} %write{12,12}
temp	int	$tmp10	 %read{2147483647,-1} %write{13,13}
const	string	$const7	"object"		 %read{14,29} %write{2147483647,-1}
const	string	$const8	"world"		 %read{14,29} %write{2147483647,-1}
temp	vector	$tmp11	 %read{16,16} %write{15,15}
temp	float	$tmp12	 %read{18,18} %write{17,17}
temp	vector	$tmp13	 %read{21,21} %write{18,18}
temp	float	$tmp14	 %read{20,20} %write{19,19}
temp	vector	$tmp15	 %read{21,21} %write{20,20}
temp	vector	$tmp16	 %read{24,24} %write{21,21}
temp	float	$tmp17	 %read{23,23} %write{22,22}
temp	normal	$tmp18	 %read{24,24} %write{23,23}
temp	vector	$tmp19	 %read{25,25} %write{24,24}
const	string	$const9	"Object"		 %read{26,26} %write{2147483647,-1}
temp	int	$tmp20	 %read{27,27} %write{26,26}
temp	vector	$tmp21	 %read{30,30} %write{29,29}
temp	vector	$tmp22	 %read{29,29} %write{28,28}
const	string	$const10	"World"		 %read{31,31} %write{2147483647,-1}
temp	int	$tmp23	 %read{32,32} %write{31,31}
temp	vector	$tmp24	 %read{34,34} %write{33,33}
const	float	$const11	1		 %read{35,35} %write{2147483647,-1}
temp	int	$tmp25	 %read{36,36} %write{35,35}
temp	normal	$tmp26	 %read{39,39} %write{37,37}
temp	float	$tmp27	 %read{39,39} %write{38,38}
const	float	$const12	0		 %read{38,38} %write{2147483647,-1}
temp	normal	$tmp28	 %read{40,40} %write{39,39}
temp	normal	$tmp29	 %read{41,41} %write{40,40}
code NormalIn
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:23
# 	float Strength = 1.0,
	assign		NormalIn N 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl"} %line{23} %argrw{"wr"}
code Normal
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:29
# {
	assign		Normal NormalIn 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl"} %line{29} %argrw{"wr"}
code ___main___
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:31
# 
	compref		$tmp2 Color $const2 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl"} %line{31} %argrw{"wrr"}
	sub		$tmp3 $tmp2 $const3 	%argrw{"wrr"}
	compref		$tmp4 Color $const4 	%argrw{"wrr"}
	sub		$tmp5 $tmp4 $const3 	%argrw{"wrr"}
	compref		$tmp6 Color $const5 	%argrw{"wrr"}
	sub		$tmp7 $tmp6 $const3 	%argrw{"wrr"}
	color		$tmp1 $tmp3 $tmp5 $tmp7 	%argrw{"wrrr"}
	mul		mcolor $const1 $tmp1 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:33
# 		vector tangent;
	eq		$tmp8 space $const6 	%line{33} %argrw{"wrr"}
	if		$tmp8 26 35 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:37
# 		getattribute(attr_sign_name, tangent_sign);
	getattribute	$tmp9 attr_name ___592_tangent 	%line{37} %argrw{"wrw"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:38
# 
	getattribute	$tmp10 attr_sign_name ___592_tangent_sign 	%line{38} %argrw{"wrw"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:40
# 
	transformv	___592_tangent $const7 $const8 ___592_tangent 	%line{40} %argrw{"wrrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:42
# 		Normal = normalize(mcolor[0] * tangent + mcolor[1] * B + mcolor[2] * NormalIn);
	cross		$tmp11 NormalIn ___592_tangent 	%line{42} %argrw{"wrr"}
	mul		___592_B ___592_tangent_sign $tmp11 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:43
# 	}
	compref		$tmp12 mcolor $const2 	%line{43} %argrw{"wrr"}
	mul		$tmp13 $tmp12 ___592_tangent 	%argrw{"wrr"}
	compref		$tmp14 mcolor $const4 	%argrw{"wrr"}
	mul		$tmp15 $tmp14 ___592_B 	%argrw{"wrr"}
	add		$tmp16 $tmp13 $tmp15 	%argrw{"wrr"}
	compref		$tmp17 mcolor $const5 	%argrw{"wrr"}
	mul		$tmp18 $tmp17 NormalIn 	%argrw{"wrr"}
	add		$tmp19 $tmp16 $tmp18 	%argrw{"wrr"}
	normalize	Normal $tmp19 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:45
# 		Normal = normalize(transform("object", "world", vector(mcolor)));
	eq		$tmp20 space $const9 	%line{45} %argrw{"wrr"}
	if		$tmp20 31 35 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:46
# 	else if (space == "World")
	assign		$tmp22 mcolor 	%line{46} %argrw{"wr"}
	transformv	$tmp21 $const7 $const8 $tmp22 	%argrw{"wrrr"}
	normalize	Normal $tmp21 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:47
# 		Normal = normalize(vector(mcolor));
	eq		$tmp23 space $const10 	%line{47} %argrw{"wrr"}
	if		$tmp23 35 35 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:48
# 	
	assign		$tmp24 mcolor 	%line{48} %argrw{"wr"}
	normalize	Normal $tmp24 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:50
# 		Normal = normalize(NormalIn + (Normal - NormalIn) * max(Strength, 0.0));
	neq		$tmp25 Strength $const11 	%line{50} %argrw{"wrr"}
	if		$tmp25 42 42 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:51
# }
	sub		$tmp26 Normal NormalIn 	%line{51} %argrw{"wrr"}
	max		$tmp27 Strength $const12 	%argrw{"wrr"}
	mul		$tmp28 $tmp26 $tmp27 	%argrw{"wrr"}
	add		$tmp29 NormalIn $tmp28 	%argrw{"wrr"}
	normalize	Normal $tmp29 	%argrw{"wr"}
	end
