OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
surface showst	%meta{string,description,"Color s in red, t in green (for debugging)"} 
param	float	use_lighting	0		%meta{string,description,"Surface responds to lighting"} %meta{string,UItype,"bool"}  %read{12,12} %write{2147483647,-1}
param	float	desaturate_backface	0		%meta{string,description,"De-saturate backfacing geometry"} %meta{string,UItype,"bool"}  %read{3,3} %write{2147483647,-1}
param	float	Ka	1		%meta{string,description,"Ambient scaling"} %meta{float,UImin,0} %meta{float,UIsoftmax,1}  %read{24,24} %write{2147483647,-1}
param	float	Kd	0.5		%meta{string,description,"Diffuse scaling"} %meta{float,UImin,0} %meta{float,UIsoftmax,1}  %read{42,42} %write{2147483647,-1}
param	float	Ks	0.5		%meta{string,description,"Specular scaling"} %meta{float,UImin,0} %meta{float,UIsoftmax,1}  %read{45,45} %write{2147483647,-1}
param	float	roughness	0.1		%meta{string,description,"Surface roughness (specular highlight size)"} %meta{float,UImin,0} %meta{float,UImax,1} %meta{string,UIenabler,"Ks"}  %read{63,63} %write{2147483647,-1}
param	color	specularcolor	1 1 1		%meta{string,description,"Specular highlight color"} %meta{string,UIenabler,"Ks"}  %read{45,45} %write{2147483647,-1}
param	float	s	0		%meta{string,description,"s texture coordinate (defaults to u)"} %meta{string,UIenabler,"texturename"}  %read{2,2} %write{0,0} %initexpr
param	float	t	0		%meta{string,description,"t texture coordinate (defaults to v)"} %meta{string,UIenabler,"texturename"}  %read{2,2} %write{1,1} %initexpr
global	point	P	%read{28,52} %write{2147483647,-1} %derivs
global	vector	I	%read{5,46} %write{2147483647,-1}
global	normal	N	%read{14,14} %write{2147483647,-1}
global	normal	Ng	%read{5,17} %write{2147483647,-1}
global	float	u	%read{0,0} %write{2147483647,-1}
global	float	v	%read{1,1} %write{2147483647,-1}
global	color	C	%read{10,71} %write{2,71}
global	color	opacity	%read{71,71} %write{2147483647,-1}
global	vector	L	%read{35,57} %write{2147483647,-1}
global	color	Cl	%read{33,56} %write{2147483647,-1}
local	color	___278_C	%read{27,41} %write{26,40}
local	float	___279___nondiffuse	%read{27,40} %write{27,40}
local	vector	___280_H	%read{50,67} %write{50,67}
local	color	___281_C	%read{50,68} %write{49,67}
local	float	___282___nonspecular	%read{50,67} %write{50,67}
local	normal	___291_Nf	%read{28,61} %write{20,21}
const	float	$const1	0.1		%read{2,2} %write{2147483647,-1}
temp	int	$tmp1	%read{4,9} %write{3,8}
const	float	$const2	0		%read{3,62} %write{2147483647,-1}
temp	float	$tmp2	%read{6,6} %write{5,5}
const	int	$const3	0		%read{6,53} %write{2147483647,-1}
temp	int	$tmp3	%read{7,7} %write{6,6}
temp	int	$tmp4	%read{8,8} %write{7,7}
const	float	$const4	0.30000001		%read{10,10} %write{2147483647,-1}
temp	color	$tmp5	%read{11,11} %write{10,10}
const	color	$const5	0.30000001 0.30000001 0.30000001		%read{11,11} %write{2147483647,-1}
temp	int	$tmp7	%read{13,13} %write{12,12}
temp	normal	$tmp8	%read{20,21} %write{14,14}
const	string	$const6	"faceforward"		%read{15,16} %write{2147483647,-1}
temp	float	$tmp9	%read{18,18} %write{17,17}
temp	int	$tmp10	%read{19,19} %write{18,18}
temp	color	$tmp11	%read{24,24} %write{23,23}
temp	color	$tmp12	%read{27,43} %write{24,40}
temp	color	$tmp13	%read{42,42} %write{41,41}
const	string	$const7	"diffuse"		%read{25,25} %write{2147483647,-1}
const	float	$const8	1.5707964		%read{28,52} %write{2147483647,-1}
temp	int	$tmp14	%read{27,40} %write{27,40}
temp	int	$tmp15	%read{2147483647,-1} %write{31,31}
const	string	$const9	"light"		%read{31,54} %write{2147483647,-1}
const	string	$const10	"__nondiffuse"		%read{31,31} %write{2147483647,-1}
temp	float	$tmp16	%read{33,33} %write{32,32}
const	float	$const12	1		%read{32,55} %write{2147483647,-1}
temp	color	$tmp17	%read{39,39} %write{33,33}
temp	color	$tmp18	%read{39,39} %write{38,38}
temp	color	$tmp19	%read{38,38} %write{34,34}
temp	float	$tmp20	%read{37,37} %write{36,36}
temp	vector	$tmp21	%read{36,36} %write{35,35}
temp	color	$tmp22	%read{38,38} %write{37,37}
temp	color	$tmp23	%read{27,40} %write{27,40}
temp	color	$tmp24	%read{43,43} %write{42,42}
temp	color	$tmp25	%read{44,44} %write{43,43}
temp	color	$tmp26	%read{50,70} %write{44,67}
temp	color	$tmp27	%read{50,69} %write{45,67}
temp	color	$tmp28	%read{69,69} %write{68,68}
temp	vector	$tmp29	%read{47,47} %write{46,46}
temp	vector	$tmp30	%read{50,67} %write{47,67}
const	string	$const13	"specular"		%read{48,48} %write{2147483647,-1}
temp	int	$tmp31	%read{50,67} %write{50,67}
temp	int	$tmp32	%read{2147483647,-1} %write{54,54}
const	string	$const14	"__nonspecular"		%read{54,54} %write{2147483647,-1}
temp	float	$tmp33	%read{56,56} %write{55,55}
temp	color	$tmp34	%read{66,66} %write{56,56}
temp	color	$tmp35	%read{66,66} %write{65,65}
temp	vector	$tmp36	%read{59,59} %write{57,57}
const	string	$const15	"specularbrdf"		%read{58,58} %write{2147483647,-1}
temp	vector	$tmp37	%read{60,60} %write{59,59}
temp	float	$tmp38	%read{65,65} %write{64,64}
temp	float	$tmp39	%read{64,64} %write{62,62}
temp	float	$tmp40	%read{62,62} %write{61,61}
temp	float	$tmp41	%read{64,64} %write{63,63}
const	float	$const17	8		%read{63,63} %write{2147483647,-1}
temp	color	$tmp42	%read{50,67} %write{50,67}
temp	color	$tmp43	%read{70,70} %write{69,69}
code s
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:72
#     float t = v
	assign		s u 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\showst.osl"} %line{72} %argrw{"wr"}
