surface
AQSIS_V 1.6.0


segment Data

USES 460803

param uniform  float Kd
param uniform  float Ka
varying  float d


segment Init
	pushif 0.8
	pop Kd
	pushif 0.2
	pop Ka


segment Code
	pushv N
	normalize
	pushv I
	normalize
	dotpp
	pop d
	pushv d
	pushv d
	mulff
	pop d
	pushv d
	pushif 1
	subff
	pushv Kd
	mulff
	pushv Ka
	addff
	setfc
	pushv Cs
	pushv Os
	mulcc
	mulcc
	pop Ci
	pushv Os
	pop Oi
