OpenShadingLanguage 1.00
# Compiled by oslc 1.3.0
shader node_brick_texture
param	int	use_mapping	0 		 %read{2,2} %write{2147483647,-1}
param	matrix	mapping	0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0		 %read{3,3} %write{2147483647,-1}
param	float	Offset	0.5 		 %read{27,27} %write{2147483647,-1}
param	int	OffsetFrequency	2 		 %read{14,24} %write{2147483647,-1}
param	float	Squash	1 		 %read{22,22} %write{2147483647,-1}
param	int	SquashFrequency	1 		 %read{16,19} %write{2147483647,-1}
param	point	Vector	0 0 0 		 %read{1,1} %write{0,0}
param	color	Color1	0.2 0.2 0.2 		 %read{5,98} %write{2147483647,-1}
param	color	Color2	0.80000001 0.80000001 0.80000001 		 %read{88,100} %write{2147483647,-1}
param	color	Mortar	0 0 0 		 %read{106,106} %write{2147483647,-1}
param	float	Scale	5 		 %read{6,6} %write{2147483647,-1}
param	float	MortarSize	0.02 		 %read{61,75} %write{2147483647,-1}
param	float	Bias	0 		 %read{57,57} %write{2147483647,-1}
param	float	BrickWidth	0.5 		 %read{9,9} %write{2147483647,-1}
param	float	RowHeight	0.25 		 %read{11,75} %write{2147483647,-1}
oparam	float	Fac	0 		 %read{83,104} %write{80,81}
oparam	color	Color	0.2 0.2 0.2 		 %read{2147483647,-1} %write{106,107}
global	point	P	 %read{0,0} %write{2147483647,-1}
local	int	___631_nn	 %read{54,54} %write{53,53}
local	int	___632_bricknum	 %read{35,43} %write{32,32}
local	int	___632_rownum	 %read{19,42} %write{13,13}
local	float	___632_offset	 %read{29,34} %write{8,27}
local	float	___632_brick_width	 %read{23,69} %write{9,23}
local	float	___632_x	 %read{61,70} %write{37,37}
local	float	___632_y	 %read{64,76} %write{41,41}
local	point	p	 %read{3,6} %write{1,3}
local	float	tint	 %read{85,101} %write{4,60}
local	color	Col	 %read{107,107} %write{5,103}
local	float	___634_facm	 %read{87,99} %write{85,85}
const	float	$const1	0		 %read{4,81} %write{2147483647,-1}
temp	point	$tmp1	 %read{10,38} %write{6,6}
const	string	$const2	"brick"		 %read{7,7} %write{2147483647,-1}
temp	float	$tmp2	 %read{13,13} %write{12,12}
const	int	$const3	1		 %read{10,97} %write{2147483647,-1}
temp	float	$tmp3	 %read{11,11} %write{10,10}
temp	float	$tmp4	 %read{12,12} %write{11,11}
temp	int	$tmp5	 %read{15,18} %write{14,17}
const	int	$const4	0		 %read{14,91} %write{2147483647,-1}
temp	int	$tmp6	 %read{17,17} %write{16,16}
temp	float	$tmp7	 %read{23,23} %write{21,22}
temp	int	$tmp8	 %read{20,20} %write{19,19}
const	float	$const5	1		 %read{21,104} %write{2147483647,-1}
temp	int	$tmp9	 %read{25,25} %write{24,24}
temp	float	$tmp10	 %read{32,32} %write{31,31}
temp	float	$tmp11	 %read{29,29} %write{28,28}
temp	float	$tmp12	 %read{30,30} %write{29,29}
temp	float	$tmp13	 %read{31,31} %write{30,30}
temp	float	$tmp14	 %read{34,34} %write{33,33}
temp	float	$tmp15	 %read{37,37} %write{34,34}
temp	float	$tmp16	 %read{37,37} %write{36,36}
temp	float	$tmp17	 %read{36,36} %write{35,35}
temp	float	$tmp18	 %read{41,41} %write{38,38}
temp	float	$tmp19	 %read{41,41} %write{40,40}
temp	float	$tmp20	 %read{40,40} %write{39,39}
temp	float	$tmp21	 %read{57,57} %write{56,56}
const	int	$const6	16		 %read{42,42} %write{2147483647,-1}
temp	int	$tmp22	 %read{44,44} %write{42,42}
const	int	$const7	65535		 %read{43,43} %write{2147483647,-1}
temp	int	$tmp23	 %read{44,44} %write{43,43}
temp	int	$tmp24	 %read{46,51} %write{44,47}
const	string	$const8	"brick_noise"		 %read{45,45} %write{2147483647,-1}
const	int	$const9	13		 %read{46,46} %write{2147483647,-1}
temp	int	$tmp25	 %read{47,47} %write{46,46}
temp	int	$tmp26	 %read{49,49} %write{48,48}
const	int	$const10	60493		 %read{49,49} %write{2147483647,-1}
temp	int	$tmp27	 %read{50,50} %write{49,49}
const	int	$const11	19990303		 %read{50,50} %write{2147483647,-1}
temp	int	$tmp28	 %read{51,51} %write{50,50}
temp	int	$tmp29	 %read{52,52} %write{51,51}
const	int	$const12	1376312589		 %read{52,52} %write{2147483647,-1}
temp	int	$tmp30	 %read{53,53} %write{52,52}
const	int	$const13	2147483647		 %read{53,53} %write{2147483647,-1}
const	float	$const14	0.5		 %read{56,56} %write{2147483647,-1}
temp	float	$tmp31	 %read{55,55} %write{54,54}
const	float	$const15	1.0737418e+009		 %read{55,55} %write{2147483647,-1}
temp	float	$tmp32	 %read{56,56} %write{55,55}
temp	float	$tmp33	 %read{59,59} %write{57,57}
const	string	$const16	"clamp"		 %read{58,58} %write{2147483647,-1}
temp	float	$tmp34	 %read{60,60} %write{59,59}
temp	int	$tmp35	 %read{62,62} %write{61,61}
temp	int	$tmp36	 %read{63,67} %write{62,66}
temp	int	$tmp37	 %read{65,65} %write{64,64}
temp	int	$tmp38	 %read{66,66} %write{65,65}
temp	int	$tmp39	 %read{68,73} %write{67,72}
temp	float	$tmp40	 %read{70,70} %write{69,69}
temp	int	$tmp41	 %read{71,71} %write{70,70}
temp	int	$tmp42	 %read{72,72} %write{71,71}
temp	int	$tmp43	 %read{74,79} %write{73,78}
temp	float	$tmp44	 %read{76,76} %write{75,75}
temp	int	$tmp45	 %read{77,77} %write{76,76}
temp	int	$tmp46	 %read{78,78} %write{77,77}
temp	int	$tmp47	 %read{84,84} %write{83,83}
temp	float	$tmp48	 %read{87,87} %write{86,86}
temp	float	$tmp49	 %read{90,90} %write{87,87}
temp	float	$tmp50	 %read{89,89} %write{88,88}
temp	float	$tmp51	 %read{90,90} %write{89,89}
temp	float	$tmp52	 %read{91,91} %write{90,90}
temp	float	$tmp53	 %read{93,93} %write{92,92}
temp	float	$tmp54	 %read{96,96} %write{93,93}
temp	float	$tmp55	 %read{95,95} %write{94,94}
temp	float	$tmp56	 %read{96,96} %write{95,95}
temp	float	$tmp57	 %read{97,97} %write{96,96}
const	int	$const17	2		 %read{98,103} %write{2147483647,-1}
temp	float	$tmp58	 %read{99,99} %write{98,98}
temp	float	$tmp59	 %read{102,102} %write{99,99}
temp	float	$tmp60	 %read{101,101} %write{100,100}
temp	float	$tmp61	 %read{102,102} %write{101,101}
temp	float	$tmp62	 %read{103,103} %write{102,102}
temp	int	$tmp63	 %read{105,105} %write{104,104}
code Vector
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:68
# 	color Color1 = color(0.2, 0.2, 0.2),
	assign		Vector P 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl"} %line{68} %argrw{"wr"}
