OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
displacement dented	%meta{string,help,"Dent displacement, procedural"} 
param	float	Km	1		%meta{string,help,"Amplitude"}  %read{56,56} %write{2147483647,-1} %derivs
param	float	sharp	3		%meta{string,help,"Sharpness"} %meta{float,min,0}  %read{55,55} %write{2147483647,-1} %derivs
param	float	octaves	6		%meta{string,help,"Octaves of noise"} %meta{float,min,1} %meta{float,max,8}  %read{14,14} %write{2147483647,-1}
param	float	freq	1		%meta{string,help,"Frequency"}  %read{1,1} %write{2147483647,-1} %derivs
param	point	Pref	0 0 0		%meta{string,help,"Reference pose (defaults to P)"}  %read{3,3} %write{0,0} %derivs %initexpr
param	string	shadingspace	"shader"		%meta{string,help,"Shading space"}  %read{3,65} %write{2147483647,-1} %derivs
param	float	shadingfreq	1		%meta{string,help,"Shading frequency"}  %read{1,1} %write{2147483647,-1} %derivs
global	point	P	%read{0,75} %write{71,71} %derivs
global	normal	N	%read{60,60} %write{74,78} %derivs
local	vector	___261_dir	%read{63,69} %write{60,60} %derivs
local	vector	___261_Nresid	%read{74,78} %write{63,63} %derivs
local	float	___261_spacescale	%read{67,67} %write{66,66} %derivs
local	vector	___261_Ndisp	%read{71,75} %write{69,69} %derivs
local	float	___291_x0	%read{12,53} %write{12,53} %derivs
local	float	___291_x1	%read{12,53} %write{12,53} %derivs
local	float	___291_result	%read{12,53} %write{12,53} %derivs
local	float	___341_amp	%read{12,53} %write{8,53} %derivs
local	point	___341_pp	%read{12,53} %write{9,53} %derivs
local	float	___341_sum	%read{12,54} %write{10,53} %derivs
local	float	___341_fw	%read{12,53} %write{11,53} %derivs
local	float	___341_i	%read{12,53} %write{12,53}
local	float	___343_n	%read{12,53} %write{12,53} %derivs
local	point	Pshad	%read{5,9} %write{4,4} %derivs
local	float	dPshad	%read{11,11} %write{6,6} %derivs
local	float	amp	%read{55,57} %write{54,55} %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,64} %write{2147483647,-1}
const	string	$const2	"common"		%read{3,65} %write{2147483647,-1}
temp	float	$tmp3	%read{6,6} %write{5,5} %derivs
const	float	$const4	2		%read{50,51} %write{2147483647,-1}
const	float	$const5	0.5		%read{22,49} %write{2147483647,-1}
const	string	$const6	"turbulence"		%read{7,7} %write{2147483647,-1}
const	int	$const7	1		%read{8,70} %write{2147483647,-1}
const	int	$const8	0		%read{10,30} %write{2147483647,-1}
temp	int	$tmp4	%read{12,53} %write{12,53}
const	string	$const9	"filteredsnoise"		%read{15,15} %write{2147483647,-1}
temp	float	$tmp5	%read{19,19} %write{16,16} %derivs
temp	float	$tmp6	%read{18,18} %write{17,17} %derivs
const	float	$const10	0.2		%read{17,17} %write{2147483647,-1}
const	float	$const11	0.75		%read{17,17} %write{2147483647,-1}
temp	float	$tmp7	%read{19,19} %write{18,18} %derivs
const	float	$const12	1		%read{18,53} %write{2147483647,-1}
temp	float	$tmp8	%read{47,47} %write{46,46} %derivs
temp	float	$tmp9	%read{22,45} %write{20,20} %derivs
const	string	$const13	"filteredabs"		%read{21,21} %write{2147483647,-1}
temp	float	$tmp10	%read{23,23} %write{22,22} %derivs
temp	float	$tmp11	%read{26,26} %write{25,25}
temp	int	$tmp12	%read{27,27} %write{26,26}
temp	int	$tmp13	%read{28,32} %write{27,31}
const	float	$const14	0		%read{29,29} %write{2147483647,-1}
temp	int	$tmp14	%read{30,30} %write{29,29}
temp	int	$tmp15	%read{31,31} %write{30,30}
temp	float	$tmp16	%read{44,44} %write{38,38} %derivs
const	string	$const15	"integral"		%read{34,39} %write{2147483647,-1}
temp	float	$tmp17	%read{36,36} %write{35,35} %derivs
temp	float	$tmp18	%read{37,37} %write{36,36} %derivs
temp	float	$tmp19	%read{38,38} %write{37,37} %derivs
temp	float	$tmp20	%read{44,44} %write{43,43} %derivs
temp	float	$tmp21	%read{41,41} %write{40,40} %derivs
temp	float	$tmp22	%read{42,42} %write{41,41} %derivs
temp	float	$tmp23	%read{43,43} %write{42,42} %derivs
temp	float	$tmp24	%read{45,45} %write{44,44} %derivs
temp	float	$tmp25	%read{48,48} %write{47,47} %derivs
temp	point	$tmp26	%read{52,52} %write{51,51} %derivs
temp	float	$tmp27	%read{57,57} %write{56,56} %derivs
temp	float	$tmp28	%read{68,68} %write{57,57} %derivs
const	string	$const16	"displace"		%read{58,59} %write{2147483647,-1}
temp	vector	$tmp29	%read{63,63} %write{62,62} %derivs
temp	vector	$tmp30	%read{62,62} %write{61,61} %derivs
temp	vector	$tmp31	%read{66,66} %write{65,65} %derivs
temp	float	$tmp32	%read{68,68} %write{67,67} %derivs
const	float	$const17	1e-006		%read{67,67} %write{2147483647,-1}
temp	float	$tmp33	%read{69,69} %write{68,68} %derivs
temp	vector	$tmp34	%read{74,74} %write{73,73} %derivs
temp	vector	$tmp35	%read{73,73} %write{72,72} %derivs
temp	vector	$tmp36	%read{78,78} %write{77,77} %derivs
temp	vector	$tmp37	%read{77,77} %write{76,76} %derivs
temp	point	$tmp38	%read{76,76} %write{75,75} %derivs
code Pref
# D:\\xrt.git\\src\\osl\\shaders\\dented.osl:67
#     string shadingspace = "shader"
	assign		Pref P 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\dented.osl"} %line{67} %argrw{"wr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\dented.osl:74
