OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
displacement stucco	%meta{string,description,"Stucco displacement, procedural"} 
param	float	Km	0.050000001		%meta{string,description,"Overall amplitude"}  %read{15,15} %write{2147483647,-1} %derivs
param	float	freq	10		%meta{string,description,"Frequency"}  %read{1,1} %write{2147483647,-1} %derivs
param	float	sharp	5		%meta{string,description,"Sharpness"} %meta{float,UImin,0}  %read{14,14} %write{2147483647,-1} %derivs
param	point	Pref	0 0 0		%meta{string,description,"Reference pose (defaults to P)"}  %read{3,3} %write{0,0} %derivs %initexpr
param	string	shadingspace	"shader"		%meta{string,description,"Shading space"} %meta{string,UItype,"coordsys"}  %read{3,24} %write{2147483647,-1} %derivs
param	float	shadingfreq	1		%meta{string,description,"Shading frequency"}  %read{1,16} %write{2147483647,-1} %derivs
global	point	P	%read{0,34} %write{30,30} %derivs
global	normal	N	%read{19,19} %write{33,37} %derivs
local	vector	___261_dir	%read{22,28} %write{19,19} %derivs
local	vector	___261_Nresid	%read{33,37} %write{22,22} %derivs
local	float	___261_spacescale	%read{26,26} %write{25,25} %derivs
local	vector	___261_Ndisp	%read{30,34} %write{28,28} %derivs
local	point	Pshad	%read{5,8} %write{4,4} %derivs
local	float	dPshad	%read{9,9} %write{6,6} %derivs
local	float	amp	%read{15,15} %write{14,14} %derivs
temp	float	$tmp1	%read{4,4} %write{1,1} %derivs
temp	point	$tmp2	%read{4,4} %write{3,3} %derivs
const	string	$const1	"transform"		%read{2,23} %write{2147483647,-1}
const	string	$const2	"common"		%read{3,24} %write{2147483647,-1}
temp	float	$tmp3	%read{6,6} %write{5,5} %derivs
temp	float	$tmp4	%read{12,12} %write{11,11} %derivs
const	string	$const3	"filteredsnoise"		%read{7,7} %write{2147483647,-1}
temp	float	$tmp5	%read{11,11} %write{8,8} %derivs
const	int	$const4	1		%read{29,29} %write{2147483647,-1}
temp	float	$tmp6	%read{10,10} %write{9,9} %derivs
const	float	$const5	0.2		%read{9,9} %write{2147483647,-1}
const	float	$const6	0.75		%read{9,9} %write{2147483647,-1}
temp	float	$tmp7	%read{11,11} %write{10,10} %derivs
const	float	$const7	1		%read{10,12} %write{2147483647,-1}
temp	float	$tmp8	%read{13,13} %write{12,12} %derivs
const	float	$const8	0.5		%read{13,13} %write{2147483647,-1}
temp	float	$tmp9	%read{14,14} %write{13,13} %derivs
temp	float	$tmp10	%read{16,16} %write{15,15} %derivs
temp	float	$tmp11	%read{27,27} %write{16,16} %derivs
const	string	$const9	"displace"		%read{17,18} %write{2147483647,-1}
temp	vector	$tmp12	%read{22,22} %write{21,21} %derivs
temp	vector	$tmp13	%read{21,21} %write{20,20} %derivs
temp	vector	$tmp14	%read{25,25} %write{24,24} %derivs
temp	float	$tmp15	%read{27,27} %write{26,26} %derivs
const	float	$const10	1e-006		%read{26,26} %write{2147483647,-1}
temp	float	$tmp16	%read{28,28} %write{27,27} %derivs
temp	vector	$tmp17	%read{33,33} %write{32,32} %derivs
temp	vector	$tmp18	%read{32,32} %write{31,31} %derivs
temp	vector	$tmp19	%read{37,37} %write{36,36} %derivs
temp	vector	$tmp20	%read{36,36} %write{35,35} %derivs
temp	point	$tmp21	%read{35,35} %write{34,34} %derivs
code Pref
# D:\\xrt.git\\src\\osl\\shaders\\stucco.osl:64
#     string shadingspace = "shader"
	assign		Pref P 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stucco.osl"} %line{64} %argrw{"wr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\stucco.osl:72