code ___main___
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:80
# 
	assign		p Vector 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl"} %line{80} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:82
# 		p = transform(mapping, p);
	if		use_mapping 4 4 	%line{82} %argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:83
# 
	transform	p mapping p 	%line{83} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:85
# 	color Col = Color1;
	assign		tint $const1 	%line{85} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:86
# 	
	assign		Col Color1 	%line{86} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:88
# 		Offset, OffsetFrequency, Squash, SquashFrequency, tint);
	mul		$tmp1 p Scale 	%line{88} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:89
# 		
	functioncall	$const2 83 	%line{89} %argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:38
# 	float brick_width = BrickWidth;
	assign		___632_offset $const1 	%line{38} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:39
# 	float x, y;
	assign		___632_brick_width BrickWidth 	%line{39} %argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:42
# 	
	compref		$tmp3 $tmp1 $const3 	%line{42} %argrw{"wrr"}
	div		$tmp4 $tmp3 RowHeight 	%argrw{"wrr"}
	floor		$tmp2 $tmp4 	%argrw{"wr"}
	assign		___632_rownum $tmp2 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:44
# 		brick_width *= ((int)(rownum) % squash_frequency) ? 1.0 : squash_amount;                /* squash */
	neq		$tmp5 OffsetFrequency $const4 	%line{44} %argrw{"wrr"}
	if		$tmp5 18 18 	%argrw{"r"}
	neq		$tmp6 SquashFrequency $const4 	%argrw{"wrr"}
	assign		$tmp5 $tmp6 	%argrw{"wr"}
	if		$tmp5 28 28 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:45