#     float dPshad = sqrt(area(Pshad));
	mul		$tmp1 freq shadingfreq 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\dented.osl"} %line{74} %argrw{"wrr"}
	functioncall	$const1 4 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:249
# vector cross (vector a, vector b) 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\\dented.osl:74
#     float dPshad = sqrt(area(Pshad));
	mul		Pshad $tmp1 $tmp2 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\dented.osl"} %line{74} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\dented.osl:75
# 
	area		$tmp3 Pshad 	%line{75} %argrw{"wr"} %argderivs{1}
	sqrt		dPshad $tmp3 	%argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\dented.osl:77
#     amp = pow (amp, sharp);
	functioncall	$const6 55 	%line{77} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:263
# 
	assign		___341_amp $const7 	%filename{"D:/xrt.git\\src\\osl\\shaders\\noises.h"} %line{263} %argrw{"wr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:264
#     for (i = 0;  i < octaves;  i += 1) {
	assign		___341_pp Pshad 	%line{264} %argrw{"wr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:265
# 	sum += amp * filteredVLNoise (pp, fw, scale);
	assign		___341_sum $const8 	%line{265} %argrw{"wr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:266
# 	amp *= gain;  fw *= lacunarity;
	assign		___341_fw dPshad 	%line{266} %argrw{"wr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:269
#     return sum;
	for		$tmp4 14 15 53 54 	%line{269} %argrw{"r"}
	assign		___341_i $const8 	%argrw{"wr"}
	lt		$tmp4 ___341_i octaves 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:270
# }
	functioncall	$const9 20 	%line{270} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:62
#     return snoise(p) * (1-smoothstep (FILTLOW,FILTHIGH,width));
	snoise		$tmp5 ___341_pp 	%line{62} %argrw{"wr"}
	smoothstep	$tmp6 $const10 $const11 ___341_fw 	%argrw{"wrrr"}
	sub		$tmp7 $const12 $tmp6 	%argrw{"wrr"}
	mul		___343_n $tmp5 $tmp7 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:271
# 	sum += amp * filteredabs (n, filterwidth(n));
	filterwidth	$tmp9 ___343_n 	%line{271} %argrw{"wr"} %argderivs{1}
	functioncall	$const13 47 	%argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:54
#     float x0 = x - 0.5*dx;
	mul		$tmp10 $const5 $tmp9 	%filename{"D:/xrt.git\\src\\osl\\shaders\\patterns.h"} %line{54} %argrw{"wrr"}
	sub		___291_x0 ___343_n $tmp10 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:55
#     float x1 = x0 + dx;
	add		___291_x1 ___291_x0 $tmp9 	%line{55} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:61
#     if (x0 * x1 >= 0 || dx == 0.0)
	mul		$tmp11 ___291_x0 ___291_x1 	%line{61} %argrw{"wrr"}
	ge		$tmp12 $tmp11 $const8 	%argrw{"wrr"}
	neq		$tmp13 $tmp12 $const8 	%argrw{"wrr"}
	if		$tmp13 29 32 	%argrw{"r"}
	eq		$tmp14 $tmp9 $const14 	%argrw{"wrr"}
	neq		$tmp15 $tmp14 $const8 	%argrw{"wrr"}
	assign		$tmp13 $tmp15 	%argrw{"wr"}
	if		$tmp13 34 46 	%argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:62
#         result = abs(x);
	abs		___291_result ___343_n 	%line{62} %argrw{"wr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:64
#         result = (integral(x1) - integral(x0)) / dx;
	functioncall	$const15 39 	%line{64} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:51
# 	return sign(t) * 0.5 * t*t;
	sign		$tmp17 ___291_x1 	%line{51} %argrw{"wr"}
	mul		$tmp18 $tmp17 $const5 	%argrw{"wrr"}
	mul		$tmp19 $tmp18 ___291_x1 	%argrw{"wrr"}
	mul		$tmp16 $tmp19 ___291_x1 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:64
#         result = (integral(x1) - integral(x0)) / dx;
	functioncall	$const15 44 	%line{64} %argrw{"r"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:51
# 	return sign(t) * 0.5 * t*t;
	sign		$tmp21 ___291_x0 	%line{51} %argrw{"wr"}
	mul		$tmp22 $tmp21 $const5 	%argrw{"wrr"}
	mul		$tmp23 $tmp22 ___291_x0 	%argrw{"wrr"}
	mul		$tmp20 $tmp23 ___291_x0 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:64
#         result = (integral(x1) - integral(x0)) / dx;
	sub		$tmp24 $tmp16 $tmp20 	%line{64} %argrw{"wrr"}
	div		___291_result $tmp24 $tmp9 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\patterns.h:65
#     return result;
	assign		$tmp8 ___291_result 	%line{65} %argrw{"wr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:271
# //    octaves        max # of octaves to calculate
	mul		$tmp25 ___341_amp $tmp8 	%filename{"D:/xrt.git\\src\\osl\\shaders\\noises.h"} %line{271} %argrw{"wrr"}
	add		___341_sum ___341_sum $tmp25 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:272
# //    lacunarity     frequency spacing between successive octaves
	mul		___341_amp ___341_amp $const5 	%line{272} %argrw{"wrr"}
	mul		___341_fw ___341_fw $const4 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:273
# //    gain           scaling factor between successive octaves
	mul		$tmp26 ___341_pp $const4 	%line{273} %argrw{"wrr"}
	add		___341_pp $tmp26 $const12 	%argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:269
#     for (i = 0;  i < octaves;  i += 1) {
	add		___341_i ___341_i $const12 	%line{269} %argrw{"wrr"}
# D:/xrt.git\\src\\osl\\shaders\\noises.h:275
#     return sum;
	assign		amp ___341_sum 	%line{275} %argrw{"wr"}
# D:\\xrt.git\\src\\osl\\shaders\\dented.osl:78
#     displace (shadingspace, -Km*amp);
	pow		amp amp sharp 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\dented.osl"} %line{78} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\dented.osl:79
# }
	neg		$tmp27 Km 	%line{79} %argrw{"wr"}
	mul		$tmp28 $tmp27 amp 	%argrw{"wrr"}
	functioncall	$const16 79 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:463
#         }
	functioncall	$const16 79 	%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	$tmp30 P 	%line{451} %argrw{"wr"} %argderivs{1}
	normalize	$tmp29 $tmp30 	%argrw{"wr"}
	sub		___261_Nresid ___261_dir $tmp29 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:452
#     float spacescale = length(transform(space, dir));
	functioncall	$const1 66 	%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	$tmp31 $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 $tmp31 	%line{452} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:453
#     vector Ndisp = dir * (amp / max(spacescale,1e-6));
	max		$tmp32 ___261_spacescale $const17 	%line{453} %argrw{"wrr"}
	div		$tmp33 $tmp28 $tmp32 	%argrw{"wrr"}
	mul		___261_Ndisp ___261_dir $tmp33 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:454
# 	if (truedisp) {
	if		$const7 75 79 	%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	$tmp35 P 	%line{456} %argrw{"wr"} %argderivs{1}
	normalize	$tmp34 $tmp35 	%argrw{"wr"}
	add		N ___261_Nresid $tmp34 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:458
# 	    N = Nresid + normalize (calculatenormal (P + Ndisp));
	add		$tmp38 P ___261_Ndisp 	%line{458} %argrw{"wrr"}
	calculatenormal	$tmp37 $tmp38 	%argrw{"wr"} %argderivs{1}
	normalize	$tmp36 $tmp37 	%argrw{"wr"}
	add		N ___261_Nresid $tmp36 	%argrw{"wrr"}
	end
