OpenShadingLanguage 1.00
# Compiled by oslc 1.4.0
surface node_bump
param	int	invert	0 		 %read{15,15} %write{2147483647,-1}
param	normal	NormalIn	0 0 0 		 %read{4,25} %write{0,0}
param	float	Strength	0.1 		 %read{13,13} %write{2147483647,-1}
param	float	Distance	1 		 %read{14,14} %write{2147483647,-1}
param	float	SampleCenter	0 		 %read{7,9} %write{2147483647,-1}
param	float	SampleX	0 		 %read{7,7} %write{2147483647,-1}
param	float	SampleY	0 		 %read{9,9} %write{2147483647,-1}
oparam	normal	NormalOut	0 0 0 		 %read{23,23} %write{1,27}
global	point	P	 %read{2,3} %write{2147483647,-1} %derivs
global	normal	N	 %read{0,1} %write{2147483647,-1}
local	vector	dPdx	 %read{5,6} %write{2,2}
local	vector	dPdy	 %read{4,4} %write{3,3}
local	vector	Rx	 %read{6,8} %write{4,4}
local	vector	Ry	 %read{10,10} %write{5,5}
local	float	det	 %read{12,18} %write{6,6}
local	vector	surfgrad	 %read{20,20} %write{11,11}
local	float	absdet	 %read{17,17} %write{12,12}
local	float	strength	 %read{23,24} %write{13,13}
local	float	dist	 %read{16,19} %write{14,16}
temp	float	$tmp1	 %read{8,8} %write{7,7}
temp	vector	$tmp2	 %read{11,11} %write{8,8}
temp	float	$tmp3	 %read{10,10} %write{9,9}
temp	vector	$tmp4	 %read{11,11} %write{10,10}
const	float	$const1	0		 %read{13,13} %write{2147483647,-1}
const	float	$const2	-1		 %read{16,16} %write{2147483647,-1}
temp	normal	$tmp5	 %read{21,21} %write{17,17}
temp	float	$tmp6	 %read{19,19} %write{18,18}
temp	float	$tmp7	 %read{20,20} %write{19,19}
temp	vector	$tmp8	 %read{21,21} %write{20,20}
temp	normal	$tmp9	 %read{22,22} %write{21,21}
temp	normal	$tmp10	 %read{26,26} %write{23,23}
const	float	$const3	1		 %read{24,24} %write{2147483647,-1}
temp	float	$tmp11	 %read{25,25} %write{24,24}
temp	normal	$tmp12	 %read{26,26} %write{25,25}
temp	normal	$tmp13	 %read{27,27} %write{26,26}
code NormalIn
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:25
# 	float Strength = 0.1,
	assign		NormalIn N 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl"} %line{25} %argrw{"wr"}
code NormalOut
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:31
# {
	assign		NormalOut N 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl"} %line{31} %argrw{"wr"}
code ___main___
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:34
# 	vector dPdy = Dy(P);
	Dx		dPdx P 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl"} %line{34} %argrw{"wr"} %argderivs{1}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:35
# 
	Dy		dPdy P 	%line{35} %argrw{"wr"} %argderivs{1}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:37
# 	vector Ry = cross(NormalIn, dPdx);
	cross		Rx dPdy NormalIn 	%line{37} %argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:38
# 
	cross		Ry NormalIn dPdx 	%line{38} %argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:41
# 	vector surfgrad = (SampleX - SampleCenter) * Rx + (SampleY - SampleCenter) * Ry;
	dot		det dPdx Rx 	%line{41} %argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:42
# 
	sub		$tmp1 SampleX SampleCenter 	%line{42} %argrw{"wrr"}
	mul		$tmp2 $tmp1 Rx 	%argrw{"wrr"}
	sub		$tmp3 SampleY SampleCenter 	%argrw{"wrr"}
	mul		$tmp4 $tmp3 Ry 	%argrw{"wrr"}
	add		surfgrad $tmp2 $tmp4 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:44
# 
	fabs		absdet det 	%line{44} %argrw{"wr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:46
# 	float dist = Distance;
	max		strength Strength $const1 	%line{46} %argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:47
# 
	assign		dist Distance 	%line{47} %argrw{"wr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:49
# 		dist *= -1.0;
	if		invert 17 17 	%line{49} %argrw{"r"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:50
# 	
	mul		dist dist $const2 	%line{50} %argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:53
# 	NormalOut = normalize(strength * NormalOut + (1.0 - strength) * NormalIn);
	mul		$tmp5 absdet NormalIn 	%line{53} %argrw{"wrr"}
	sign		$tmp6 det 	%argrw{"wr"}
	mul		$tmp7 dist $tmp6 	%argrw{"wrr"}
	mul		$tmp8 $tmp7 surfgrad 	%argrw{"wrr"}
	sub		$tmp9 $tmp5 $tmp8 	%argrw{"wrr"}
	normalize	NormalOut $tmp9 	%argrw{"wr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_bump.osl:54
# }
	mul		$tmp10 strength NormalOut 	%line{54} %argrw{"wrr"}
	sub		$tmp11 $const3 strength 	%argrw{"wrr"}
	mul		$tmp12 $tmp11 NormalIn 	%argrw{"wrr"}
	add		$tmp13 $tmp10 $tmp12 	%argrw{"wrr"}
	normalize	NormalOut $tmp13 	%argrw{"wr"}
	end
