OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
shader checker	%meta{string,description,"Layer with an antialiased checker pattern"} %meta{float,layer,1} 
param	color	color1	0 0 0		%meta{string,description,"Checker color #1"}  %read{70,70} %write{0,0} %initexpr
param	color	color2	0 0 0		%meta{string,description,"Checker color #2"}  %read{70,70} %write{2147483647,-1}
param	float	s	0		%meta{string,description,"s coordinate (defaults to u)"}  %read{5,6} %write{1,1} %derivs %initexpr
param	float	t	0		%meta{string,description,"t coordinate (defaults to v)"}  %read{35,36} %write{2,2} %derivs %initexpr
param	float	stilesize	1		%meta{string,description,"Tile size in the s direction"} %meta{float,UImin,0}  %read{3,3} %write{2147483647,-1}
param	float	ttilesize	1		%meta{string,description,"Tile size in the t direction"} %meta{float,UImin,0}  %read{4,4} %write{2147483647,-1}
oparam	color	Cout	0 0 0		%meta{string,description,"Color (3 channel) output"}  %read{2147483647,-1} %write{70,70}
oparam	float	fout	0		%meta{string,description,"Float (1 channel) output"}  %read{70,70} %write{69,69}
global	float	u	%read{1,1} %write{2147483647,-1} %derivs
global	float	v	%read{2,2} %write{2147483647,-1} %derivs
global	color	C	%read{0,0} %write{2147483647,-1}
local	float	___298_w	%read{11,64} %write{9,39}
local	float	___298_x0	%read{13,59} %write{12,42}
local	float	___298_x1	%read{17,50} %write{13,43}
local	float	___298_nedge	%read{16,60} %write{14,44}
local	float	sfreq	%read{5,7} %write{3,3}
local	float	tfreq	%read{35,37} %write{4,4}
local	float	x	%read{65,66} %write{34,34}
local	float	y	%read{65,67} %write{64,64}
const	float	$const2	1		%read{3,67} %write{2147483647,-1}
const	float	$const4	2		%read{9,44} %write{2147483647,-1}
temp	float	$tmp1	%read{10,10} %write{5,5}
temp	float	$tmp2	%read{7,7} %write{6,6}
temp	float	$tmp3	%read{9,9} %write{7,7}
const	string	$const5	"filteredpulsetrain"		%read{8,38} %write{2147483647,-1}
temp	float	$tmp4	%read{12,12} %write{10,10}
temp	float	$tmp5	%read{12,12} %write{11,11}
temp	float	$tmp6	%read{33,33} %write{23,23}
const	string	$const6	"integral"		%read{15,54} %write{2147483647,-1}
temp	float	$tmp7	%read{18,18} %write{16,16}
temp	float	$tmp8	%read{18,18} %write{17,17}
temp	float	$tmp9	%read{23,23} %write{18,18}
temp	float	$tmp10	%read{23,23} %write{22,22}
const	float	$const8	0		%read{22,61} %write{2147483647,-1}
temp	float	$tmp11	%read{20,20} %write{19,19}
temp	float	$tmp12	%read{21,21} %write{20,20}
temp	float	$tmp13	%read{22,22} %write{21,21}
temp	float	$tmp14	%read{33,33} %write{32,32}
temp	float	$tmp15	%read{27,27} %write{25,25}
temp	float	$tmp16	%read{27,27} %write{26,26}
temp	float	$tmp17	%read{32,32} %write{27,27}
temp	float	$tmp18	%read{32,32} %write{31,31}
temp	float	$tmp19	%read{29,29} %write{28,28}
temp	float	$tmp20	%read{30,30} %write{29,29}
temp	float	$tmp21	%read{31,31} %write{30,30}
temp	float	$tmp22	%read{34,34} %write{33,33}
temp	float	$tmp23	%read{40,40} %write{35,35}
temp	float	$tmp24	%read{37,37} %write{36,36}
temp	float	$tmp25	%read{39,39} %write{37,37}
temp	float	$tmp26	%read{42,42} %write{40,40}
temp	float	$tmp27	%read{42,42} %write{41,41}
temp	float	$tmp28	%read{63,63} %write{53,53}
temp	float	$tmp29	%read{48,48} %write{46,46}
temp	float	$tmp30	%read{48,48} %write{47,47}
temp	float	$tmp31	%read{53,53} %write{48,48}
temp	float	$tmp32	%read{53,53} %write{52,52}
temp	float	$tmp33	%read{50,50} %write{49,49}
temp	float	$tmp34	%read{51,51} %write{50,50}
temp	float	$tmp35	%read{52,52} %write{51,51}
temp	float	$tmp36	%read{63,63} %write{62,62}
temp	float	$tmp37	%read{57,57} %write{55,55}
temp	float	$tmp38	%read{57,57} %write{56,56}
temp	float	$tmp39	%read{62,62} %write{57,57}
temp	float	$tmp40	%read{62,62} %write{61,61}
temp	float	$tmp41	%read{59,59} %write{58,58}
temp	float	$tmp42	%read{60,60} %write{59,59}
temp	float	$tmp43	%read{61,61} %write{60,60}
temp	float	$tmp44	%read{64,64} %write{63,63}
temp	float	$tmp45	%read{69,69} %write{65,65}
temp	float	$tmp46	%read{68,68} %write{66,66}
temp	float	$tmp47	%read{68,68} %write{67,67}
temp	float	$tmp48	%read{69,69} %write{68,68}
code color1
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:61
#     color color2 = 0
	assign		color1 C 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\checker.osl"} %line{61} %argrw{"wr"}
