OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
light skylight	%meta{string,description,"Sky light, hemispherical light with occlusion"} %emit{1}
param	vector	up	0 0 1		%meta{string,description,"Up vector, points to top of sky"}  %read{1,1} %write{0,0} %derivs %initexpr
param	float	intensity	1		%meta{string,description,"Overall light intensity"} %meta{float,UIsoftmin,0}  %read{10,10} %write{2147483647,-1}
param	color	lightcolor	1 1 1		%meta{string,description,"Overall light color"}  %read{9,9} %write{2147483647,-1}
param	string	occlusionname	""		%meta{string,description,"Geometry set for occlusion"}  %read{4,4} %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,wo"}  %read{2147483647,-1} %write{2147483647,-1}
param	float	samples	64		%meta{string,description,"Number of hemispherical samples"}  %read{2,2} %write{2147483647,-1}
param	float	adaptive	1		%meta{string,description,"Use adaptive sampling of hemisphere"} %meta{string,UItype,"bool"}  %read{2147483647,-1} %write{2147483647,-1}
param	float	maxerror	-1		%meta{string,description,"Error metric (-1 for global default)"} %meta{float,UImax,1}  %read{4,4} %write{2147483647,-1}
param	float	maxpixeldist	-1		%meta{string,description,"Max pixel distance between occlusion samples (-1 for global default)"}  %read{4,4} %write{2147483647,-1}
param	float	bias	-1		%meta{string,description,"Bias - minimum distance for ray hits"}  %read{4,4} %write{2147483647,-1}
param	float	maxhitdist	1000000		%meta{string,description,"Max distance for ray hits"} %meta{float,UImin,0}  %read{4,4} %write{2147483647,-1}
param	float	falloff	0		%meta{string,description,"Falloff exponent of occlusion effect (0 = none)"}  %read{4,4} %write{2147483647,-1}
param	float	falloffmode	0		%meta{string,description,"Alternate falloff mode"} %meta{string,UItype,"bool"}  %read{3,3} %write{2147483647,-1}
global	point	Ps	%read{4,4} %write{2147483647,-1} %derivs
global	color	Cl	%read{11,11} %write{9,11}
local	normal	Nunocc	%read{4,6} %write{2147483647,-1}
local	float	a	%read{10,10} %write{5,5}
const	string	$const1	"world"		%read{0,0} %write{2147483647,-1}
const	float	$const3	0		%read{0,7} %write{2147483647,-1}
const	float	$const5	1		%read{0,5} %write{2147483647,-1}
temp	float	$tmp1	%read{5,5} %write{4,4}
temp	vector	$tmp2	%read{4,4} %write{1,1} %derivs
const	string	$const6	"traceset"		%read{4,4} %write{2147483647,-1}
const	string	$const7	"coneangle"		%read{4,4} %write{2147483647,-1}
const	float	$const8	1.5707964		%read{4,4} %write{2147483647,-1}
const	string	$const9	"environmentdir"		%read{4,4} %write{2147483647,-1}
const	string	$const10	"samples"		%read{4,4} %write{2147483647,-1}
temp	int	$tmp3	%read{4,4} %write{2,2}
const	string	$const11	"maxerror"		%read{4,4} %write{2147483647,-1}
const	string	$const12	"maxpixeldist"		%read{4,4} %write{2147483647,-1}
const	string	$const13	"maxdist"		%read{4,4} %write{2147483647,-1}
const	string	$const14	"bias"		%read{4,4} %write{2147483647,-1}
const	string	$const15	"falloff"		%read{4,4} %write{2147483647,-1}
const	string	$const16	"falloffmode"		%read{4,4} %write{2147483647,-1}
temp	int	$tmp4	%read{4,4} %write{3,3}
temp	int	$tmp5	%read{8,8} %write{7,7}
temp	normal	$tmp6	%read{7,7} %write{6,6}
temp	float	$tmp7	%read{11,11} %write{10,10}
code up
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:76
#         [[ string description = "Up vector, points to top of sky" ]],
	vector		up $const1 $const3 $const3 $const5 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\skylight.osl"} %line{76} %argrw{"wrrrr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:116
# 					   "traceset", occlusionname, "coneangle", M_PI_2,
	normalize	$tmp2 up 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\skylight.osl"} %line{116} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:119
#                        "maxpixeldist", maxpixeldist,
	assign		$tmp3 samples 	%line{119} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:123
#                        "filename", sdbname, "filemode", sdbmode*/);
	assign		$tmp4 falloffmode 	%line{123} %argrw{"wr"}
	occlusion	$tmp1 Ps $tmp2 $const6 occlusionname $const7 $const8 $const9 Nunocc $const10 $tmp3 $const11 maxerror $const12 maxpixeldist $const13 maxhitdist $const14 bias $const15 falloff $const16 $tmp4 	%argrw{"wrrrrrrrrrrrrrrrrrrrrrr"} %argderivs{1,2}
	sub		a $const5 $tmp1 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:126
#         Cl = lightcolor;
	neg		$tmp6 Nunocc 	%line{126} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:129
# }
	emit		$tmp5 $tmp6 $const3 	%line{129} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:126
#         Cl = lightcolor;
	if		$tmp5 12 12 	%line{126} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:127
#         Cl *= intensity * a;
	assign		Cl lightcolor 	%line{127} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\skylight.osl:128
#     }
	mul		$tmp7 intensity a 	%line{128} %argrw{"wrr"}
	mul		Cl Cl $tmp7 	%argrw{"wrr"}
	end
