displacement
AQSIS_V 1.6.0


segment Data

USES 2304

param uniform  float mult
param uniform  float Kd
varying  normal Nn
varying  float a
varying  float b
varying  float d
varying  point Po


segment Init
	pushif 5
	pop mult
	pushif 0.2
	pop Kd


segment Code
	pushv N
	normalize
	pop Nn
	pushv mult
	setfp
	pushv P
	pushis "object"
	transform
	mulpp
	pop Po
	pushv Po
	noise3
	pop a
	pushv a
	pushv a
	negf
	mulff
	pop a
	pushif 10
	setfp
	pushv Po
	mulpp
	noise3
	pop b
	pushv b
	pushv b
	negf
	mulff
	pop b
	pushv b
	pushif 0.4
	mulff
	pushv a
	addff
	pop d
	pushv d
	setfp
	pushv Kd
	setfp
	pushv Nn
	mulpp
	mulpp
	pushv P
	addpp
	pop P
	pushv P
	calculatenormal
	pop N
