4. “9 out of 10 top Facebook games are delivered
using Flash Player.
The biggest game networks in the world, like
DNA, GREE, and Tencent, deliver their games
with Flash technology.
The iOS App Store,Android Market, and
Amazon Appstore feature best-selling, #1
games built with Flash technologies.”
http://gaming.adobe.com/whyflash/
Saturday, 18 May 2013
45. A
B
A • B = |A| |B| Cos
A is Half Angle
B is Normal
( A • B )
n
n = 1 n = 50n = 5
= 0
Saturday, 18 May 2013
46. vertex shader
m44 op, va0, vc0 transform
m44 v0, va1, vc4 normal
fragment shader
nrm ft0.xyz, v0 normalise normal
mov ft0.w, fc0.w set w to 1
dp3 ft0.x, ft0, fc0 dot product
sat ft0.x, ft0.x clamp
pow ft1.x, ft0.x, fc3.w dot product to power
mul ft2.xyz, fc2.xyz, ft0.xxx diffuse colour
add ft2.xyz, fc1.xyz, ft2.xyz add ambient colour
mul ft3.xyz, fc3.xyz, ft1.xxx specular colour
add oc, ft2.xyz, ft3.xyz combine and output
fc0 Half Angle Vector fc1 Ambient Colour
fc2 Diffuse Colour fc3 Specular Colour
Saturday, 18 May 2013
47. Example 8 :AGAL Animation
Flash3DExperimentE
Saturday, 18 May 2013
48. AGAL Animation
• Advantageous to animate vertices in AGAL
• AS3 is slow. AGAL is fast.
• Manipulation of vertices in AS3 is slow
• Computing a transformation matrix is slow
• Better to interpolate vertices in AGAL
Saturday, 18 May 2013