Motorola DSP96002 User Manual page 585

32-bit digital signal processor
Table of Contents

Advertisement

org
w1
dsm
w2
dsm
org
move
move
move
move
move
move
;
;
input in d7
;
move
do
fmpy
fmpy
fmpy
fmpy
fmpy.s d0,d4,d1
tran
move
move
B.1.35
3-Dimensional Graphics Illumination
Illumination of objects in three dimensions consists of light from three sources: diffuse lighting from a point
source, ambient light and specular lighting. Specular lighting is caused by an object directly reflecting the
illumination source. The following variables describe the illumination process:
L
Direction vector to the point light source L={Lx,Ly,Lz}
N
Direction vector normal to the object N={Nx,Ny,Nz}
Ip
Intensity of the point source
Kd
Diffuse reflection constant 0<= Kd <= 1.0
Ia
Intensity of ambient light
Ka
Ambient reflection constant 0<= Ka <= 1.0
B-66
y:0
nsec
nsec
p:$100
#coef,r0
#5 * nsec-1,m0
#w1,r4
#nsec-1,m4
#w2,r5
m4,m5
x:(r0)+,d4.s
#nsec,tran
d7,d4,d0
fadd.s d1,d2 x:(r0)+,d4.s
d7,d4,d1
fadd.s d5,d0 x:(r0)+,d4.s
d0,d4,d2
fadd.s d6,d1 x:(r0)+,d4.s
d7,d4,d2
fadd.s d2,d1 x:(r0)+,d4.s
fadd.s d1,d2
d2.s,y:(r5)+
d0.s,y:$ffff
DSP96002 USER'S MANUAL
;get b0
y:(r4),d5.s
y:(r5),d6.s
d2.s,y:(r5)+
d0.s,d7.s
x:(r0)+,d4.s
d1.s,y:(r4)+
Totals:
1
1
2
3
1
1
1
1
1
1
1
1
1
1
1
1
1
1
---
---
10
5N+6
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents