OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
light maya_envLight	%meta{string,description,"light source that looks up from an environment map"} %emit{1}
param	float	intensity	1		%meta{string,description,"Overall light intensity"} %meta{float,UIsoftmin,0}  %read{25,25} %write{2147483647,-1}
param	color	lightcolor	1 1 1		%meta{string,description,"Overall light color"}  %read{25,25} %write{2147483647,-1}
param	string	envname	""		%meta{string,description,"Environment map name"} %meta{string,UItype,"envmap"} %meta{string,UIgroupbegin,"Environment"}  %read{27,29} %write{2147483647,-1}
param	string	envspace	"world"		%meta{string,description,"Coordinate system for environment map lookup"} %meta{string,UIlabel,"Environment space"} %meta{string,UItype,"coordsys"}  %read{29,29} %write{2147483647,-1}
param	float	envrad	0		%meta{string,description,"Environment sphere radius for env map lookup"} %meta{float,UImin,0}  %read{29,29} %write{2147483647,-1}
param	float	blur	0.5		%meta{string,description,"Environment blur"} %meta{float,UImin,0} %meta{float,UIsoftmax,1} %meta{string,UIgroupend,"Environment"}  %read{29,29} %write{2147483647,-1}
param	string	occlusionname	""		%meta{string,description,"Geometry set for occlusion"} %meta{string,UItype,"geometryset"} %meta{string,UIgroupbegin,"Occlusion"}  %read{11,16} %write{2147483647,-1}
param	float	bias	-1		%meta{string,description,"Bias - minimum distance for ray hits"} %meta{float,UImin,0}  %read{16,16} %write{2147483647,-1}
param	float	maxhitdist	1000000		%meta{string,description,"Max distance for ray hits"} %meta{float,UImin,0}  %read{16,16} %write{2147483647,-1}
param	float	samples	16		%meta{string,description,"Number of hemispherical samples"} %meta{string,UItype,"int"} %meta{float,UImin,1}  %read{14,14} %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{16,16} %write{2147483647,-1}
param	float	maxpixeldist	-1		%meta{string,description,"Max pixel distance between occlusion samples (-1 for global default)"}  %read{16,16} %write{2147483647,-1}
param	float	falloff	0		%meta{string,description,"Falloff exponent of occlusion effect (0 = none)"}  %read{16,16} %write{2147483647,-1}
param	float	falloffmode	0		%meta{string,description,"Alternate falloff mode"} %meta{string,UItype,"bool"}  %read{15,15} %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"} %meta{string,UIenabler,"sdbname"}  %read{2147483647,-1} %write{2147483647,-1}
param	string	sdbfilespace	"world"		%meta{string,description,"Coordinate system for storing the occlusion cache sdb file"} %meta{string,UItype,"coordsys"}  %read{2147483647,-1} %write{2147483647,-1}
param	string	occlusionmap	""		%meta{string,description,"Occlusion map name (if not computed)"}  %read{0,6} %write{2147483647,-1}
param	string	normalmap	""		%meta{string,description,"Normal map name (if not computed)"}  %read{7,9} %write{2147483647,-1} %derivs
param	float	Kocclusion	1		%meta{string,description,"Amount occlusion is considered"} %meta{float,UImin,0} %meta{float,UImax,1} %meta{string,UIgroupend,"Occlusion"}  %read{20,20} %write{2147483647,-1}
param	float	__nonspecular	1		%meta{string,description,"Non-specular"}  %read{24,24} %write{2147483647,-1}
global	point	P	%read{3,3} %write{2147483647,-1} %derivs
global	normal	N	%read{10,19} %write{2147483647,-1} %derivs
global	point	Ps	%read{16,16} %write{2147483647,-1} %derivs
global	color	Cl	%read{30,30} %write{26,30}
local	normal	Nunocc	%read{16,29} %write{9,19} %derivs
local	float	a	%read{20,26} %write{6,20}
local	point	___291_PNDC	%read{4,5} %write{3,3} %derivs
local	float	___291_x	%read{6,9} %write{4,4} %derivs
local	float	___291_y	%read{6,9} %write{5,5} %derivs
const	string	$const1	""		%read{0,27} %write{2147483647,-1}
temp	int	$tmp1	%read{1,1} %write{0,0}
const	string	$const2	"NDC"		%read{3,3} %write{2147483647,-1}
const	string	$const3	"transform"		%read{2,2} %write{2147483647,-1}
const	string	$const4	"common"		%read{3,3} %write{2147483647,-1}
const	int	$const5	0		%read{4,4} %write{2147483647,-1}
const	int	$const6	1		%read{5,18} %write{2147483647,-1}
temp	int	$tmp2	%read{8,8} %write{7,7}
temp	int	$tmp3	%read{12,12} %write{11,11}
temp	float	$tmp4	%read{17,17} %write{16,16}
temp	normal	$tmp5	%read{16,16} %write{13,13} %derivs
const	string	$const7	"traceset"		%read{16,16} %write{2147483647,-1}
const	string	$const8	"coneangle"		%read{16,16} %write{2147483647,-1}
const	float	$const9	1.5707964		%read{16,16} %write{2147483647,-1}
const	string	$const10	"environmentdir"		%read{16,16} %write{2147483647,-1}
const	string	$const11	"samples"		%read{16,16} %write{2147483647,-1}
temp	int	$tmp6	%read{16,16} %write{14,14}
const	string	$const12	"maxerror"		%read{16,16} %write{2147483647,-1}
const	string	$const13	"maxpixeldist"		%read{16,16} %write{2147483647,-1}
const	string	$const14	"maxdist"		%read{16,16} %write{2147483647,-1}
const	string	$const15	"bias"		%read{16,16} %write{2147483647,-1}
const	string	$const16	"falloff"		%read{16,16} %write{2147483647,-1}
const	string	$const17	"falloffmode"		%read{16,16} %write{2147483647,-1}
temp	int	$tmp7	%read{16,16} %write{15,15}
const	float	$const18	1		%read{17,20} %write{2147483647,-1}
temp	int	$tmp8	%read{23,23} %write{22,22}
temp	normal	$tmp9	%read{22,22} %write{21,21}
const	float	$const19	0		%read{22,22} %write{2147483647,-1}
const	string	$const20	"__nonspecular"		%read{24,24} %write{2147483647,-1}
temp	color	$tmp10	%read{26,26} %write{25,25}
temp	int	$tmp11	%read{28,28} %write{27,27}
temp	color	$tmp12	%read{30,30} %write{29,29}
const	string	$const21	"space"		%read{29,29} %write{2147483647,-1}
const	string	$const22	"radius"		%read{29,29} %write{2147483647,-1}
const	string	$const23	"blur"		%read{29,29} %write{2147483647,-1}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:174
#         // An occlusion map was supplied - look up using "NDC" coords
	neq		$tmp1 occlusionmap $const1 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl"} %line{174} %argrw{"wrr"}
	if		$tmp1 11 20 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:176