code t
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:75
#   )
	assign		t v 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\showst.osl"} %line{75} %argrw{"wr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:79
#     /* desaturate backfacing */
	color		C s t $const1 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\showst.osl"} %line{79} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:81
#         C = 0.3 * C + color(.3, .3, .3);
	neq		$tmp1 desaturate_backface $const2 	%line{81} %argrw{"wrr"}
	if		$tmp1 9 9 	%argrw{"r"}
	dot		$tmp2 Ng I 	%argrw{"wrr"}
	gt		$tmp3 $tmp2 $const3 	%argrw{"wrr"}
	neq		$tmp4 $tmp3 $const3 	%argrw{"wrr"}
	assign		$tmp1 $tmp4 	%argrw{"wr"}
	if		$tmp1 12 12 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:82
# 
	mul		$tmp5 $const4 C 	%line{82} %argrw{"wrr"}
	add		C $tmp5 $const5 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:84
#         normal Nf = faceforward (normalize(N),I);
	neq		$tmp7 use_lighting $const2 	%line{84} %argrw{"wrr"}
	if		$tmp7 71 71 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:85
#         C = C * (Ka*ambient() + Kd*diffuse(Nf)) +
	normalize	$tmp8 N 	%line{85} %argrw{"wr"}
	functioncall	$const6 23 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:196
# PERCOMP1 (sqrt)
	functioncall	$const6 23 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{196} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:192
#     return (dot(I,Nref) > 0) ? -N : N;
	dot		$tmp9 I Ng 	%line{192} %argrw{"wrr"}
	gt		$tmp10 $tmp9 $const3 	%argrw{"wrr"}
	if		$tmp10 21 22 	%argrw{"r"}
	neg		___291_Nf $tmp8 	%argrw{"wr"}
	assign		___291_Nf $tmp8 	%argrw{"wr"}
	return
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:86
#             specularcolor * Ks*specular(Nf,-normalize(I),roughness);
	ambient		$tmp11 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\showst.osl"} %line{86} %argrw{"w"}
	mul		$tmp12 Ka $tmp11 	%argrw{"wrr"}
	functioncall	$const7 42 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:501
