OpenShadingLanguage 1.00
# Compiled by oslc 1.5.10
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
# intern/cycles/kernel/shaders/node_bump.osl:24
# 	normal NormalIn = N,
	assign		NormalIn N 	%filename{"intern/cycles/kernel/shaders/node_bump.osl"} %line{24} %argrw{"wr"}
code NormalOut
# intern/cycles/kernel/shaders/node_bump.osl:30
# 	output normal NormalOut = N)
	assign		NormalOut N 	%filename{"intern/cycles/kernel/shaders/node_bump.osl"} %line{30} %argrw{"wr"}
code ___main___
# intern/cycles/kernel/shaders/node_bump.osl:33
# 	vector dPdx = Dx(P);
	Dx		dPdx P 	%filename{"intern/cycles/kernel/shaders/node_bump.osl"} %line{33} %argrw{"wr"} %argderivs{1}
# intern/cycles/kernel/shaders/node_bump.osl:34
# 	vector dPdy = Dy(P);
	Dy		dPdy P 	%line{34} %argrw{"wr"} %argderivs{1}
# intern/cycles/kernel/shaders/node_bump.osl:36
# 	vector Rx = cross(dPdy, NormalIn);
	cross		Rx dPdy NormalIn 	%line{36} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_bump.osl:37
# 	vector Ry = cross(NormalIn, dPdx);
	cross		Ry NormalIn dPdx 	%line{37} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_bump.osl:40
# 	float det = dot(dPdx, Rx);
	dot		det dPdx Rx 	%line{40} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_bump.osl:41
# 	vector surfgrad = (SampleX - SampleCenter) * Rx + (SampleY - SampleCenter) * Ry;
	sub		$tmp1 SampleX SampleCenter 	%line{41} %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"}
# intern/cycles/kernel/shaders/node_bump.osl:43
# 	float absdet = fabs(det);
	fabs		absdet det 	%line{43} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_bump.osl:45
# 	float strength = max(Strength, 0.0);
	max		strength Strength $const1 	%line{45} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_bump.osl:46
# 	float dist = Distance;
	assign		dist Distance 	%line{46} %argrw{"wr"}
# intern/cycles/kernel/shaders/node_bump.osl:48
# 	if (invert)
	if		invert 17 17 	%line{48} %argrw{"r"}
# intern/cycles/kernel/shaders/node_bump.osl:49
# 		dist *= -1.0;
	mul		dist dist $const2 	%line{49} %argrw{"wrr"}
# intern/cycles/kernel/shaders/node_bump.osl:52
# 	NormalOut = normalize(absdet * NormalIn - dist * sign(det) * surfgrad);
	mul		$tmp5 absdet NormalIn 	%line{52} %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"}
# intern/cycles/kernel/shaders/node_bump.osl:53
# 	NormalOut = normalize(strength * NormalOut + (1.0 - strength) * NormalIn);
	mul		$tmp10 strength NormalOut 	%line{53} %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