#     float dPshad = sqrt (area (Pshad));
	mul		$tmp1 freq shadingfreq 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stucco.osl"} %line{72} %argrw{"wrr"}
	functioncall	$const1 4 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:249
# float length (vector v) BUILTIN;
	transform	$tmp2 $const2 shadingspace Pref 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{249} %argrw{"wrrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stucco.osl:72
#     float dPshad = sqrt (area (Pshad));
	mul		Pshad $tmp1 $tmp2 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stucco.osl"} %line{72} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stucco.osl:73
# 
	area		$tmp3 Pshad 	%line{73} %argrw{"wr"} %argderivs{1}
	sqrt		dPshad $tmp3 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\stucco.osl:75
# 
	functioncall	$const3 12 	%line{75} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:62
#     return snoise(p) * (1-smoothstep (FILTLOW,FILTHIGH,width));
	snoise		$tmp5 Pshad 	%filename{"D:/xrt.git\\src\\osl\\shaders\\noises.h"} %line{62} %argrw{"wr"}
	smoothstep	$tmp6 $const5 $const6 dPshad 	%argrw{"wrrr"}
	sub		$tmp7 $const7 $tmp6 	%argrw{"wrr"}
	mul		$tmp4 $tmp5 $tmp7 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stucco.osl:75
# //   shadingfreq - overall scaling factor for the pattern
	add		$tmp8 $tmp4 $const7 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\stucco.osl"} %line{75} %argrw{"wrr"}
	mul		$tmp9 $tmp8 $const8 	%argrw{"wrr"}
	pow		amp $tmp9 sharp 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\stucco.osl:77
# /////////////////////////////////////////////////////////////////////////////
	mul		$tmp10 Km amp 	%line{77} %argrw{"wrr"}
	div		$tmp11 $tmp10 shadingfreq 	%argrw{"wrr"}
	functioncall	$const9 38 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:463
#     }
	functioncall	$const9 38 	%filename{"D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h"} %line{463} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:449
#     vector dir = normalize(N);
	normalize	___261_dir N 	%line{449} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:451
#     vector Nresid = dir - normalize(calculatenormal (P));
	calculatenormal	$tmp13 P 	%line{451} %argrw{"wr"} %argderivs{1}
	normalize	$tmp12 $tmp13 	%argrw{"wr"}
	sub		___261_Nresid ___261_dir $tmp12 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:452
#     float spacescale = length(transform(space, dir));
	functioncall	$const1 25 	%line{452} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:248
# vector transform (string to, vector p) { return transform("common",to,p); }
	transformv	$tmp14 $const2 shadingspace ___261_dir 	%line{248} %argrw{"wrrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:452
#     float spacescale = length(transform(space, dir));
	length		___261_spacescale $tmp14 	%line{452} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:453
#     vector Ndisp = dir * (amp / max(spacescale,1e-6));
	max		$tmp15 ___261_spacescale $const10 	%line{453} %argrw{"wrr"}
	div		$tmp16 $tmp11 $tmp15 	%argrw{"wrr"}
	mul		___261_Ndisp ___261_dir $tmp16 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:454
# 	if (truedisp) {
	if		$const4 34 38 	%line{454} %argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:455
# 		P += Ndisp;
	add		P P ___261_Ndisp 	%line{455} %argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:456
# 		N = Nresid + normalize (calculatenormal (P));
	calculatenormal	$tmp18 P 	%line{456} %argrw{"wr"} %argderivs{1}
	normalize	$tmp17 $tmp18 	%argrw{"wr"}
	add		N ___261_Nresid $tmp17 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:458
# 	    N = Nresid + normalize (calculatenormal (P + Ndisp));
	add		$tmp21 P ___261_Ndisp 	%line{458} %argrw{"wrr"}
	calculatenormal	$tmp20 $tmp21 	%argrw{"wr"} %argderivs{1}
	normalize	$tmp19 $tmp20 	%argrw{"wr"}
	add		N ___261_Nresid $tmp19 	%argrw{"wrr"}
	end