code s
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:65
#     float t = v
	assign		s u 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\checker.osl"} %line{65} %argrw{"wr"}
code t
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:67
#     float stilesize = 1
	assign		t v 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\checker.osl"} %line{67} %argrw{"wr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:80
#     float tfreq = 1/ttilesize;
	div		sfreq $const2 stilesize 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\checker.osl"} %line{80} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:81
#     float x = filteredpulsetrain (1, 2, s*sfreq, filterwidth(s) * sfreq);
	div		tfreq $const2 ttilesize 	%line{81} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:82
#     float y = filteredpulsetrain (1, 2, t*tfreq, filterwidth(t) * tfreq);
	mul		$tmp1 s sfreq 	%line{82} %argrw{"wrr"}
	filterwidth	$tmp2 s 	%argrw{"wr"} %argderivs{1}
	mul		$tmp3 $tmp2 sfreq 	%argrw{"wrr"}
	functioncall	$const5 35 	%argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:140
#     // If dx is small (vs x), the integral is numerically unstable;
	div		___298_w $tmp3 $const4 	%filename{"D:/xrt.git\\src\\osl\\shaders\\patterns.h"} %line{140} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:141
#     // in these cases the interval doesn't cross 0.
	div		$tmp4 $tmp1 $const4 	%line{141} %argrw{"wrr"}
	div		$tmp5 ___298_w $const4 	%argrw{"wrr"}
	sub		___298_x0 $tmp4 $tmp5 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:142
#     // If dx is 0, the integral is NaN.
	add		___298_x1 ___298_x0 ___298_w 	%line{142} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:143
#     if (x0 * x1 >= 0 || dx == 0.0)
	div		___298_nedge $const2 $const4 	%line{143} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:151
# 
	functioncall	$const6 24 	%line{151} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:147
#         return ((1-nedge)*floor(t) + max(0,t-floor(t)-nedge));
	sub		$tmp7 $const2 ___298_nedge 	%line{147} %argrw{"wrr"}
	floor		$tmp8 ___298_x1 	%argrw{"wr"}
	mul		$tmp9 $tmp7 $tmp8 	%argrw{"wrr"}
	floor		$tmp11 ___298_x1 	%argrw{"wr"}
	sub		$tmp12 ___298_x1 $tmp11 	%argrw{"wrr"}
	sub		$tmp13 $tmp12 ___298_nedge 	%argrw{"wrr"}
	max		$tmp10 $const8 $tmp13 	%argrw{"wrr"}
	add		$tmp6 $tmp9 $tmp10 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:151
#     return (integral(x1) - integral(x0)) / w;
	functioncall	$const6 33 	%line{151} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:147
