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_glossy_bsdf.oso
shader node_glossy_bsdf
param	color	Color	0.800000012 0.800000012 0.800000012		%read{6,20} %write{2147483647,-1}
param	string	distribution	"GGX"		%read{2,15} %write{2147483647,-1}
param	float	Roughness	0.200000003		%read{1,1} %write{2147483647,-1}
param	normal	Normal	0 0 0		%read{5,19} %write{0,0} %initexpr
oparam	closure color	BSDF			%read{2147483647,-1} %write{6,20}
global	normal	N	%read{0,0} %write{2147483647,-1}
local	float	roughness	%read{9,19} %write{1,1}
const	string	$const1	"sharp"		%read{2,2} %write{2147483647,-1}
temp	int	$tmp1	%read{3,3} %write{2,2}
temp	closure color	$tmp2	%read{6,6} %write{5,5}
const	string	$const2	"reflection"		%read{4,5} %write{2147483647,-1}
const	float	$const3	0		%read{5,5} %write{2147483647,-1}
const	string	$const4	"beckmann"		%read{7,7} %write{2147483647,-1}
temp	int	$tmp3	%read{8,8} %write{7,7}
temp	closure color	$tmp4	%read{10,10} %write{9,9}
const	string	$const5	"microfacet_beckmann"		%read{9,9} %write{2147483647,-1}
const	string	$const6	"GGX"		%read{11,11} %write{2147483647,-1}
temp	int	$tmp5	%read{12,12} %write{11,11}
temp	closure color	$tmp6	%read{14,14} %write{13,13}
const	string	$const7	"microfacet_ggx"		%read{13,13} %write{2147483647,-1}
const	string	$const8	"Multiscatter GGX"		%read{15,15} %write{2147483647,-1}
temp	int	$tmp7	%read{16,16} %write{15,15}
temp	closure color	$tmp8	%read{18,18} %write{17,17}
const	string	$const9	"microfacet_multi_ggx"		%read{17,17} %write{2147483647,-1}
temp	closure color	$tmp9	%read{20,20} %write{19,19}
const	vector	$const10	0 0 0		%read{19,19} %write{2147483647,-1}
const	string	$const11	"ashikhmin_shirley"		%read{19,19} %write{2147483647,-1}
code Normal
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:10
#                         normal Normal = N,
	assign		Normal N 	%filename{"/build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl"} %line{10} %argrw{"wr"}
code ___main___
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:13
#   float roughness = Roughness * Roughness;
	mul		roughness Roughness Roughness 	%filename{"/build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl"} %line{13} %argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:15
#   if (distribution == "sharp")
	eq		$tmp1 distribution $const1 	%line{15} %argrw{"wrr"}
	if		$tmp1 7 21 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:16
#     BSDF = Color * reflection(Normal);
	functioncall	$const2 6 	%line{16} %argrw{"r"}
# /usr/share/OSL/shaders/stdosl.h:466
# closure color reflection(normal N) { return reflection (N, 0.0); }
	closure		$tmp2 $const2 Normal $const3 	%filename{"/usr/share/OSL/shaders/stdosl.h"} %line{466} %argrw{"wrrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:16
#     BSDF = Color * reflection(Normal);
	mul		BSDF $tmp2 Color 	%filename{"/build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl"} %line{16} %argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:17
#   else if (distribution == "beckmann")
	eq		$tmp3 distribution $const4 	%line{17} %argrw{"wrr"}
	if		$tmp3 11 21 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:18
#     BSDF = Color * microfacet_beckmann(Normal, roughness);
	closure		$tmp4 $const5 Normal roughness 	%line{18} %argrw{"wrrr"}
	mul		BSDF $tmp4 Color 	%argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:19
#   else if (distribution == "GGX")
	eq		$tmp5 distribution $const6 	%line{19} %argrw{"wrr"}
	if		$tmp5 15 21 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:20
#     BSDF = Color * microfacet_ggx(Normal, roughness);
	closure		$tmp6 $const7 Normal roughness 	%line{20} %argrw{"wrrr"}
	mul		BSDF $tmp6 Color 	%argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:21
#   else if (distribution == "Multiscatter GGX")
	eq		$tmp7 distribution $const8 	%line{21} %argrw{"wrr"}
	if		$tmp7 19 21 	%argrw{"r"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:22
#     BSDF = Color * microfacet_multi_ggx(Normal, roughness, Color);
	closure		$tmp8 $const9 Normal roughness Color 	%line{22} %argrw{"wrrrr"}
	mul		BSDF $tmp8 Color 	%argrw{"wrr"}
# /build/blender/src/blender/intern/cycles/kernel/osl/shaders/node_glossy_bsdf.osl:24
#     BSDF = Color * ashikhmin_shirley(Normal, vector(0, 0, 0), roughness, roughness);
	closure		$tmp9 $const11 Normal $const10 roughness roughness 	%line{24} %argrw{"wrrrrr"}
	mul		BSDF $tmp9 Color 	%argrw{"wrr"}
	end
