OpenShadingLanguage 1.00
# Compiled by oslc 1.3.0
shader node_normal_map
param	normal	NormalIn	0 0 0 		 %read{1,55} %write{0,0}
param	float	Strength	1 		 %read{50,53} %write{2147483647,-1}
param	color	Color	0.5 0.5 1 		 %read{2,6} %write{2147483647,-1}
param	string	space	"Tangent" 		 %read{10,46} %write{2147483647,-1}
param	string	attr_name	"geom:tangent" 		 %read{12,12} %write{2147483647,-1}
param	string	attr_sign_name	"geom:tangent_sign" 		 %read{16,16} %write{2147483647,-1}
oparam	normal	Normal	0 0 0 		 %read{39,52} %write{1,56}
global	normal	N	 %read{0,0} %write{2147483647,-1}
local	color	mcolor	 %read{30,48} %write{9,9}
local	vector	___293_tangent	 %read{28,31} %write{12,12}
local	vector	___293_ninterp	 %read{28,36} %write{22,22}
local	float	___293_tangent_sign	 %read{29,29} %write{16,16}
local	vector	___295_B	 %read{33,33} %write{29,29}
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,30} %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,32} %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,35} %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{13,13} %write{12,12}
temp	int	$tmp10	 %read{14,14} %write{13,13}
temp	int	$tmp11	 %read{15,20} %write{14,19}
temp	int	$tmp12	 %read{17,17} %write{16,16}
temp	int	$tmp13	 %read{18,18} %write{17,17}
temp	int	$tmp14	 %read{19,19} %write{18,18}
temp	int	$tmp15	 %read{21,26} %write{20,25}
temp	int	$tmp16	 %read{23,23} %write{22,22}
const	string	$const7	"geom:N"		 %read{22,22} %write{2147483647,-1}
temp	int	$tmp17	 %read{24,24} %write{23,23}
temp	int	$tmp18	 %read{25,25} %write{24,24}
const	normal	$const8	0 0 0		 %read{27,27} %write{2147483647,-1}
temp	vector	$tmp19	 %read{29,29} %write{28,28}
temp	float	$tmp20	 %read{31,31} %write{30,30}
temp	vector	$tmp21	 %read{34,34} %write{31,31}
temp	float	$tmp22	 %read{33,33} %write{32,32}
temp	vector	$tmp23	 %read{34,34} %write{33,33}
temp	vector	$tmp24	 %read{37,37} %write{34,34}
temp	float	$tmp25	 %read{36,36} %write{35,35}
temp	vector	$tmp26	 %read{37,37} %write{36,36}
temp	vector	$tmp27	 %read{38,38} %write{37,37}
temp	normal	$tmp28	 %read{40,40} %write{39,39}
const	string	$const9	"object"		 %read{39,44} %write{2147483647,-1}
const	string	$const10	"world"		 %read{39,44} %write{2147483647,-1}
const	string	$const11	"Object"		 %read{41,41} %write{2147483647,-1}
temp	int	$tmp29	 %read{42,42} %write{41,41}
temp	vector	$tmp30	 %read{45,45} %write{44,44}
temp	vector	$tmp31	 %read{44,44} %write{43,43}
const	string	$const12	"World"		 %read{46,46} %write{2147483647,-1}
temp	int	$tmp32	 %read{47,47} %write{46,46}
temp	vector	$tmp33	 %read{49,49} %write{48,48}
const	float	$const13	1		 %read{50,50} %write{2147483647,-1}
temp	int	$tmp34	 %read{51,51} %write{50,50}
temp	normal	$tmp35	 %read{54,54} %write{52,52}
temp	float	$tmp36	 %read{54,54} %write{53,53}
const	float	$const14	0		 %read{53,53} %write{2147483647,-1}
temp	normal	$tmp37	 %read{55,55} %write{54,54}
temp	normal	$tmp38	 %read{56,56} %write{55,55}
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 41 50 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:39
# 		   !getattribute(attr_sign_name, tangent_sign) ||
	getattribute	$tmp9 attr_name ___293_tangent 	%line{39} %argrw{"wrw"}
	eq		$tmp10 $tmp9 $const2 	%argrw{"wrr"}
	neq		$tmp11 $tmp10 $const2 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:40
