Join for quick access. Enter your email below and we'll send confirmation plus sign you up to our newsletter.
By submitting your information, you confirm you are aged 16 or over,
have read our
Privacy Policy
and agree to the
Terms & Conditions. Geographical rules apply.
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
You are now subscribed
Your newsletter sign-up was successful
An account already exists for this email address, please log in.
This information is only for the ones of you who are interested and have a bit of programming experience as well as a minimal understanding of 3D math.
These are the instructions:
Swipe to scroll horizontally
Instruction
Parameters
Action
nop
Row 0 - Cell 1
do nothing
mov
dest, src
move
mul
dest, src1, rc2
Set dest to the product of src1 and src2
add
dest, src1, rc2
Add src1 to src2. [And the optional negation creates subtraction]
mad
dest, src1, rc2, rc3
Multiply src1 by src2 and add src3 - into dst
rsq
dest, src
Reciprocal square root of src (much more useful than straight 'square root').dest.x = dest.y = dest.z = dest.w = 1/sqrt(src)
dp3
dest, src1, src2
3 Component dot product
dp4
dest, src1, src2
4 Component dot product
dst
dest, src1, src2
Calculate distance vector. src1 vector is (NA,d*d,d*d,NA) and src2 is (NA,1/d,NA,1/d).dest is set to (1,d,d*d,1/d)
lit
dest, src
Calculates lighting coefficients from two dot products and a power. src is:src.x = n o l (unit normal and light vectors)src.y = n o h (unit normal and halfangle vectors)src.z is unusedsrc.w = power (in range +128 to -128)