#!version 1.3.15
surface
#!parameters:
float	Ka	=	1
float	Ks	=	1
float	Kr	=	1
float	roughness	=	.1
float	samples	=	1
float	blur	=	0
string	texname	=	"raytrace"
#!variables:
vector	Nf
vector	temporary_0
vector	temporary_1
vector	temporary_2
vector	temporary_3
vector	temporary_4
uniform	vector	temporary_5
vector	temporary_6
vector	temporary_7
vector	temporary_8
float	temporary_9
#!Init:
	movess            	texname "raytrace"
	return            
#!Code:
	normalize	("v=v")  N  N 
	normalize	("v=v")  I  I 
	faceforward	("v=vv")  Nf  N  I 
	movevv            	Oi Os
	vfromf            	temporary_5 Ka
	vuvector           temporary_4 temporary_5
	ambient	("c=")  temporary_6 
	mulvv             	temporary_3 temporary_4 temporary_6
	vfromf            	temporary_5 Ks
	vuvector           temporary_6 temporary_5
	negv              	temporary_8 I
	vufloat            temporary_9 roughness
	specular	("c=nvf")  temporary_7  Nf  temporary_8  temporary_9 
	mulvv             	temporary_4 temporary_6 temporary_7
	addvv             	temporary_2 temporary_3 temporary_4
	mulvv             	temporary_1 Cs temporary_2
	vfromf            	temporary_5 Kr
	vuvector           temporary_3 temporary_5
	reflect	("v=vv")  temporary_6  I  Nf 
	environment	("c=SFvSfSf")  temporary_4  texname  0  temporary_6  "samples"  samples  "blur"  blur 
	mulvv             	temporary_2 temporary_3 temporary_4
	addvv             	temporary_0 temporary_1 temporary_2
	mulvv             	Ci Os temporary_0
	return            

