OpenShadingLanguage 1.00
# Compiled by oslc 1.11.17
# options: -q -O2 -I/build/blender/src/blender/intern/cycles/kernel/osl/shaders -I/usr/share/OSL/shaders -o /build/blender/src/blender/build/intern/cycles/kernel/osl/shaders/node_hair_bsdf.oso
shader node_hair_bsdf
param	color	Color	0.800000012 0.800000012 0.800000012		%read{27,29} %write{2147483647,-1}
param	string	component	"reflection"		%read{24,24} %write{2147483647,-1}
param	float	Offset	0		%read{6,6} %write{2147483647,-1}
param	float	RoughnessU	0.100000001		%read{1,1} %write{2147483647,-1}
param	float	RoughnessV	1		%read{4,4} %write{2147483647,-1}
param	normal	Tangent	0 0 0		%read{9,11} %write{2147483647,-1}
oparam	closure color	BSDF			%read{2147483647,-1} %write{23,29}
global	normal	Ng	%read{26,28} %write{2147483647,-1}
global	vector	dPdu	%read{16,16} %write{2147483647,-1}
global	vector	dPdv	%read{14,14} %write{2147483647,-1}
local	float	roughnessh	%read{26,28} %write{2,2}
local	float	roughnessv	%read{26,28} %write{5,5}
local	float	offset	%read{26,28} %write{6,15}
local	normal	T	%read{26,28} %write{11,16}
local	float	IsCurve	%read{12,20} %write{7,8}
const	float	$const1	0.00100000005		%read{2,5} %write{2147483647,-1}
const	float	$const2	1		%read{1,4} %write{2147483647,-1}
const	string	$const3	"clamp"		%read{0,3} %write{2147483647,-1}
temp	float	$tmp1	%read{2,2} %write{1,1}
temp	float	$tmp2	%read{5,5} %write{4,4}
const	int	$const4	0		%read{7,18} %write{2147483647,-1}
temp	int	$tmp3	%read{2147483647,-1} %write{8,8}
const	string	$const5	"geom:is_curve"		%read{8,8} %write{2147483647,-1}
temp	int	$tmp4	%read{10,10} %write{9,9}
temp	int	$tmp5	%read{13,13} %write{12,12}
const	float	$const6	0		%read{12,20} %write{2147483647,-1}
temp	int	$tmp6	%read{18,18} %write{17,17}
temp	int	$tmp7	%read{19,22} %write{18,21}
temp	int	$tmp8	%read{21,21} %write{20,20}
const	string	$const7	"transparent"		%read{23,23} %write{2147483647,-1}
const	string	$const8	"reflection"		%read{24,24} %write{2147483647,-1}
temp	int	$tmp9	%read{25,25} %write{24,24}
temp	closure color	$tmp10	%read{27,27} %write{26,26}
const	string	$const9	"hair_reflection"		%read{26,26} %write{2147483647,-1}
temp	closure color	$tmp11	%read{29,29} %write{28,28}
const	string	$const10	"hair_transmission"		%read{28,28} %write{2147483647,-1}
code ___main___
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:14
#   float roughnessh = clamp(RoughnessU, 0.001, 1.0);
	functioncall	$const3 3 	%filename{"/build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl"} %line{14} %argrw{"r"}
# /usr/share/OSL/shaders/stdosl.h:141
# float  clamp (float x, float minval, float maxval) { return max(min(x,maxval),minval); }
	min		$tmp1 RoughnessU $const2 	%filename{"/usr/share/OSL/shaders/stdosl.h"} %line{141} %argrw{"wrr"}
	max		roughnessh $tmp1 $const1 	%argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:15
#   float roughnessv = clamp(RoughnessV, 0.001, 1.0);
	functioncall	$const3 6 	%filename{"/build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl"} %line{15} %argrw{"r"}
# /usr/share/OSL/shaders/stdosl.h:141
# float  clamp (float x, float minval, float maxval) { return max(min(x,maxval),minval); }
	min		$tmp2 RoughnessV $const2 	%filename{"/usr/share/OSL/shaders/stdosl.h"} %line{141} %argrw{"wrr"}
	max		roughnessv $tmp2 $const1 	%argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:16
#   float offset = -Offset;
	neg		offset Offset 	%filename{"/build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl"} %line{16} %argrw{"wr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:19
#   float IsCurve = 0;
	assign		IsCurve $const4 	%line{19} %argrw{"wr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:20
#   getattribute("geom:is_curve", IsCurve);
	getattribute	$tmp3 $const5 IsCurve 	%line{20} %argrw{"wrw"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:22
#   if (isconnected(Tangent)) {
	isconnected	$tmp4 Tangent 	%line{22} %argrw{"wr"}
	if		$tmp4 12 17 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:23
#     T = Tangent;
	assign		T Tangent 	%line{23} %argrw{"wr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:25
#   else if (!IsCurve) {
	eq		$tmp5 IsCurve $const6 	%line{25} %argrw{"wrr"}
	if		$tmp5 16 17 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:26
#     T = normalize(dPdv);
	normalize	T dPdv 	%line{26} %argrw{"wr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:27
#     offset = 0.0;
	assign		offset $const6 	%line{27} %argrw{"wr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:30
#     T = normalize(dPdu);
	normalize	T dPdu 	%line{30} %argrw{"wr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:33
#   if (backfacing() && IsCurve) {
	backfacing	$tmp6 	%line{33} %argrw{"w"}
	neq		$tmp7 $tmp6 $const4 	%argrw{"wrr"}
	if		$tmp7 22 22 	%argrw{"r"}
	neq		$tmp8 IsCurve $const6 	%argrw{"wrr"}
	assign		$tmp7 $tmp8 	%argrw{"wr"}
	if		$tmp7 24 30 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:34
#     BSDF = transparent();
	closure		BSDF $const7 	%line{34} %argrw{"wr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:37
#     if (component == "reflection")
	eq		$tmp9 component $const8 	%line{37} %argrw{"wrr"}
	if		$tmp9 28 30 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:38
#       BSDF = Color * hair_reflection(Ng, roughnessh, roughnessv, T, offset);
	closure		$tmp10 $const9 Ng roughnessh roughnessv T offset 	%line{38} %argrw{"wrrrrrr"}
	mul		BSDF $tmp10 Color 	%argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_hair_bsdf.osl:40
#       BSDF = Color * hair_transmission(Ng, roughnessh, roughnessv, T, offset);
	closure		$tmp11 $const10 Ng roughnessh roughnessv T offset 	%line{40} %argrw{"wrrrrrr"}
	mul		BSDF $tmp11 Color 	%argrw{"wrr"}
	end
