surface
AQSIS_V 1.2.0


segment Data

USES 460803

param uniform  float Ka
param uniform  float Kd
param uniform  float Ks
param uniform  float roughness
param uniform  color specularcolor
varying  normal Nf


segment Init
	pushif 1
	pop Ka
	pushif 0.5
	pop Kd
	pushif 0.5
	pop Ks
	pushif 0.1
	pop roughness
	pushif 1
	setfc
	pop specularcolor


segment Code
	pushv I
	pushv N
	normalize
	faceforward
	pop Nf
	pushv Os
	pop Oi
	pushv roughness
	pushv I
	normalize
	negp
	pushv Nf
	specular
	pushv Ks
	setfc
	pushv specularcolor
	mulcc
	mulcc
	pushv Nf
	diffuse
	pushv Kd
	mulfc
	ambient
	pushv Ka
	mulfc
	addcc
	pushv Cs
	mulcc
	addcc
	pushv Os
	mulcc
	pop Ci
