OpenShadingLanguage 1.00
# Compiled by oslc 1.4.0
shader node_glass_bsdf
param	color	Color	0.80000001 0.80000001 0.80000001 		 %read{41,59} %write{2147483647,-1}
param	string	distribution	"Sharp" 		 %read{33,51} %write{2147483647,-1}
param	float	Roughness	0.2 		 %read{44,55} %write{2147483647,-1}
param	float	IOR	1.45 		 %read{1,1} %write{2147483647,-1}
param	normal	Normal	0 0 0 		 %read{6,55} %write{0,0}
oparam	closure color	BSDF			 %read{2147483647,-1} %write{41,59}
global	vector	I	 %read{6,6} %write{2147483647,-1}
global	normal	N	 %read{0,0} %write{2147483647,-1}
local	float	___310_c	 %read{11,23} %write{8,8}
local	float	___310_g	 %read{13,22} %write{12,15}
local	float	___310_result	 %read{32,32} %write{30,31}
local	float	___311_A	 %read{26,27} %write{18,18}
local	float	___311_B	 %read{28,28} %write{25,25}
local	float	f	 %read{4,5} %write{1,1}
local	float	eta	 %read{9,55} %write{4,5}
local	float	cosi	 %read{8,8} %write{6,6}
local	float	Fr	 %read{36,56} %write{32,32}
const	float	$const1	9.9999997e-006		 %read{1,1} %write{2147483647,-1}
temp	int	$tmp1	 %read{3,3} %write{2,2}
const	float	$const2	1		 %read{4,56} %write{2147483647,-1}
const	string	$const3	"fresnel_dielectric_cos"		 %read{7,7} %write{2147483647,-1}
temp	float	$tmp2	 %read{10,10} %write{9,9}
temp	float	$tmp3	 %read{12,12} %write{10,10}
temp	float	$tmp4	 %read{12,12} %write{11,11}
const	int	$const5	0		 %read{13,13} %write{2147483647,-1}
temp	int	$tmp5	 %read{14,14} %write{13,13}
temp	float	$tmp6	 %read{18,18} %write{16,16}
temp	float	$tmp7	 %read{18,18} %write{17,17}
temp	float	$tmp8	 %read{20,20} %write{19,19}
temp	float	$tmp9	 %read{21,21} %write{20,20}
temp	float	$tmp10	 %read{25,25} %write{21,21}
temp	float	$tmp11	 %read{23,23} %write{22,22}
temp	float	$tmp12	 %read{24,24} %write{23,23}
temp	float	$tmp13	 %read{25,25} %write{24,24}
const	float	$const6	0.5		 %read{26,26} %write{2147483647,-1}
temp	float	$tmp14	 %read{27,27} %write{26,26}
temp	float	$tmp15	 %read{30,30} %write{27,27}
temp	float	$tmp16	 %read{29,29} %write{28,28}
temp	float	$tmp17	 %read{30,30} %write{29,29}
const	string	$const7	"Sharp"		 %read{33,33} %write{2147483647,-1}
temp	int	$tmp18	 %read{34,34} %write{33,33}
temp	closure color	$tmp19	 %read{36,36} %write{35,35}
const	string	$const8	"reflection"		 %read{35,35} %write{2147483647,-1}
temp	closure color	$tmp20	 %read{40,40} %write{36,36}
temp	closure color	$tmp21	 %read{39,39} %write{37,37}
const	string	$const9	"refraction"		 %read{37,37} %write{2147483647,-1}
temp	float	$tmp22	 %read{39,39} %write{38,38}
temp	closure color	$tmp23	 %read{40,40} %write{39,39}
temp	closure color	$tmp24	 %read{41,41} %write{40,40}
const	string	$const10	"Beckmann"		 %read{42,42} %write{2147483647,-1}
temp	int	$tmp25	 %read{43,43} %write{42,42}
temp	closure color	$tmp26	 %read{45,45} %write{44,44}
const	string	$const11	"microfacet_beckmann"		 %read{44,44} %write{2147483647,-1}
temp	closure color	$tmp27	 %read{49,49} %write{45,45}
temp	closure color	$tmp28	 %read{48,48} %write{46,46}
const	string	$const12	"microfacet_beckmann_refraction"		 %read{46,46} %write{2147483647,-1}
temp	float	$tmp29	 %read{48,48} %write{47,47}
temp	closure color	$tmp30	 %read{49,49} %write{48,48}
temp	closure color	$tmp31	 %read{50,50} %write{49,49}
const	string	$const13	"GGX"		 %read{51,51} %write{2147483647,-1}
temp	int	$tmp32	 %read{52,52} %write{51,51}
temp	closure color	$tmp33	 %read{54,54} %write{53,53}
const	string	$const14	"microfacet_ggx"		 %read{53,53} %write{2147483647,-1}
temp	closure color	$tmp34	 %read{58,58} %write{54,54}
temp	closure color	$tmp35	 %read{57,57} %write{55,55}
const	string	$const15	"microfacet_ggx_refraction"		 %read{55,55} %write{2147483647,-1}
temp	float	$tmp36	 %read{57,57} %write{56,56}
temp	closure color	$tmp37	 %read{58,58} %write{57,57}
temp	closure color	$tmp38	 %read{59,59} %write{58,58}
code Normal
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:26
# 	output closure color BSDF = 0)
	assign		Normal N 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl"} %line{26} %argrw{"wr"}
code ___main___
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:29
# 	float eta = backfacing() ? 1.0 / f: f;
	max		f IOR $const1 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl"} %line{29} %argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:30
