OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface reflocclude	%meta{string,description,"Reflection occlusion"} %meta{string,opaqueparams,"transparency"} 
param	string	occlusionname	""		%meta{string,description,"Geometry set for occlusion"}  %read{18,22} %write{2147483647,-1}
param	string	sdbname	""		%meta{string,description,"Spatial database name for occlusion cache"}  %read{2147483647,-1} %write{2147483647,-1}
param	string	sdbmode	""		%meta{string,description,"File mode for occlusion cache spatial database"} %meta{string,UItype,"enum:,r,w,rw,ro,wo"}  %read{2147483647,-1} %write{2147483647,-1}
param	string	sdbfilespace	"world"		%meta{string,description,"Coordinate system for storing the sdb file"} %meta{string,UItype,"coordsys"}  %read{2147483647,-1} %write{2147483647,-1}
param	float	samples	4		%meta{string,description,"Number of hemispherical samples"} %meta{string,UItype,"int"} %meta{float,UImin,1} %meta{float,UIsoftmax,16}  %read{20,20} %write{2147483647,-1}
param	float	adaptive	1		%meta{string,description,"Use adaptive sampling of cone"} %meta{string,UItype,"bool"}  %read{2147483647,-1} %write{2147483647,-1}
param	float	maxerror	0.1		%meta{string,description,"Error metric (-1 for global default)"} %meta{float,UImax,1}  %read{22,22} %write{2147483647,-1}
param	float	maxpixeldist	4		%meta{string,description,"Max pixel distance between occlusion samples (-1 for global default)"} %meta{float,UImin,0} %meta{float,UIsoftmax,20}  %read{22,22} %write{2147483647,-1}
param	float	bias	-1		%meta{string,description,"Bias - minimum distance for ray hits (-1 for global default)"} %meta{float,UImin,0}  %read{22,22} %write{2147483647,-1}
param	float	maxhitdist	1000000		%meta{string,description,"Max distance for ray hits"} %meta{float,UImin,0}  %read{22,22} %write{2147483647,-1}
param	float	falloff	0		%meta{string,description,"Falloff exponent of occlusion effect (0 = none)"}  %read{22,22} %write{2147483647,-1}
param	float	falloffmode	0		%meta{string,description,"Alternate falloff mode"} %meta{string,UItype,"bool"}  %read{21,21} %write{2147483647,-1}
param	float	angle	0		%meta{string,description,"Reflection cone angle, in radians"} %meta{float,UImin,0} %meta{float,UImax,1.5707999}  %read{22,22} %write{2,2} %initexpr
param	float	writeC	1		%meta{string,description,"Write occlusion to C if nonzero"} %meta{string,UItype,"bool"}  %read{29,29} %write{2147483647,-1}
param	color	transparency	0 0 0		%meta{string,description,"Transparency of surface"}  %read{27,27} %write{2147483647,-1}
param	float	use_transparency	0		%meta{string,description,"Use the transparency flag"}  %read{25,25} %write{2147483647,-1}
oparam	float	unocc	1		%meta{string,description,"Output: unoccluded portion of reflection cone"}  %read{24,24} %write{23,23}
oparam	color	reflocc	1 1 1		%meta{string,description,"Output: unoccluded portion of reflection cone"}  %read{28,31} %write{24,28}
oparam	vector	R	0 0 0		%meta{string,description,"Output: reflection direction"}  %read{22,22} %write{17,17} %derivs
global	point	P	%read{22,22} %write{2147483647,-1} %derivs
global	vector	I	%read{6,12} %write{2147483647,-1} %derivs
global	normal	N	%read{3,3} %write{2147483647,-1} %derivs
global	normal	Ng	%read{6,6} %write{2147483647,-1}
global	color	C	%read{2147483647,-1} %write{31,31}
global	color	opacity	%read{28,28} %write{27,27}
local	normal	Nf	%read{14,16} %write{9,10} %derivs
local	normal	___291_Nunocc	%read{22,22} %write{2147483647,-1}
const	float	$const2	1		%read{2,27} %write{2147483647,-1}
const	string	$const3	"radians"		%read{0,0} %write{2147483647,-1}
const	float	$const4	3.1415927		%read{1,1} %write{2147483647,-1}
const	float	$const5	180		%read{1,1} %write{2147483647,-1}
temp	float	$tmp1	%read{2,2} %write{1,1}
temp	normal	$tmp2	%read{9,10} %write{3,3} %derivs
const	string	$const6	"faceforward"		%read{4,5} %write{2147483647,-1}
temp	float	$tmp3	%read{7,7} %write{6,6}
const	int	$const7	0		%read{7,7} %write{2147483647,-1}
temp	int	$tmp4	%read{8,8} %write{7,7}
temp	vector	$tmp5	%read{14,17} %write{12,12} %derivs
const	string	$const8	"reflect"		%read{13,13} %write{2147483647,-1}
temp	float	$tmp6	%read{15,15} %write{14,14} %derivs
temp	float	$tmp7	%read{16,16} %write{15,15} %derivs
const	float	$const10	2		%read{15,15} %write{2147483647,-1}
temp	vector	$tmp8	%read{17,17} %write{16,16} %derivs
temp	int	$tmp9	%read{19,19} %write{18,18}
const	string	$const11	""		%read{18,18} %write{2147483647,-1}
temp	float	$tmp10	%read{23,23} %write{22,22}
const	string	$const12	"traceset"		%read{22,22} %write{2147483647,-1}
const	string	$const13	"coneangle"		%read{22,22} %write{2147483647,-1}
const	string	$const14	"environmentdir"		%read{22,22} %write{2147483647,-1}
const	string	$const15	"samples"		%read{22,22} %write{2147483647,-1}
temp	int	$tmp11	%read{22,22} %write{20,20}
const	string	$const16	"maxerror"		%read{22,22} %write{2147483647,-1}
const	string	$const17	"maxpixeldist"		%read{22,22} %write{2147483647,-1}
const	string	$const18	"maxdist"		%read{22,22} %write{2147483647,-1}
const	string	$const19	"bias"		%read{22,22} %write{2147483647,-1}
const	string	$const20	"falloff"		%read{22,22} %write{2147483647,-1}
const	string	$const21	"falloffmode"		%read{22,22} %write{2147483647,-1}
temp	int	$tmp12	%read{22,22} %write{21,21}
temp	int	$tmp13	%read{26,26} %write{25,25}
const	float	$const22	0		%read{25,29} %write{2147483647,-1}
temp	int	$tmp14	%read{30,30} %write{29,29}
code angle
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:131
#         [[ string description = "Reflection cone angle, in radians",
	functioncall	$const3 3 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl"} %line{131} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:88