#         return ((1-nedge)*floor(t) + max(0,t-floor(t)-nedge));
	sub		$tmp15 $const2 ___298_nedge 	%line{147} %argrw{"wrr"}
	floor		$tmp16 ___298_x0 	%argrw{"wr"}
	mul		$tmp17 $tmp15 $tmp16 	%argrw{"wrr"}
	floor		$tmp19 ___298_x0 	%argrw{"wr"}
	sub		$tmp20 ___298_x0 $tmp19 	%argrw{"wrr"}
	sub		$tmp21 $tmp20 ___298_nedge 	%argrw{"wrr"}
	max		$tmp18 $const8 $tmp21 	%argrw{"wrr"}
	add		$tmp14 $tmp17 $tmp18 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:151
#     return (integral(x1) - integral(x0)) / w;
	sub		$tmp22 $tmp6 $tmp14 	%line{151} %argrw{"wrr"}
	div		x $tmp22 ___298_w 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:83
#     fout = x*y + (1-x)*(1-y);
	mul		$tmp23 t tfreq 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\checker.osl"} %line{83} %argrw{"wrr"}
	filterwidth	$tmp24 t 	%argrw{"wr"} %argderivs{1}
	mul		$tmp25 $tmp24 tfreq 	%argrw{"wrr"}
	functioncall	$const5 65 	%argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:140
#     // If the interval doesn't cross 0, then the box filter is just abs(x).
	div		___298_w $tmp25 $const4 	%filename{"D:/xrt.git\\src\\osl\\shaders\\patterns.h"} %line{140} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:141
#     // If dx is small (vs x), the integral is numerically unstable;
	div		$tmp26 $tmp23 $const4 	%line{141} %argrw{"wrr"}
	div		$tmp27 ___298_w $const4 	%argrw{"wrr"}
	sub		___298_x0 $tmp26 $tmp27 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:142
#     // in these cases the interval doesn't cross 0.
	add		___298_x1 ___298_x0 ___298_w 	%line{142} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:143
#     // If dx is 0, the integral is NaN.
	div		___298_nedge $const2 $const4 	%line{143} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:151
# 
	functioncall	$const6 54 	%line{151} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:147
#         return ((1-nedge)*floor(t) + max(0,t-floor(t)-nedge));
	sub		$tmp29 $const2 ___298_nedge 	%line{147} %argrw{"wrr"}
	floor		$tmp30 ___298_x1 	%argrw{"wr"}
	mul		$tmp31 $tmp29 $tmp30 	%argrw{"wrr"}
	floor		$tmp33 ___298_x1 	%argrw{"wr"}
	sub		$tmp34 ___298_x1 $tmp33 	%argrw{"wrr"}
	sub		$tmp35 $tmp34 ___298_nedge 	%argrw{"wrr"}
	max		$tmp32 $const8 $tmp35 	%argrw{"wrr"}
	add		$tmp28 $tmp31 $tmp32 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:151
#     return (integral(x1) - integral(x0)) / w;
	functioncall	$const6 63 	%line{151} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:147
#         return ((1-nedge)*floor(t) + max(0,t-floor(t)-nedge));
	sub		$tmp37 $const2 ___298_nedge 	%line{147} %argrw{"wrr"}
	floor		$tmp38 ___298_x0 	%argrw{"wr"}
	mul		$tmp39 $tmp37 $tmp38 	%argrw{"wrr"}
	floor		$tmp41 ___298_x0 	%argrw{"wr"}
	sub		$tmp42 ___298_x0 $tmp41 	%argrw{"wrr"}
	sub		$tmp43 $tmp42 ___298_nedge 	%argrw{"wrr"}
	max		$tmp40 $const8 $tmp43 	%argrw{"wrr"}
	add		$tmp36 $tmp39 $tmp40 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:151
#     return (integral(x1) - integral(x0)) / w;
	sub		$tmp44 $tmp28 $tmp36 	%line{151} %argrw{"wrr"}
	div		y $tmp44 ___298_w 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:84
#     Cout = mix (color1, color2, fout);
	mul		$tmp45 x y 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\checker.osl"} %line{84} %argrw{"wrr"}
	sub		$tmp46 $const2 x 	%argrw{"wrr"}
	sub		$tmp47 $const2 y 	%argrw{"wrr"}
	mul		$tmp48 $tmp46 $tmp47 	%argrw{"wrr"}
	add		fout $tmp45 $tmp48 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\checker.osl:85
# }
	mix		Cout color1 color2 fout 	%line{85} %argrw{"wrrr"}
	end
