OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
light distantlight	%meta{string,help,"Distant/solar light, simple, with shadows"} %emit{1}
param	float	intensity	1		%meta{string,help,"Overall light intensity"} %meta{float,min,0}  %read{6,6} %write{2147483647,-1}
param	color	lightcolor	1 1 1		%meta{string,help,"Overall light color"}  %read{6,6} %write{2147483647,-1}
param	point	from	0 0 0		%meta{string,help,"Light origin (default: local origin)"}  %read{2,2} %write{0,0} %initexpr
param	point	to	0 0 1		%meta{string,help,"Light target (default: local +z)"}  %read{2,2} %write{1,1} %initexpr
param	string	shadowname	""		%meta{string,help,"Shadow name (map or geomset)"}  %read{7,10} %write{2147483647,-1}
param	float	shadowsamples	1		%meta{string,help,"Shadow blur"} %meta{int,min,1} %meta{int,max,256}  %read{9,9} %write{2147483647,-1}
param	float	shadowblur	0		%meta{string,help,"Shadow blur"} %meta{float,min,0} %meta{float,max,1}  %read{10,10} %write{2147483647,-1}
param	float	shadowbias	-1		%meta{string,help,"Shadow bias (-1 means default)"} %meta{float,min,0} %meta{float,max,1}  %read{10,10} %write{2147483647,-1}
param	float	__nonspecular	0		%meta{string,help,"Non-specular"} %meta{float,min,0} %meta{float,max,1}  %read{5,5} %write{2147483647,-1}
global	point	Ps	%read{10,10} %write{2147483647,-1} %derivs
global	vector	L	%read{10,10} %write{2147483647,-1} %derivs
global	color	Cl	%read{11,11} %write{6,11}
const	string	$const1	"shader"		%read{0,1} %write{2147483647,-1}
const	float	$const3	0		%read{0,3} %write{2147483647,-1}
const	float	$const5	1		%read{1,1} %write{2147483647,-1}
temp	int	$tmp1	%read{4,4} %write{3,3}
temp	vector	$tmp2	%read{3,3} %write{2,2}
const	string	$const6	"__nonspecular"		%read{5,5} %write{2147483647,-1}
temp	int	$tmp3	%read{8,8} %write{7,7}
const	string	$const7	""		%read{7,7} %write{2147483647,-1}
temp	color	$tmp4	%read{11,11} %write{10,10}
const	string	$const8	"traceset"		%read{10,10} %write{2147483647,-1}
const	string	$const9	"samples"		%read{10,10} %write{2147483647,-1}
temp	int	$tmp5	%read{10,10} %write{9,9}
const	string	$const10	"blur"		%read{10,10} %write{2147483647,-1}
const	string	$const11	"bias"		%read{10,10} %write{2147483647,-1}
code from
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:60
#         [[  string help = "Light origin (default: local origin)" ]],
	point		from $const1 $const3 $const3 $const3 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl"} %line{60} %argrw{"wrrrr"}
code to
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:62
#         [[  string help = "Light target (default: local +z)" ]],
	point		to $const1 $const3 $const3 $const5 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl"} %line{62} %argrw{"wrrrr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:83
# 		setmessage ("__nonspecular", __nonspecular);
	sub		$tmp2 to from 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl"} %line{83} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:90
# }
	emit		$tmp1 $tmp2 $const3 	%line{90} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:83
# 		setmessage ("__nonspecular", __nonspecular);
	if		$tmp1 12 12 	%line{83} %argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:84
# 	    Cl = intensity * lightcolor;
	setmessage	$const6 __nonspecular 	%line{84} %argrw{"rr"}
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:85
#         // If shadowed, scale the light by the "unshadowed" amount
	mul		Cl intensity lightcolor 	%line{85} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:87
#             Cl *= transmission (Ps, L, "traceset", shadowname, "samples", (int)shadowsamples,
	neq		$tmp3 shadowname $const7 	%line{87} %argrw{"wrr"}
	if		$tmp3 12 12 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:88
#                                       "blur", shadowblur, "bias", shadowbias);
	assign		$tmp5 shadowsamples 	%line{88} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\distantlight.osl:89
#     }
	transmission	$tmp4 Ps L $const8 shadowname $const9 $tmp5 $const10 shadowblur $const11 shadowbias 	%line{89} %argrw{"wrrrrrrrrrr"} %argderivs{1,2}
	mul		Cl Cl $tmp4 	%argrw{"wrr"}
	end