# float  radians (float x)  { return x*(M_PI/180.0); }
	div		$tmp1 $const4 $const5 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{88} %argrw{"wrr"}
	mul		angle $const2 $tmp1 	%argrw{"wrr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:149
# // 
	normalize	$tmp2 N 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl"} %line{149} %argrw{"wr"}
	functioncall	$const6 12 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
# #define M_SQRT1_2  0.7071067811865475        /* 1/sqrt(2) */
	functioncall	$const6 12 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{196} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:192
#     return (dot(I,Nref) > 0) ? -N : N;
	dot		$tmp3 I Ng 	%line{192} %argrw{"wrr"}
	gt		$tmp4 $tmp3 $const7 	%argrw{"wrr"}
	if		$tmp4 10 11 	%argrw{"r"}
	neg		Nf $tmp2 	%argrw{"wr"}
	assign		Nf $tmp2 	%argrw{"wr"}
	return
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:150
#     if (occlusionname) {
	normalize	$tmp5 I 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl"} %line{150} %argrw{"wr"}
	functioncall	$const8 18 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:198
# #endif
	dot		$tmp6 Nf $tmp5 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{198} %argrw{"wrr"}
	mul		$tmp7 $const10 $tmp6 	%argrw{"wrr"}
	mul		$tmp8 $tmp7 Nf 	%argrw{"wrr"}
	sub		R $tmp5 $tmp8 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:151
#         normal Nunocc;
	neq		$tmp9 occlusionname $const11 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl"} %line{151} %argrw{"wrr"}
	if		$tmp9 25 25 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:156
#                                "maxpixeldist", maxpixeldist,
	assign		$tmp11 samples 	%line{156} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:160
#                                "filename", sdbname, "filemode", sdbmode,
	assign		$tmp12 falloffmode 	%line{160} %argrw{"wr"}
	occlusion	$tmp10 P R $const12 occlusionname $const13 angle $const14 ___291_Nunocc $const15 $tmp11 $const16 maxerror $const17 maxpixeldist $const18 maxhitdist $const19 bias $const20 falloff $const21 $tmp12 	%argrw{"wrrrrrrrrrrrrrrrrrrrrrr"} %argderivs{1,2}
	sub		unocc $const2 $tmp10 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:161
#                                "filespace", sdbfilespace*/);
	assign		reflocc unocc 	%line{161} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:163
#     }
	neq		$tmp13 use_transparency $const22 	%line{163} %argrw{"wrr"}
	if		$tmp13 28 28 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:164
#     if (use_transparency)
	sub		opacity $const2 transparency 	%line{164} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:165
#         opacity = 1 - transparency;
	mul		reflocc reflocc opacity 	%line{165} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:166
#     reflocc *= opacity;
	neq		$tmp14 writeC $const22 	%line{166} %argrw{"wrr"}
	if		$tmp14 32 32 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\reflocclude.osl:167
#     if (writeC)
	assign		C reflocc 	%line{167} %argrw{"wr"}
	end