# 		   !getattribute("geom:N", ninterp)) {
	if		$tmp11 16 20 	%line{40} %argrw{"r"}
	getattribute	$tmp12 attr_sign_name ___293_tangent_sign 	%argrw{"wrw"}
	eq		$tmp13 $tmp12 $const2 	%argrw{"wrr"}
	neq		$tmp14 $tmp13 $const2 	%argrw{"wrr"}
	assign		$tmp11 $tmp14 	%argrw{"wr"}
	neq		$tmp15 $tmp11 $const2 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:41
# 			Normal = normal(0, 0, 0);
	if		$tmp15 22 26 	%line{41} %argrw{"r"}
	getattribute	$tmp16 $const7 ___293_ninterp 	%argrw{"wrw"}
	eq		$tmp17 $tmp16 $const2 	%argrw{"wrr"}
	neq		$tmp18 $tmp17 $const2 	%argrw{"wrr"}
	assign		$tmp15 $tmp18 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:39
# 		   !getattribute(attr_sign_name, tangent_sign) ||
	if		$tmp15 28 41 	%line{39} %argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:42
# 		}
	assign		Normal $const8 	%line{42} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:46
# 			Normal = normalize(mcolor[0] * tangent + mcolor[1] * B + mcolor[2] * ninterp);
	cross		$tmp19 ___293_ninterp ___293_tangent 	%line{46} %argrw{"wrr"}
	mul		___295_B ___293_tangent_sign $tmp19 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:47
# 
	compref		$tmp20 mcolor $const2 	%line{47} %argrw{"wrr"}
	mul		$tmp21 $tmp20 ___293_tangent 	%argrw{"wrr"}
	compref		$tmp22 mcolor $const4 	%argrw{"wrr"}
	mul		$tmp23 $tmp22 ___295_B 	%argrw{"wrr"}
	add		$tmp24 $tmp21 $tmp23 	%argrw{"wrr"}
	compref		$tmp25 mcolor $const5 	%argrw{"wrr"}
	mul		$tmp26 $tmp25 ___293_ninterp 	%argrw{"wrr"}
	add		$tmp27 $tmp24 $tmp26 	%argrw{"wrr"}
	normalize	Normal $tmp27 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:50
# 		}
	transformn	$tmp28 $const9 $const10 Normal 	%line{50} %argrw{"wrrr"}
	normalize	Normal $tmp28 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:53
# 		Normal = normalize(transform("object", "world", vector(mcolor)));
	eq		$tmp29 space $const11 	%line{53} %argrw{"wrr"}
	if		$tmp29 46 50 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:54
# 	else if (space == "World")
	assign		$tmp31 mcolor 	%line{54} %argrw{"wr"}
	transformv	$tmp30 $const9 $const10 $tmp31 	%argrw{"wrrr"}
	normalize	Normal $tmp30 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:55
# 		Normal = normalize(vector(mcolor));
	eq		$tmp32 space $const12 	%line{55} %argrw{"wrr"}
	if		$tmp32 50 50 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:56
# 	
	assign		$tmp33 mcolor 	%line{56} %argrw{"wr"}
	normalize	Normal $tmp33 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:58
# 		Normal = normalize(NormalIn + (Normal - NormalIn) * max(Strength, 0.0));
	neq		$tmp34 Strength $const13 	%line{58} %argrw{"wrr"}
	if		$tmp34 57 57 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_normal_map.osl:59
# }
	sub		$tmp35 Normal NormalIn 	%line{59} %argrw{"wrr"}
	max		$tmp36 Strength $const14 	%argrw{"wrr"}
	mul		$tmp37 $tmp35 $tmp36 	%argrw{"wrr"}
	add		$tmp38 NormalIn $tmp37 	%argrw{"wrr"}
	normalize	Normal $tmp38 	%argrw{"wr"}
	end