#         float x = PNDC[0], y = PNDC[1];
	functioncall	$const3 4 	%line{176} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:249
#     point  name (point x, float y) BUILTIN;     \
	transform	___291_PNDC $const4 $const2 P 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{249} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:177
#         a = texture (occlusionmap, x, y);
	compref		___291_x ___291_PNDC $const5 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl"} %line{177} %argrw{"wrr"}
	compref		___291_y ___291_PNDC $const6 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:178
#         if (normalmap)
	texture		a occlusionmap ___291_x ___291_y 	%line{178} %argrw{"wrrr"} %argderivs{2,3}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:179
#             Nunocc = (normal) texture (normalmap, x, y);
	neq		$tmp2 normalmap $const1 	%line{179} %argrw{"wrr"}
	if		$tmp2 10 11 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:180
#         else Nunocc = N;
	texture		Nunocc normalmap ___291_x ___291_y 	%line{180} %argrw{"wrrr"} %argderivs{2,3}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:181
#     } else if (occlusionname != "") {
	assign		Nunocc N 	%line{181} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:182
#         // No occlusion map given, but a geometryset was passed --
	neq		$tmp3 occlusionname $const1 	%line{182} %argrw{"wrr"}
	if		$tmp3 18 20 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:185
# 						   "traceset", occlusionname, "coneangle", M_PI_2,
	normalize	$tmp5 N 	%line{185} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:188
#                            "maxpixeldist", maxpixeldist,
	assign		$tmp6 samples 	%line{188} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:192
#                            "filename", sdbname, "filemode", sdbmode,
	assign		$tmp7 falloffmode 	%line{192} %argrw{"wr"}
	occlusion	$tmp4 Ps $tmp5 $const7 occlusionname $const8 $const9 $const10 Nunocc $const11 $tmp6 $const12 maxerror $const13 maxpixeldist $const14 maxhitdist $const15 bias $const16 falloff $const17 $tmp7 	%argrw{"wrrrrrrrrrrrrrrrrrrrrrr"} %argderivs{1,2}
	sub		a $const18 $tmp4 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:198
#         Nunocc = N;
	assign		a $const6 	%line{198} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:199
#     }
	assign		Nunocc N 	%line{199} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:201
# 
	mix		a $const18 a Kocclusion 	%line{201} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:203
# 		setmessage ("__nonspecular", __nonspecular);
	neg		$tmp9 Nunocc 	%line{203} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:210
# }
	emit		$tmp8 $tmp9 $const19 	%line{210} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:203
# 		setmessage ("__nonspecular", __nonspecular);
	if		$tmp8 31 31 	%line{203} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:204
#         Cl = lightcolor * intensity * a;
	setmessage	$const20 __nonspecular 	%line{204} %argrw{"rr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:205
# 		if (envname) {
	mul		$tmp10 lightcolor intensity 	%line{205} %argrw{"wrr"}
	mul		Cl $tmp10 a 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:206
# 			Cl *= environment (envname, Nunocc, "space", envspace,
	neq		$tmp11 envname $const1 	%line{206} %argrw{"wrr"}
	if		$tmp11 31 31 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\maya_envLight.osl:208
#         }
	environment	$tmp12 envname Nunocc $const21 envspace $const22 envrad $const23 blur 	%line{208} %argrw{"wrrrrrrrr"} %argderivs{2}
	mul		Cl Cl $tmp12 	%argrw{"wrr"}
	end