# 	float cosi = dot(I, Normal);
	backfacing	$tmp1 	%line{30} %argrw{"w"}
	if		$tmp1 5 6 	%argrw{"r"}
	div		eta $const2 f 	%argrw{"wrr"}
	assign		eta f 	%argrw{"wr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:31
# 	float Fr = fresnel_dielectric_cos(cosi, eta);
	dot		cosi I Normal 	%line{31} %argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:32
# 
	functioncall	$const3 33 	%line{32} %argrw{"r"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:21
# 	float c = fabs(cosi);
	fabs		___310_c cosi 	%filename{"D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h"} %line{21} %argrw{"wr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:22
# 	float g = eta * eta - 1 + c * c;
	mul		$tmp2 eta eta 	%line{22} %argrw{"wrr"}
	sub		$tmp3 $tmp2 $const2 	%argrw{"wrr"}
	mul		$tmp4 ___310_c ___310_c 	%argrw{"wrr"}
	add		___310_g $tmp3 $tmp4 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:25
# 	if (g > 0) {
	gt		$tmp5 ___310_g $const5 	%line{25} %argrw{"wrr"}
	if		$tmp5 31 32 	%argrw{"r"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:26
# 		g = sqrt(g);
	sqrt		___310_g ___310_g 	%line{26} %argrw{"wr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:27
# 		float A = (g - c) / (g + c);
	sub		$tmp6 ___310_g ___310_c 	%line{27} %argrw{"wrr"}
	add		$tmp7 ___310_g ___310_c 	%argrw{"wrr"}
	div		___311_A $tmp6 $tmp7 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:28
# 		float B = (c * (g + c) - 1) / (c * (g - c) + 1);
	add		$tmp8 ___310_g ___310_c 	%line{28} %argrw{"wrr"}
	mul		$tmp9 ___310_c $tmp8 	%argrw{"wrr"}
	sub		$tmp10 $tmp9 $const2 	%argrw{"wrr"}
	sub		$tmp11 ___310_g ___310_c 	%argrw{"wrr"}
	mul		$tmp12 ___310_c $tmp11 	%argrw{"wrr"}
	add		$tmp13 $tmp12 $const2 	%argrw{"wrr"}
	div		___311_B $tmp10 $tmp13 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:29
# 		result = 0.5 * A * A * (1 + B * B);
	mul		$tmp14 $const6 ___311_A 	%line{29} %argrw{"wrr"}
	mul		$tmp15 $tmp14 ___311_A 	%argrw{"wrr"}
	mul		$tmp16 ___311_B ___311_B 	%argrw{"wrr"}
	add		$tmp17 $const2 $tmp16 	%argrw{"wrr"}
	mul		___310_result $tmp15 $tmp17 	%argrw{"wrr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:32
# 		result = 1.0;  /* TIR (no refracted component) */
	assign		___310_result $const2 	%line{32} %argrw{"wr"}
# D:/blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_fresnel.h:34
# 	return result;
	assign		Fr ___310_result 	%line{34} %argrw{"wr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:34
# 	return result;
	eq		$tmp18 distribution $const7 	%filename{"D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl"} %argrw{"wrr"}
	if		$tmp18 42 60 	%argrw{"r"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:35
# /*
	closure		$tmp19 $const8 Normal 	%line{35} %argrw{"wrr"}
	mul		$tmp20 $tmp19 Fr 	%argrw{"wrr"}
	closure		$tmp21 $const9 Normal eta 	%argrw{"wrrr"}
	sub		$tmp22 $const2 Fr 	%argrw{"wrr"}
	mul		$tmp23 $tmp21 $tmp22 	%argrw{"wrr"}
	add		$tmp24 $tmp20 $tmp23 	%argrw{"wrr"}
	mul		BSDF $tmp24 Color 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:36
#  * Copyright 2011-2013 Blender Foundation
	eq		$tmp25 distribution $const10 	%line{36} %argrw{"wrr"}
	if		$tmp25 51 60 	%argrw{"r"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:37
#  *
	closure		$tmp26 $const11 Normal Roughness 	%line{37} %argrw{"wrrr"}
	mul		$tmp27 $tmp26 Fr 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:38
#  * Licensed under the Apache License, Version 2.0 (the "License");
	closure		$tmp28 $const12 Normal Roughness eta 	%line{38} %argrw{"wrrrr"}
	sub		$tmp29 $const2 Fr 	%argrw{"wrr"}
	mul		$tmp30 $tmp28 $tmp29 	%argrw{"wrr"}
	add		$tmp31 $tmp27 $tmp30 	%argrw{"wrr"}
	mul		BSDF $tmp31 Color 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:39
#  * you may not use this file except in compliance with the License.
	eq		$tmp32 distribution $const13 	%line{39} %argrw{"wrr"}
	if		$tmp32 60 60 	%argrw{"r"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:40
#  * You may obtain a copy of the License at
	closure		$tmp33 $const14 Normal Roughness 	%line{40} %argrw{"wrrr"}
	mul		$tmp34 $tmp33 Fr 	%argrw{"wrr"}
# D:\\blender_dev\\code\\blender\\intern\\cycles\\kernel\\shaders\\node_glass_bsdf.osl:41
#  *
	closure		$tmp35 $const15 Normal Roughness eta 	%line{41} %argrw{"wrrrr"}
	sub		$tmp36 $const2 Fr 	%argrw{"wrr"}
	mul		$tmp37 $tmp35 $tmp36 	%argrw{"wrr"}
	add		$tmp38 $tmp34 $tmp37 	%argrw{"wrr"}
	mul		BSDF $tmp38 Color 	%argrw{"wrr"}
	end