# 		offset       = ((int)(rownum) % offset_frequency) ? 0 : (brick_width * offset_amount);  /* offset */
	mod		$tmp8 ___632_rownum SquashFrequency 	%line{45} %argrw{"wrr"}
	if		$tmp8 22 23 	%argrw{"r"}
	assign		$tmp7 $const5 	%argrw{"wr"}
	assign		$tmp7 Squash 	%argrw{"wr"}
	mul		___632_brick_width ___632_brick_width $tmp7 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:46
# 	}
	mod		$tmp9 ___632_rownum OffsetFrequency 	%line{46} %argrw{"wrr"}
	if		$tmp9 27 28 	%argrw{"r"}
	assign		___632_offset $const4 	%argrw{"wr"}
	mul		___632_offset ___632_brick_width Offset 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:49
# 
	compref		$tmp11 $tmp1 $const4 	%line{49} %argrw{"wrr"}
	add		$tmp12 $tmp11 ___632_offset 	%argrw{"wrr"}
	div		$tmp13 $tmp12 ___632_brick_width 	%argrw{"wrr"}
	floor		$tmp10 $tmp13 	%argrw{"wr"}
	assign		___632_bricknum $tmp10 	%argrw{"wr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:51
# 	y = p[1] - row_height * rownum;
	compref		$tmp14 $tmp1 $const4 	%line{51} %argrw{"wrr"}
	add		$tmp15 $tmp14 ___632_offset 	%argrw{"wrr"}
	assign		$tmp17 ___632_bricknum 	%argrw{"wr"}
	mul		$tmp16 ___632_brick_width $tmp17 	%argrw{"wrr"}
	sub		___632_x $tmp15 $tmp16 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:52
# 
	compref		$tmp18 $tmp1 $const3 	%line{52} %argrw{"wrr"}
	assign		$tmp20 ___632_rownum 	%argrw{"wr"}
	mul		$tmp19 RowHeight $tmp20 	%argrw{"wrr"}
	sub		___632_y $tmp18 $tmp19 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:54
# 
	shl		$tmp22 ___632_rownum $const6 	%line{54} %argrw{"wrr"}
	bitand		$tmp23 ___632_bricknum $const7 	%argrw{"wrr"}
	add		$tmp24 $tmp22 $tmp23 	%argrw{"wrr"}
	functioncall	$const8 57 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:28
# 	nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 2147483647;
	shr		$tmp25 $tmp24 $const9 	%line{28} %argrw{"wrr"}
	xor		$tmp24 $tmp25 $tmp24 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:29
# 	return 0.5 * ((float)nn / 1073741824.0);
	mul		$tmp26 $tmp24 $tmp24 	%line{29} %argrw{"wrr"}
	mul		$tmp27 $tmp26 $const10 	%argrw{"wrr"}
	add		$tmp28 $tmp27 $const11 	%argrw{"wrr"}
	mul		$tmp29 $tmp24 $tmp28 	%argrw{"wrr"}
	add		$tmp30 $tmp29 $const12 	%argrw{"wrr"}
	bitand		___631_nn $tmp30 $const13 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:30
# }
	assign		$tmp31 ___631_nn 	%line{30} %argrw{"wr"}
	div		$tmp32 $tmp31 $const15 	%argrw{"wrr"}
	mul		$tmp21 $const14 $tmp32 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:54
# 
	add		$tmp33 $tmp21 Bias 	%line{54} %argrw{"wrr"}
	functioncall	$const16 61 	%argrw{"r"}
# D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h:142
# float  radians (float x)  { return x*(M_PI/180.0); }
	min		$tmp34 $tmp33 $const5 	%filename{"D:/blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\stdosl.h"} %line{142} %argrw{"wrr"}
	max		tint $tmp34 $const1 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:56
# 	        x > (brick_width - mortar_size) ||
	lt		$tmp35 ___632_x MortarSize 	%filename{"D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl"} %line{56} %argrw{"wrr"}
	neq		$tmp36 $tmp35 $const4 	%argrw{"wrr"}
	if		$tmp36 64 67 	%argrw{"r"}
	lt		$tmp37 ___632_y MortarSize 	%argrw{"wrr"}
	neq		$tmp38 $tmp37 $const4 	%argrw{"wrr"}
	assign		$tmp36 $tmp38 	%argrw{"wr"}
	neq		$tmp39 $tmp36 $const4 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:57
# 	        y > (row_height - mortar_size)) ? 1.0 : 0.0;
	if		$tmp39 69 73 	%line{57} %argrw{"r"}
	sub		$tmp40 ___632_brick_width MortarSize 	%argrw{"wrr"}
	gt		$tmp41 ___632_x $tmp40 	%argrw{"wrr"}
	neq		$tmp42 $tmp41 $const4 	%argrw{"wrr"}
	assign		$tmp39 $tmp42 	%argrw{"wr"}
	neq		$tmp43 $tmp39 $const4 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:58
# }
	if		$tmp43 75 79 	%line{58} %argrw{"r"}
	sub		$tmp44 RowHeight MortarSize 	%argrw{"wrr"}
	gt		$tmp45 ___632_y $tmp44 	%argrw{"wrr"}
	neq		$tmp46 $tmp45 $const4 	%argrw{"wrr"}
	assign		$tmp43 $tmp46 	%argrw{"wr"}
	if		$tmp43 81 82 	%argrw{"r"}
	assign		Fac $const5 	%argrw{"wr"}
	assign		Fac $const1 	%argrw{"wr"}
	return
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:91
# 		float facm = 1.0 - tint;
	neq		$tmp47 Fac $const5 	%line{91} %argrw{"wrr"}
	if		$tmp47 104 104 	%argrw{"r"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:92
# 
	sub		___634_facm $const5 tint 	%line{92} %argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:94
# 		Col[1] = facm * (Color1[1]) + tint * Color2[1];
	compref		$tmp48 Color1 $const4 	%line{94} %argrw{"wrr"}
	mul		$tmp49 ___634_facm $tmp48 	%argrw{"wrr"}
	compref		$tmp50 Color2 $const4 	%argrw{"wrr"}
	mul		$tmp51 tint $tmp50 	%argrw{"wrr"}
	add		$tmp52 $tmp49 $tmp51 	%argrw{"wrr"}
	compassign	Col $const4 $tmp52 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:95
# 		Col[2] = facm * (Color1[2]) + tint * Color2[2];
	compref		$tmp53 Color1 $const3 	%line{95} %argrw{"wrr"}
	mul		$tmp54 ___634_facm $tmp53 	%argrw{"wrr"}
	compref		$tmp55 Color2 $const3 	%argrw{"wrr"}
	mul		$tmp56 tint $tmp55 	%argrw{"wrr"}
	add		$tmp57 $tmp54 $tmp56 	%argrw{"wrr"}
	compassign	Col $const3 $tmp57 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:96
# 	}
	compref		$tmp58 Color1 $const17 	%line{96} %argrw{"wrr"}
	mul		$tmp59 ___634_facm $tmp58 	%argrw{"wrr"}
	compref		$tmp60 Color2 $const17 	%argrw{"wrr"}
	mul		$tmp61 tint $tmp60 	%argrw{"wrr"}
	add		$tmp62 $tmp59 $tmp61 	%argrw{"wrr"}
	compassign	Col $const17 $tmp62 	%argrw{"wrr"}
# D:\\blender_dev\\code\\trunk\\intern\\cycles\\kernel\\shaders\\node_brick_texture.osl:99
# }
	eq		$tmp63 Fac $const5 	%line{99} %argrw{"wrr"}
	if		$tmp63 107 108 	%argrw{"r"}
	assign		Color Mortar 	%argrw{"wr"}
	assign		Color Col 	%argrw{"wr"}
	end