# matrix transpose (matrix m) BUILTIN;
	assign		___278_C $const3 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{501} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:503
# 
	for		$tmp14 29 30 41 41 	%line{503} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:507
# color step (color edge, color x) BUILTIN;
	lights_begin	P ___291_Nf $const8 	%line{507} %argrw{"rrr"}
	lights		$tmp14 P ___291_Nf $const8 	%argrw{"wrrr"} %argderivs{1}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:504
# 		float __nondiffuse = 0;
	assign		___279___nondiffuse $const3 	%line{504} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:505
# 		getmessage ("light", "__nondiffuse", __nondiffuse);
	getmessage	$tmp15 $const9 $const10 ___279___nondiffuse 	%line{505} %argrw{"wrrw"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:506
# 		C += Cl * (1-__nondiffuse) * max (0, dot (N, normalize (L)));
	sub		$tmp16 $const12 ___279___nondiffuse 	%line{506} %argrw{"wrr"}
	mul		$tmp17 Cl $tmp16 	%argrw{"wrr"}
	assign		$tmp19 $const2 	%argrw{"wr"}
	normalize	$tmp21 L 	%argrw{"wr"}
	dot		$tmp20 ___291_Nf $tmp21 	%argrw{"wrr"}
	assign		$tmp22 $tmp20 	%argrw{"wr"}
	max		$tmp18 $tmp19 $tmp22 	%argrw{"wrr"}
	mul		$tmp23 $tmp17 $tmp18 	%argrw{"wrr"}
	add		___278_C ___278_C $tmp23 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:508
# 	return C;
	assign		$tmp13 ___278_C 	%line{508} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:86
#             specularcolor * Ks*specular(Nf,-normalize(I),roughness);
	mul		$tmp24 Kd $tmp13 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\showst.osl"} %line{86} %argrw{"wrr"}
	add		$tmp25 $tmp12 $tmp24 	%argrw{"wrr"}
	mul		$tmp26 C $tmp25 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:87
#     }
	mul		$tmp27 specularcolor Ks 	%line{87} %argrw{"wrr"}
	normalize	$tmp29 I 	%argrw{"wr"}
	neg		$tmp30 $tmp29 	%argrw{"wr"}
	functioncall	$const13 69 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:527
# }
	assign		___281_C $const3 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{527} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:529
# 
	for		$tmp31 52 53 68 68 	%line{529} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:533
# // Displacement functions
	lights_begin	P ___291_Nf $const8 	%line{533} %argrw{"rrr"}
	lights		$tmp31 P ___291_Nf $const8 	%argrw{"wrrr"} %argderivs{1}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:530
# 		float __nonspecular = 0;
	assign		___282___nonspecular $const3 	%line{530} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:531
# 		getmessage ("light", "__nonspecular", __nonspecular);
	getmessage	$tmp32 $const9 $const14 ___282___nonspecular 	%line{531} %argrw{"wrrw"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	sub		$tmp33 $const12 ___282___nonspecular 	%line{532} %argrw{"wrr"}
	mul		$tmp34 Cl $tmp33 	%argrw{"wrr"}
	normalize	$tmp36 L 	%argrw{"wr"}
	functioncall	$const15 66 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:511
# 	vector H = normalize( L + V );
	add		$tmp37 $tmp36 $tmp30 	%line{511} %argrw{"wrr"}
	normalize	___280_H $tmp37 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:512
# 	return pow (max (0, dot (N, H)), 8 / roughness);
	dot		$tmp40 ___291_Nf ___280_H 	%line{512} %argrw{"wrr"}
	max		$tmp39 $const2 $tmp40 	%argrw{"wrr"}
	div		$tmp41 $const17 roughness 	%argrw{"wrr"}
	pow		$tmp38 $tmp39 $tmp41 	%argrw{"wrr"}
	assign		$tmp35 $tmp38 	%argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:532
# 		C += Cl * (1-__nonspecular) * specularbrdf (normalize (L), N, V, roughness);
	mul		$tmp42 $tmp34 $tmp35 	%line{532} %argrw{"wrr"}
	add		___281_C ___281_C $tmp42 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:534
# 	return C;
	assign		$tmp28 ___281_C 	%line{534} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:87
#     }
	mul		$tmp43 $tmp27 $tmp28 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\showst.osl"} %line{87} %argrw{"wrr"}
	add		C $tmp26 $tmp43 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\showst.osl:90
# }
	mul		C C opacity 	%line{90} %argrw{"wrr"}
	end
