OpenShadingLanguage 1.01
# Compiled by oslc 1.6.2
displacement dispmap	%meta{string,description,"Texture-mapped displacement"} 
param	float	Km	1		%meta{string,description,"Amplitude of displacement"}  %read{7,7} %write{2147483647,-1} %derivs
param	float	offset	0		%meta{string,description,"Value indicating neutral displacement"}  %read{2,2} %write{2147483647,-1} %derivs
param	float	disp	0		%meta{string,description,"Displacement input from earlier layers"}  %read{2,2} %write{2147483647,-1} %derivs
param	string	shadingspace	"shader"		%meta{string,description,"Space in which Km is measured"} %meta{string,UItype,"coordsys"}  %read{15,15} %write{2147483647,-1} %derivs
param	string	texturename	""		%meta{string,description,"Texture map name (empty for no texture)"} %meta{string,UItype,"texture"}  %read{3,5} %write{2147483647,-1} %derivs
param	float	blur	0		%meta{string,description,"Texture map blur"} %meta{float,UImin,0} %meta{float,UIsoftmax,1} %meta{string,UIenabler,"texturename"}  %read{5,5} %write{2147483647,-1} %derivs
param	string	wrap	"default"		%meta{string,description,"Texture map wrap mode"} %meta{string,UIenabler,"texturename"}  %read{5,5} %write{2147483647,-1} %derivs
param	float	s	0		%meta{string,description,"s texture coordinate (defaults to u)"} %meta{string,UIenabler,"texturename"}  %read{5,5} %write{0,0} %derivs %initexpr
param	float	t	0		%meta{string,description,"t texure coordinate (defaults to v)"} %meta{string,UIenabler,"texturename"}  %read{5,5} %write{1,1} %derivs %initexpr
global	point	P	%read{11,25} %write{21,21} %derivs
global	normal	N	%read{10,10} %write{24,28} %derivs
global	float	u	%read{0,0} %write{2147483647,-1} %derivs
global	float	v	%read{1,1} %write{2147483647,-1} %derivs
local	vector	___261_dir	%read{13,19} %write{10,10} %derivs
local	vector	___261_Nresid	%read{24,28} %write{13,13} %derivs
local	float	___261_spacescale	%read{17,17} %write{16,16} %derivs
local	vector	___261_Ndisp	%read{21,25} %write{19,19} %derivs
local	float	d	%read{6,7} %write{2,6} %derivs
temp	int	$tmp1	%read{4,4} %write{3,3}
const	string	$const1	""		%read{3,3} %write{2147483647,-1}
temp	float	$tmp2	%read{6,6} %write{5,5} %derivs
const	string	$const2	"blur"		%read{5,5} %write{2147483647,-1}
const	string	$const3	"wrap"		%read{5,5} %write{2147483647,-1}
temp	float	$tmp3	%read{18,18} %write{7,7} %derivs
const	string	$const4	"displace"		%read{8,9} %write{2147483647,-1}
const	int	$const5	1		%read{20,20} %write{2147483647,-1}
temp	vector	$tmp4	%read{13,13} %write{12,12} %derivs
temp	vector	$tmp5	%read{12,12} %write{11,11} %derivs
temp	vector	$tmp6	%read{16,16} %write{15,15} %derivs
const	string	$const6	"transform"		%read{14,14} %write{2147483647,-1}
const	string	$const7	"common"		%read{15,15} %write{2147483647,-1}
temp	float	$tmp7	%read{18,18} %write{17,17} %derivs
const	float	$const8	1e-006		%read{17,17} %write{2147483647,-1}
temp	float	$tmp8	%read{19,19} %write{18,18} %derivs
temp	vector	$tmp9	%read{24,24} %write{23,23} %derivs
temp	vector	$tmp10	%read{23,23} %write{22,22} %derivs
temp	vector	$tmp11	%read{28,28} %write{27,27} %derivs
temp	vector	$tmp12	%read{27,27} %write{26,26} %derivs
temp	point	$tmp13	%read{26,26} %write{25,25} %derivs
code s
# D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl:78
#     float t = v
	assign		s u 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl"} %line{78} %argrw{"wr"}
code t
# D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl:81
#   )
	assign		t v 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl"} %line{81} %argrw{"wr"}
code ___main___
# D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl:84
#     if (texturename) {
	sub		d disp offset 	%filename{"D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl"} %line{84} %argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl:85
#         d += texture (texturename, s, t, "blur", blur, "wrap", wrap);
	neq		$tmp1 texturename $const1 	%line{85} %argrw{"wrr"}
	if		$tmp1 7 7 	%argrw{"r"}
# D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl:86
#     }
	texture		$tmp2 texturename s t $const2 blur $const3 wrap 	%line{86} %argrw{"wrrrrrrr"} %argderivs{2,3}
	add		d d $tmp2 	%argrw{"wrr"}
# D:\\xrt.git\\src\\osl\\shaders\\dispmap.osl:88
# }
	mul		$tmp3 Km d 	%line{88} %argrw{"wrr"}
	functioncall	$const4 29 	%argrw{"r"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:463
#         // Easiest to convert hsl -> hsv, then hsv -> RGB (per Foley & van Dam)
	functioncall	$const4 29 	%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	$tmp5 P 	%line{451} %argrw{"wr"} %argderivs{1}
	normalize	$tmp4 $tmp5 	%argrw{"wr"}
	sub		___261_Nresid ___261_dir $tmp4 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:452
#     float spacescale = length(transform(space, dir));
	functioncall	$const6 16 	%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	$tmp6 $const7 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 $tmp6 	%line{452} %argrw{"wr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:453
#     vector Ndisp = dir * (amp / max(spacescale,1e-6));
	max		$tmp7 ___261_spacescale $const8 	%line{453} %argrw{"wrr"}
	div		$tmp8 $tmp3 $tmp7 	%argrw{"wrr"}
	mul		___261_Ndisp ___261_dir $tmp8 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:454
# 	if (truedisp) {
	if		$const5 25 29 	%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	$tmp10 P 	%line{456} %argrw{"wr"} %argderivs{1}
	normalize	$tmp9 $tmp10 	%argrw{"wr"}
	add		N ___261_Nresid $tmp9 	%argrw{"wrr"}
# D:/xrt.git\\build\\vc10\\Win32\\Release\\shaders\\stdosl.h:458
# 	    N = Nresid + normalize (calculatenormal (P + Ndisp));
	add		$tmp13 P ___261_Ndisp 	%line{458} %argrw{"wrr"}
	calculatenormal	$tmp12 $tmp13 	%argrw{"wr"} %argderivs{1}
	normalize	$tmp11 $tmp12 	%argrw{"wr"}
	add		N ___261_Nresid $tmp11 	%argrw{"wrr"}
	end
